George St Maurice (Progress Software) asked a question.

Generate a JavaScript Vocabulary: Schema with enum
  1. {
  2. "$schema": "http://json-schema.org/draft-07/schema#",
  3. "definitions":
  4. {
  5. "address":
  6. {
  7. "type": "object",
  8. "properties": {
  9. "Zip": {
  10. "type": "string"
  11. },
  12. "State": {
  13. "type": "string"
  14. },
  15. "Address2": {
  16. "type": "string"
  17. },
  18. "Address1": {
  19. "type": "string"
  20. },
  21. "City": {
  22. "type": "string"
  23. },
  24. "Type": {
  25. "title": "Address Type Enumeration",
  26. "description": "Specifies if thge address is a Business or Residence",
  27. "type": "string",
  28. "enum": [ "Residential", "Business" ]
  29. }
  30. }
  31. }
  32. },
  33. "type": "object",
  34. "properties": {
  35. "BillingAddress": {
  36. "description": "Address to where a Customer's invoice must go",
  37. "$ref": "#/definitions/address"
  38. },
  39. "CompanyName": {
  40. "type": "string"
  41. },
  42. "Phone": {
  43. "type": "string"
  44. },
  45. "ShippingAddress": {
  46. "description": "Address to where a Customer's product must go",
  47. "$ref": "#/definitions/address"
  48. },
  49. "Notes": {
  50. "type": "string"
  51. },
  52. "Contact": {
  53. "type": "string"
  54. }
  55. }
  56. }