-
Notifications
You must be signed in to change notification settings - Fork 419
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
Add a flag into TSchemaToASchema
to distinguish between mappings
or consts
for discriminators.
#3765
Comments
We spent some time trying to fix rendering of coproducts in async api, with no success so far. Looking at Note how this method works - it processes First step works with TSchema instances. From SCoproduct we might extract extract discriminant value and attach it to specific And if trying to do it at second step - its already too late - when converting It should be possible to implement this behavior in And finally just some thought. Looking at schema for the simple data model
TSchema (here pasted as json schema, but it is internally quite close) is:
Look at the marcin |
That's the way inheritance is presented in the OpenAPI docs: https://swagger.io/docs/specification/data-models/inheritance-and-polymorphism/ You might be right that the approach using Btw. if |
Btw. each |
Yes, trying to add I have plan to implement I looked at attributes, but proper type for And for sample from openapi - maybe I'll try to discuss there. To be honest I don't quite get what this whole
All those boil up to having specialized schemas that are incompatible with each other (what either happens naturally, or requires some additional work like additional nesting/discriminator), and Maybe this all is bit too naive - I have experience with just few apis we have developed and tried to describe. |
Follow-up on #3764 (comment)_
The text was updated successfully, but these errors were encountered: