Last active
March 21, 2017 22:08
-
-
Save moh-hassan/e53923ea9a62e850d6e8db84702c122f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The generated schema with external reference manually using NJsonSchema | |
{ | |
"$schema": "http://json-schema.org/draft-04/schema#", | |
"type": "object", | |
"title": "personal", | |
"additionalProperties": false, | |
"properties": { | |
"name": { | |
"type": "string" | |
}, | |
"address": { | |
"type": "array", | |
"items": { | |
"$ref": "http://json-schema.org/address#" | |
} | |
}, | |
"businessAddress": { | |
"$ref": "http://json-schema.org/address#" | |
} | |
} | |
} | |
-------------- Reloading the generated schema with # concatendted at the end of the uri path | |
{ | |
"$schema": "http://json-schema.org/draft-04/schema#", | |
"type": "object", | |
"title": "personal", | |
"additionalProperties": false, | |
"properties": { | |
"name": { | |
"type": "string" | |
}, | |
"address": { | |
"type": "array", | |
"items": { | |
"$ref": "http://json-schema.org/address#/definitions/Address" | |
} | |
}, | |
"businessAddress": { | |
"$ref": "http://json-schema.org/address#/definitions/Address" | |
} | |
}, | |
"definitions": { | |
"Address": { | |
"$schema": "http://json-schema.org/draft-04/schema#", | |
"type": "object", | |
"required": [ | |
"locality", | |
"region", | |
"country-name" | |
], | |
"properties": { | |
"post-office-box": { | |
"type": "string" | |
}, | |
"extended-address": { | |
"type": "string" | |
}, | |
"street-address": { | |
"type": "string" | |
}, | |
"locality": { | |
"type": "string" | |
}, | |
"region": { | |
"type": "string" | |
}, | |
"postal-code": { | |
"type": "string" | |
}, | |
"country-name": { | |
"type": "string" | |
} | |
}, | |
"description": "An Address following the convention of http://microformats | |
.org/wiki/hcard", | |
"dependencies": { | |
"post-office-box": [ | |
"street-address" | |
], | |
"extended-address": [ | |
"street-address" | |
] | |
} | |
} | |
} | |
} | |
-------------- Reloading the generated schema without # concatendted at the end of the uri path | |
{ | |
"$schema": "http://json-schema.org/draft-04/schema#", | |
"type": "object", | |
"title": "personal", | |
"additionalProperties": false, | |
"properties": { | |
"name": { | |
"type": "string" | |
}, | |
"address": { | |
"type": "array", | |
"items": { | |
"$ref": "http://json-schema.org/address#/definitions/Address" | |
} | |
}, | |
"businessAddress": { | |
"$ref": "http://json-schema.org/address#/definitions/Address" | |
} | |
}, | |
"definitions": { | |
"Address": { | |
"$schema": "http://json-schema.org/draft-04/schema#", | |
"type": "object", | |
"required": [ | |
"locality", | |
"region", | |
"country-name" | |
], | |
"properties": { | |
"post-office-box": { | |
"type": "string" | |
}, | |
"extended-address": { | |
"type": "string" | |
}, | |
"street-address": { | |
"type": "string" | |
}, | |
"locality": { | |
"type": "string" | |
}, | |
"region": { | |
"type": "string" | |
}, | |
"postal-code": { | |
"type": "string" | |
}, | |
"country-name": { | |
"type": "string" | |
} | |
}, | |
"description": "An Address following the convention of http://microformats | |
.org/wiki/hcard", | |
"dependencies": { | |
"post-office-box": [ | |
"street-address" | |
], | |
"extended-address": [ | |
"street-address" | |
] | |
} | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment