person.json 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. {
  2. "$ref": "../fixtures/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. }
  55. }