orval is able to generate client with appropriate type-signatures (TypeScript) from any valid OpenAPI v3 or Swagger v2 specification, either in yaml or json formats. 🍺
Look at the types generated. Names like ListOfActivitiesResponseAnyOfDataAnyOfItemAnyOfAttributesAnyOfDataAnyOfItemAnyOfTargetAnyOfId are pretty common. OpenAPI schema for the given example has NO anyOf conditions.
What were you expecting to happen?
If an OpenAPI spec has no anyOf condition I don't expect to see them on my types. So the expected type name would be:
ListOfActivitiesResponseDataItemAttributesDataItemTargetId
Any logs, error output, etc?
-
Any other comments?
It's an issue because nearly every single generated file has a decent amount of AnyOf.
I know that the project is looking for contributors, so I would appreciate minimal guidance on where to start my search for a solution. Maybe it's a configuration issue? Please let me know.
What versions are you using?
orval@6.28.2
Please execute npx envinfo --system --npmPackages orval,zod,axios,msw,swr,@tanstack/react-query,@tanstack/vue-query,react,vue and paste the results here.
System:
OS: macOS 14.6.1
CPU: (12) arm64 Apple M3 Pro
Memory: 94.64 MB / 36.00 GB
Shell: 5.9 - /bin/zsh
What are the steps to reproduce this issue?
What happens?
Look at the types generated. Names like
ListOfActivitiesResponseAnyOfDataAnyOfItemAnyOfAttributesAnyOfDataAnyOfItemAnyOfTargetAnyOfId
are pretty common. OpenAPI schema for the given example has NOanyOf
conditions.What were you expecting to happen?
If an OpenAPI spec has no
anyOf
condition I don't expect to see them on my types. So the expected type name would be:ListOfActivitiesResponseDataItemAttributesDataItemTargetId
Any logs, error output, etc?
-
Any other comments?
It's an issue because nearly every single generated file has a decent amount of
AnyOf
.I know that the project is looking for contributors, so I would appreciate minimal guidance on where to start my search for a solution. Maybe it's a configuration issue? Please let me know.
What versions are you using?
orval@6.28.2
Please execute
npx envinfo --system --npmPackages orval,zod,axios,msw,swr,@tanstack/react-query,@tanstack/vue-query,react,vue
and paste the results here.