├── .github └── workflows │ ├── check.yml │ └── publish.yml ├── .gitignore ├── .idea └── .gitignore ├── .prettierignore ├── .prettierrc ├── LICENSE ├── README.md ├── example ├── index.ts └── openapi-docs.yml ├── jest.config.js ├── package.json ├── rollup.config.mjs ├── spec ├── custom-components.spec.ts ├── enums.spec.ts ├── generation-sort.spec.ts ├── lib │ └── helpers.ts ├── lodash.spec.ts ├── metadata-overrides.spec.ts ├── modifiers │ ├── branded.spec.ts │ ├── catchall.spec.ts │ ├── custom.spec.ts │ ├── default.spec.ts │ ├── describe.spec.ts │ ├── instanceof.spec.ts │ ├── meta.spec.ts │ ├── nullable.spec.ts │ ├── optional.spec.ts │ ├── pipe.spec.ts │ ├── preprocess.spec.ts │ ├── readonly.spec.ts │ ├── refine.spec.ts │ ├── required.spec.ts │ └── transform.spec.ts ├── openapi-metadata.spec.ts ├── registry.spec.ts ├── routes │ ├── index.spec.ts │ └── parameters.spec.ts ├── separate-zod-instance.spec.ts ├── setup-tests.ts ├── type-definitions │ └── zod-extensions.test-d.ts └── types │ ├── any.spec.ts │ ├── array.spec.ts │ ├── bigint.spec.ts │ ├── date.spec.ts │ ├── discriminated-union.spec.ts │ ├── enum.spec.ts │ ├── intersection.spec.ts │ ├── native-enum.spec.ts │ ├── null.spec.ts │ ├── number.spec.ts │ ├── object-polymorphism.spec.ts │ ├── object.spec.ts │ ├── record.spec.ts │ ├── string-formats.spec.ts │ ├── string.spec.ts │ ├── tuple.spec.ts │ ├── union.spec.ts │ └── unknown.spec.ts ├── src ├── errors.ts ├── index.ts ├── lib │ ├── enum-info.ts │ ├── lodash.ts │ ├── object-set.ts │ └── zod-is-type.ts ├── metadata.ts ├── openapi-generator.ts ├── openapi-metadata.ts ├── openapi-registry.ts ├── transformers │ ├── array.ts │ ├── big-int.ts │ ├── date.ts │ ├── discriminated-union.ts │ ├── enum.ts │ ├── index.ts │ ├── intersection.ts │ ├── literal.ts │ ├── number.ts │ ├── object.ts │ ├── record.ts │ ├── string.ts │ ├── tuple.ts │ └── union.ts ├── types.ts ├── v3.0 │ ├── openapi-generator.ts │ └── specifics.ts ├── v3.1 │ ├── openapi-generator.ts │ └── specifics.ts └── zod-extensions.ts └── tsconfig.json /.github/workflows/check.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/.github/workflows/check.yml -------------------------------------------------------------------------------- /.github/workflows/publish.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/.github/workflows/publish.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/.gitignore -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/.idea/.gitignore -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | /dist 2 | README.md 3 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/.prettierrc -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/README.md -------------------------------------------------------------------------------- /example/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/example/index.ts -------------------------------------------------------------------------------- /example/openapi-docs.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/example/openapi-docs.yml -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/jest.config.js -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/package.json -------------------------------------------------------------------------------- /rollup.config.mjs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/rollup.config.mjs -------------------------------------------------------------------------------- /spec/custom-components.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/spec/custom-components.spec.ts -------------------------------------------------------------------------------- /spec/enums.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/spec/enums.spec.ts -------------------------------------------------------------------------------- /spec/generation-sort.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/spec/generation-sort.spec.ts -------------------------------------------------------------------------------- /spec/lib/helpers.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/spec/lib/helpers.ts -------------------------------------------------------------------------------- /spec/lodash.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/spec/lodash.spec.ts -------------------------------------------------------------------------------- /spec/metadata-overrides.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/spec/metadata-overrides.spec.ts -------------------------------------------------------------------------------- /spec/modifiers/branded.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/spec/modifiers/branded.spec.ts -------------------------------------------------------------------------------- /spec/modifiers/catchall.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/spec/modifiers/catchall.spec.ts -------------------------------------------------------------------------------- /spec/modifiers/custom.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/spec/modifiers/custom.spec.ts -------------------------------------------------------------------------------- /spec/modifiers/default.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/spec/modifiers/default.spec.ts -------------------------------------------------------------------------------- /spec/modifiers/describe.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/spec/modifiers/describe.spec.ts -------------------------------------------------------------------------------- /spec/modifiers/instanceof.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/spec/modifiers/instanceof.spec.ts -------------------------------------------------------------------------------- /spec/modifiers/meta.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/spec/modifiers/meta.spec.ts -------------------------------------------------------------------------------- /spec/modifiers/nullable.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/spec/modifiers/nullable.spec.ts -------------------------------------------------------------------------------- /spec/modifiers/optional.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/spec/modifiers/optional.spec.ts -------------------------------------------------------------------------------- /spec/modifiers/pipe.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/spec/modifiers/pipe.spec.ts -------------------------------------------------------------------------------- /spec/modifiers/preprocess.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/spec/modifiers/preprocess.spec.ts -------------------------------------------------------------------------------- /spec/modifiers/readonly.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/spec/modifiers/readonly.spec.ts -------------------------------------------------------------------------------- /spec/modifiers/refine.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/spec/modifiers/refine.spec.ts -------------------------------------------------------------------------------- /spec/modifiers/required.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/spec/modifiers/required.spec.ts -------------------------------------------------------------------------------- /spec/modifiers/transform.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/spec/modifiers/transform.spec.ts -------------------------------------------------------------------------------- /spec/openapi-metadata.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/spec/openapi-metadata.spec.ts -------------------------------------------------------------------------------- /spec/registry.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/spec/registry.spec.ts -------------------------------------------------------------------------------- /spec/routes/index.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/spec/routes/index.spec.ts -------------------------------------------------------------------------------- /spec/routes/parameters.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/spec/routes/parameters.spec.ts -------------------------------------------------------------------------------- /spec/separate-zod-instance.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/spec/separate-zod-instance.spec.ts -------------------------------------------------------------------------------- /spec/setup-tests.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/spec/setup-tests.ts -------------------------------------------------------------------------------- /spec/type-definitions/zod-extensions.test-d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/spec/type-definitions/zod-extensions.test-d.ts -------------------------------------------------------------------------------- /spec/types/any.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/spec/types/any.spec.ts -------------------------------------------------------------------------------- /spec/types/array.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/spec/types/array.spec.ts -------------------------------------------------------------------------------- /spec/types/bigint.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/spec/types/bigint.spec.ts -------------------------------------------------------------------------------- /spec/types/date.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/spec/types/date.spec.ts -------------------------------------------------------------------------------- /spec/types/discriminated-union.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/spec/types/discriminated-union.spec.ts -------------------------------------------------------------------------------- /spec/types/enum.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/spec/types/enum.spec.ts -------------------------------------------------------------------------------- /spec/types/intersection.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/spec/types/intersection.spec.ts -------------------------------------------------------------------------------- /spec/types/native-enum.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/spec/types/native-enum.spec.ts -------------------------------------------------------------------------------- /spec/types/null.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/spec/types/null.spec.ts -------------------------------------------------------------------------------- /spec/types/number.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/spec/types/number.spec.ts -------------------------------------------------------------------------------- /spec/types/object-polymorphism.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/spec/types/object-polymorphism.spec.ts -------------------------------------------------------------------------------- /spec/types/object.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/spec/types/object.spec.ts -------------------------------------------------------------------------------- /spec/types/record.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/spec/types/record.spec.ts -------------------------------------------------------------------------------- /spec/types/string-formats.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/spec/types/string-formats.spec.ts -------------------------------------------------------------------------------- /spec/types/string.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/spec/types/string.spec.ts -------------------------------------------------------------------------------- /spec/types/tuple.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/spec/types/tuple.spec.ts -------------------------------------------------------------------------------- /spec/types/union.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/spec/types/union.spec.ts -------------------------------------------------------------------------------- /spec/types/unknown.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/spec/types/unknown.spec.ts -------------------------------------------------------------------------------- /src/errors.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/src/errors.ts -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/src/index.ts -------------------------------------------------------------------------------- /src/lib/enum-info.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/src/lib/enum-info.ts -------------------------------------------------------------------------------- /src/lib/lodash.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/src/lib/lodash.ts -------------------------------------------------------------------------------- /src/lib/object-set.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/src/lib/object-set.ts -------------------------------------------------------------------------------- /src/lib/zod-is-type.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/src/lib/zod-is-type.ts -------------------------------------------------------------------------------- /src/metadata.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/src/metadata.ts -------------------------------------------------------------------------------- /src/openapi-generator.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/src/openapi-generator.ts -------------------------------------------------------------------------------- /src/openapi-metadata.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/src/openapi-metadata.ts -------------------------------------------------------------------------------- /src/openapi-registry.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/src/openapi-registry.ts -------------------------------------------------------------------------------- /src/transformers/array.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/src/transformers/array.ts -------------------------------------------------------------------------------- /src/transformers/big-int.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/src/transformers/big-int.ts -------------------------------------------------------------------------------- /src/transformers/date.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/src/transformers/date.ts -------------------------------------------------------------------------------- /src/transformers/discriminated-union.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/src/transformers/discriminated-union.ts -------------------------------------------------------------------------------- /src/transformers/enum.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/src/transformers/enum.ts -------------------------------------------------------------------------------- /src/transformers/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/src/transformers/index.ts -------------------------------------------------------------------------------- /src/transformers/intersection.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/src/transformers/intersection.ts -------------------------------------------------------------------------------- /src/transformers/literal.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/src/transformers/literal.ts -------------------------------------------------------------------------------- /src/transformers/number.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/src/transformers/number.ts -------------------------------------------------------------------------------- /src/transformers/object.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/src/transformers/object.ts -------------------------------------------------------------------------------- /src/transformers/record.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/src/transformers/record.ts -------------------------------------------------------------------------------- /src/transformers/string.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/src/transformers/string.ts -------------------------------------------------------------------------------- /src/transformers/tuple.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/src/transformers/tuple.ts -------------------------------------------------------------------------------- /src/transformers/union.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/src/transformers/union.ts -------------------------------------------------------------------------------- /src/types.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/src/types.ts -------------------------------------------------------------------------------- /src/v3.0/openapi-generator.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/src/v3.0/openapi-generator.ts -------------------------------------------------------------------------------- /src/v3.0/specifics.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/src/v3.0/specifics.ts -------------------------------------------------------------------------------- /src/v3.1/openapi-generator.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/src/v3.1/openapi-generator.ts -------------------------------------------------------------------------------- /src/v3.1/specifics.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/src/v3.1/specifics.ts -------------------------------------------------------------------------------- /src/zod-extensions.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/src/zod-extensions.ts -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asteasolutions/zod-to-openapi/HEAD/tsconfig.json --------------------------------------------------------------------------------