-
-
Notifications
You must be signed in to change notification settings - Fork 424
Open
Description
Jsonschema allows for the definition of custom vocabularies which may or may not be supported by tooling like this project. Let's say I have something like this
{
"type": "object",
"properties": {
"ibanFormat": {
"type": "boolean",
"description": "Indicates that the instance must be a valid IBAN."
}
}as a meta-schema which I'd somehow bind into my actual schema in order to use it like so:
{
"properties": {
"my_iban": {
"title": "My Iban",
"type": "string",
"ibanFormat": true
}
},
"required": [
"my_iban"
],
"title": "Foo",
"type": "object"
}How could I tell datamodel-code-generator that there is some type that satisfies this condition? What would be the constraints to fulfill this, do I need to provide a function that'd be used as a validator, or a complete type that inherits from pydantic.Baseclass? And how would I plug them in?
Metadata
Metadata
Assignees
Labels
No labels