-
Notifications
You must be signed in to change notification settings - Fork 27
Closed
Description
Thanks for this library. I'm using it and now that I'm trying to use references in schemas I'm asking myself whether you not resolve references on purpose? See this gist for an example. Without doing the reference resolution the schema contains
"properties": {
"billing_address": {
"$ref": "#/definitions/address"
},
"shipping_address": {
"$ref": "#/definitions/address"
}
},
instead of
"properties": {
"billing_address": {
"type": "object",
"properties": {
"street_address": {
"type": "string"
},
"city": {
"type": "string"
},
"state": {
"type": "string"
}
},
"required": [
"street_address",
"city",
"state"
],
"id": "file:///srv/www/json-schema/schema-address.json#/definitions/address"
},
"shipping_address": {
"type": "object",
"properties": {
"street_address": {
"type": "string"
},
"city": {
"type": "string"
},
"state": {
"type": "string"
}
},
"required": [
"street_address",
"city",
"state"
],
"id": "file:///srv/www/json-schema/schema-address.json#/definitions/address"
}
}
Apart from the underlying library not supporting all cases of definitions
and $ref
usage I just wanted to make sure whether you're deviating intentionally from the README example of justinrainbow/json-schema.
Metadata
Metadata
Assignees
Labels
No labels