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
Hi folks! Love the project, the client feels much nicer to use than the "official" openapi typescript-fetch generator.
I'm not sure if this is a feature request or a bug report, but I'm marking it as a feature request just in case it was left out intentionally. It feels that way since I get a warning when generating the client:
❗️ Transformers warning: schema {"items":[{"type":"string"},{"type":"boolean"},{"type":"number"}],"logicalOperator":"or"} is too complex and won't be currently processed. This will likely produce an incomplete transformer which is not what you want. Please open an issue if you'd like this improved https://github.com/hey-api/openapi-ts/issues
I saw that but I wasn't sure if it was the same issue as my code generates the same with or without the discriminators, and it's about primitives instead of refs. I do not get the union code from #1561 in any configuration.
If you think they're related I can post there and close this one :)
Description
Hi folks! Love the project, the client feels much nicer to use than the "official" openapi typescript-fetch generator.
I'm not sure if this is a feature request or a bug report, but I'm marking it as a feature request just in case it was left out intentionally. It feels that way since I get a warning when generating the client:
I have an openapi schema that looks like this:
I would expect the type to be something like this:
so that we can perform type narrowing on
switch(setting.field_type)
for example.Instead I get this:
which forces me to do a lot of explicit type checking of the setting_value in practice.
Is there any way we can get better support for oneOf's with discriminators and/or with primitive types?
The client code ends up looking the same if I leave out the discriminator, so it seems like it might not even be getting read/applied?
The text was updated successfully, but these errors were encountered: