person.json 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. {
  2. "$ref": "basic_person.json",
  3. "properties": {
  4. "location": {
  5. "type": "object",
  6. "title": "Location",
  7. "properties": {
  8. "city": {
  9. "type": "string"
  10. },
  11. "state": {
  12. "type": "string"
  13. },
  14. "citystate": {
  15. "type": "string",
  16. "description": "This is generated automatically from the previous two fields",
  17. "template": "{{city}}, {{state}}",
  18. "watch": {
  19. "city": "person.location.city",
  20. "state": "person.location.state"
  21. }
  22. }
  23. }
  24. },
  25. "pets": {
  26. "type": "array",
  27. "format": "table",
  28. "title": "Pets",
  29. "uniqueItems": true,
  30. "items": {
  31. "type": "object",
  32. "properties": {
  33. "type": {
  34. "type": "string",
  35. "enum": [
  36. "cat",
  37. "dog",
  38. "bird",
  39. "reptile",
  40. "other"
  41. ],
  42. "default": "dog"
  43. },
  44. "name": {
  45. "type": "string"
  46. },
  47. "fixed": {
  48. "type": "boolean",
  49. "title": "spayed / neutered"
  50. }
  51. }
  52. }
  53. },
  54. "cars": {
  55. "type": "array",
  56. "format": "tabs",
  57. "title": "Cars",
  58. "uniqueItems": false,
  59. "items":{
  60. "type": "object",
  61. "title": "Car",
  62. "properties": {
  63. "manufacturer": {
  64. "type": "string"
  65. },
  66. "model": {
  67. "type": "string"
  68. }
  69. }
  70. }
  71. }
  72. }
  73. }