-
-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Schema dependencies should be iterated #79
Comments
@jonaslagoni Please have in mind that final schema is only valid, when you have defined {
oneOf: [
{
"type": "object",
"properties": {
"name": { "type": "string" },
"credit_card": { "type": "number" },
"billing_address": { "type": "string" }
},
"required": ["name", "credit_card", "billing_address"]
},
{
"type": "object",
"properties": {
"name": { "type": "string" }
},
"required": ["name"]
}
]
} |
This issue has been automatically marked as stale because it has not had recent activity 😴 |
As we have another issue defining this problem, this union type will not be the focus in this issue. |
🎉 This issue has been resolved in version 0.10.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Reason/Context
Currently we do not iterate schema dependencies. We should iterate them and combine properties/items/types etc together.
should merge it together to give the model:
Reason why
billing_address
is not added to the list of required properties, is that it is a runtime requirement that we cannot do anything about when rendering the model.see more here: http://json-schema.org/understanding-json-schema/reference/object.html#schema-dependencies
The text was updated successfully, but these errors were encountered: