astahmer / openapi-zod-client

Generate a zodios (typescript http client with zod validation) from an OpenAPI spec (json/yaml)
openapi-zod-client.vercel.app
795 stars 84 forks source link

[Question] Is there a way to omit some openAPI schemas/endpoints? #299

Open kucher-mx opened 3 months ago

kucher-mx commented 3 months ago

In our project we had all api docs in thunder client, we converted everything to openAPI through postman, and started verifying converted docs, and when we want to get zod from this openAPI file, we are getting everything, is it possible to use some custom field in yaml, that will be present in handlebars template, so we can kinda filter based on this field and get zod only for schemas/endpoints/etc that we need

image

andenacitelli commented 3 months ago

I maintain a package that can handle stripping endpoints: https://github.com/aacitelli/openapi-endpoint-trimmer

It's mentioned in the README.md file of this project.