
George St Maurice (Progress Software) asked a question.
Generate a JavaScript Vocabulary: Schema with enum
- {
- "$schema": "http://json-schema.org/draft-07/schema#",
- "definitions":
- {
- "address":
- {
- "type": "object",
- "properties": {
- "Zip": {
- "type": "string"
- },
- "State": {
- "type": "string"
- },
- "Address2": {
- "type": "string"
- },
- "Address1": {
- "type": "string"
- },
- "City": {
- "type": "string"
- },
- "Type": {
- "title": "Address Type Enumeration",
- "description": "Specifies if thge address is a Business or Residence",
- "type": "string",
- "enum": [ "Residential", "Business" ]
- }
- }
- }
- },
- "type": "object",
- "properties": {
- "BillingAddress": {
- "description": "Address to where a Customer's invoice must go",
- "$ref": "#/definitions/address"
- },
- "CompanyName": {
- "type": "string"
- },
- "Phone": {
- "type": "string"
- },
- "ShippingAddress": {
- "description": "Address to where a Customer's product must go",
- "$ref": "#/definitions/address"
- },
- "Notes": {
- "type": "string"
- },
- "Contact": {
- "type": "string"
- }
- }
- }