Open tkf-ordeno opened 1 month ago
On a related note - I manually edited the operationIds in the JSON, but when I generated the TypeScript models again with https://github.com/openapi-ts/openapi-typescript/tree/main/packages/openapi-typescript
Then the following Storefront Swagger JSON snippet:
For the endpoint /umbraco/commerce/storefront/api/v1/store/{idOrAlias}
Will generate the following TypeScript:
Which will make values like Billing-Country impossible to assign a value in TypeScript. Maybe avoid oneOf for simple string values?
Thanks for reporting this. We have learned a lot since creating the Storefront API where this wasn't originally taken into account. Given this would be considered a breaking change however, we will only be able to address this in v15. I believe this should already be resolved in the v15 codebase, but I'll leave this open until we make a release.
Describe the bug I was generating TypeScript models with the Storefront Swagger JSON and got this error:
And looking at the Swagger docs this is also documented at https://swagger.io/docs/specification/paths-and-operations/
When inspecting the Storefront swagger.json it seems the operationIds that has duplicates is
Umbraco Commerce version: Umbraco.Commerce 14.0