Missing endpoints when parsing OpenAPI 3.0.3 schema
micah-redwood opened this issue · comments
Hi, first of thanks for this really nifty library.
I've been using openapi-typescript
to transform an OpenAPI 3.0.3 schema into Typescript types, and am working on migrating to using your library instead to generate a Zodios client. Unfortunately, when I do this most of the API endpoints in the OpenAPI schema are not added to Zodios. Same thing happens when I use the playground. I'm guessing there's a part of the OpenAPI schema that openapi-typescript
supports but this library doesn't support yet?
Here are the files I'm working with, generated from the Sortly REST API. I appended .txt
so Github would let me upload them.
https://sortlyapi.docs.apiary.io/
- Sortly API Blueprint: sortlyapi.apib.txt
- Converted to OpenAPI 3.0.3 JSON schema using
npx apib2swagger
: sortly-openapi.json.txt
Thanks!
hey, this is because most of your endpoints don't have a "schema" object on the MediaTypeObject
(xxx.content[yyy].schema
<- should be here) and it hasn't been handled nor requested yet, surprisingly
i'll publish a fix soon ! sorry for the inconvenience
just released it on openapi-zod-client@1.5.0
you can also try it on the playground https://openapi-zod-client.vercel.app/
Awesome, thanks @astahmer !