You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using this module to generate schema near existing HTTP handler code (like a minimal version of swaggest/rest). Trying to use oneOf in a request body which works fine using JSONSchemaOneOf. But I can't seem to crack an easy or straightforward way to set discriminator as described here.
I see that Schema has Discriminator on it but I'm not quite sure how to get there from something like this.
I tried implementing jsonschema.Preparer and Exposer but don't think I can influence discriminator that way.
Assuming I'm not missing something (apologies if I am!), would some better support for this be good? I could see discriminator tag support somewhere to set propertyName. But it would probably also be good to support mapping as well.
Happy to try putting a PR together if there's a direction you'd like to go.
Thanks again!
The text was updated successfully, but these errors were encountered:
Hi there, thanks for this family of modules.
I'm using this module to generate schema near existing HTTP handler code (like a minimal version of swaggest/rest). Trying to use oneOf in a request body which works fine using JSONSchemaOneOf. But I can't seem to crack an easy or straightforward way to set
discriminator
as described here.I see that Schema has Discriminator on it but I'm not quite sure how to get there from something like this.
I tried implementing jsonschema.Preparer and Exposer but don't think I can influence discriminator that way.
Assuming I'm not missing something (apologies if I am!), would some better support for this be good? I could see
discriminator
tag support somewhere to setpropertyName
. But it would probably also be good to supportmapping
as well.Happy to try putting a PR together if there's a direction you'd like to go.
Thanks again!
The text was updated successfully, but these errors were encountered: