zod-openapi
Advanced tools
Comparing version 2.2.0-beta.1 to 2.2.0
@@ -1,2 +0,2 @@ | ||
import { createComponentRequestBodyRef } from './components'; | ||
import { createComponentRequestBodyRef, } from './components'; | ||
import { createContent } from './content'; | ||
@@ -3,0 +3,0 @@ import { createParametersObject } from './parameters'; |
import { ZodType } from 'zod'; | ||
import { createComponentResponseRef } from './components'; | ||
import { createComponentResponseRef, } from './components'; | ||
import { createContent } from './content'; | ||
@@ -4,0 +4,0 @@ import { createSchemaOrRef } from './schema'; |
import { ZodType } from 'zod'; | ||
import { oas30, oas31 } from '../openapi3-ts/dist'; | ||
import { ZodOpenApiComponentsObject, ZodOpenApiRequestBodyObject, ZodOpenApiResponseObject, ZodOpenApiVersion } from './document'; | ||
import type { oas30, oas31 } from '../openapi3-ts/dist'; | ||
import type { ZodOpenApiComponentsObject, ZodOpenApiRequestBodyObject, ZodOpenApiResponseObject, ZodOpenApiVersion } from './document'; | ||
export type CreationType = 'input' | 'output'; | ||
@@ -5,0 +5,0 @@ export interface CompleteSchemaComponent extends BaseSchemaComponent { |
@@ -1,4 +0,4 @@ | ||
import { oas31 } from '../openapi3-ts/dist'; | ||
import { ComponentsObject, CreationType } from './components'; | ||
import { ZodOpenApiContentObject } from './document'; | ||
import type { oas31 } from '../openapi3-ts/dist'; | ||
import type { ComponentsObject, CreationType } from './components'; | ||
import type { ZodOpenApiContentObject } from './document'; | ||
export declare const createContent: (contentObject: ZodOpenApiContentObject, components: ComponentsObject, type: CreationType) => oas31.ContentObject; |
@@ -1,4 +0,4 @@ | ||
import { AnyZodObject, ZodType } from 'zod'; | ||
import { OpenApiVersion } from '../openapi'; | ||
import { oas30, oas31 } from '../openapi3-ts/dist'; | ||
import type { AnyZodObject, ZodType } from 'zod'; | ||
import type { OpenApiVersion } from '../openapi'; | ||
import type { oas30, oas31 } from '../openapi3-ts/dist'; | ||
export interface ZodOpenApiMediaTypeObject extends Omit<oas31.MediaTypeObject & oas30.MediaTypeObject, 'schema'> { | ||
@@ -5,0 +5,0 @@ schema?: ZodType | oas31.SchemaObject | oas31.ReferenceObject; |
@@ -1,2 +0,2 @@ | ||
import { ZodType } from 'zod'; | ||
import type { ZodType } from 'zod'; | ||
export declare const throwTransformError: (zodType: ZodType) => never; |
@@ -1,5 +0,5 @@ | ||
import { ZodType } from 'zod'; | ||
import { oas31 } from '../openapi3-ts/dist'; | ||
import { ComponentsObject } from './components'; | ||
import { ZodOpenApiParameters } from './document'; | ||
import type { ZodType } from 'zod'; | ||
import type { oas31 } from '../openapi3-ts/dist'; | ||
import type { ComponentsObject } from './components'; | ||
import type { ZodOpenApiParameters } from './document'; | ||
export declare const createComponentParamRef: (ref: string) => string; | ||
@@ -6,0 +6,0 @@ export declare const createBaseParameter: (schema: ZodType, components: ComponentsObject) => oas31.BaseParameterObject; |
@@ -1,5 +0,5 @@ | ||
import { oas31 } from '../openapi3-ts/dist'; | ||
import { ComponentsObject } from './components'; | ||
import { ZodOpenApiPathsObject, ZodOpenApiRequestBodyObject } from './document'; | ||
import type { oas31 } from '../openapi3-ts/dist'; | ||
import { type ComponentsObject } from './components'; | ||
import type { ZodOpenApiPathsObject, ZodOpenApiRequestBodyObject } from './document'; | ||
export declare const createRequestBody: (requestBodyObject: ZodOpenApiRequestBodyObject | undefined, components: ComponentsObject) => oas31.ReferenceObject | oas31.RequestBodyObject | undefined; | ||
export declare const createPaths: (pathsObject: ZodOpenApiPathsObject | undefined, components: ComponentsObject) => oas31.PathsObject | undefined; |
@@ -1,5 +0,5 @@ | ||
import { AnyZodObject, ZodType } from 'zod'; | ||
import { oas30, oas31 } from '../openapi3-ts/dist'; | ||
import { ComponentsObject } from './components'; | ||
import { ZodOpenApiResponseObject, ZodOpenApiResponsesObject } from './document'; | ||
import { type AnyZodObject, ZodType } from 'zod'; | ||
import type { oas30, oas31 } from '../openapi3-ts/dist'; | ||
import { type ComponentsObject } from './components'; | ||
import type { ZodOpenApiResponseObject, ZodOpenApiResponsesObject } from './document'; | ||
export declare const createResponseHeaders: (responseHeaders: oas31.HeadersObject | oas30.HeadersObject | AnyZodObject | undefined, components: ComponentsObject) => oas31.ResponseObject['headers']; | ||
@@ -6,0 +6,0 @@ export declare const createHeaderOrRef: (schema: ZodType, components: ComponentsObject) => oas31.BaseParameterObject | oas31.ReferenceObject; |
@@ -1,4 +0,4 @@ | ||
import { ZodArray } from 'zod'; | ||
import { oas31 } from '../../openapi3-ts/dist'; | ||
import { SchemaState } from '.'; | ||
import type { ZodArray } from 'zod'; | ||
import type { oas31 } from '../../openapi3-ts/dist'; | ||
import { type SchemaState } from '.'; | ||
export declare const createArraySchema: (zodArray: ZodArray<any, any>, state: SchemaState) => oas31.SchemaObject; |
@@ -1,3 +0,3 @@ | ||
import { ZodBoolean } from 'zod'; | ||
import { oas31 } from '../../openapi3-ts/dist'; | ||
import type { ZodBoolean } from 'zod'; | ||
import type { oas31 } from '../../openapi3-ts/dist'; | ||
export declare const createBooleanSchema: (_zodBoolean: ZodBoolean) => oas31.SchemaObject; |
@@ -1,4 +0,4 @@ | ||
import { ZodBranded } from 'zod'; | ||
import { oas31 } from '../../openapi3-ts/dist'; | ||
import { SchemaState } from '.'; | ||
import type { ZodBranded } from 'zod'; | ||
import type { oas31 } from '../../openapi3-ts/dist'; | ||
import { type SchemaState } from '.'; | ||
export declare const createBrandedSchema: (zodBranded: ZodBranded<any, any>, state: SchemaState) => oas31.SchemaObject | oas31.ReferenceObject; |
@@ -1,4 +0,4 @@ | ||
import { ZodCatch } from 'zod'; | ||
import { oas31 } from '../../openapi3-ts/dist'; | ||
import { SchemaState } from '.'; | ||
import type { ZodCatch } from 'zod'; | ||
import type { oas31 } from '../../openapi3-ts/dist'; | ||
import { type SchemaState } from '.'; | ||
export declare const createCatchSchema: (zodCatch: ZodCatch<any>, state: SchemaState) => oas31.SchemaObject | oas31.ReferenceObject; |
@@ -1,3 +0,3 @@ | ||
import { ZodDate } from 'zod'; | ||
import { oas31 } from '../../openapi3-ts/dist'; | ||
import type { ZodDate } from 'zod'; | ||
import type { oas31 } from '../../openapi3-ts/dist'; | ||
export declare const createDateSchema: (_zodDate: ZodDate) => oas31.SchemaObject; |
@@ -1,4 +0,4 @@ | ||
import { ZodDefault } from 'zod'; | ||
import { oas31 } from '../../openapi3-ts/dist'; | ||
import { SchemaState } from '.'; | ||
import type { ZodDefault } from 'zod'; | ||
import type { oas31 } from '../../openapi3-ts/dist'; | ||
import { type SchemaState } from '.'; | ||
export declare const createDefaultSchema: (zodDefault: ZodDefault<any>, state: SchemaState) => oas31.SchemaObject | oas31.ReferenceObject; |
@@ -1,5 +0,5 @@ | ||
import { AnyZodObject, ZodDiscriminatedUnion } from 'zod'; | ||
import { oas31 } from '../../openapi3-ts/dist'; | ||
import { SchemaState } from '.'; | ||
import { type AnyZodObject, type ZodDiscriminatedUnion } from 'zod'; | ||
import type { oas31 } from '../../openapi3-ts/dist'; | ||
import { type SchemaState } from '.'; | ||
export declare const createDiscriminatedUnionSchema: (zodDiscriminatedUnion: ZodDiscriminatedUnion<any, any>, state: SchemaState) => oas31.SchemaObject; | ||
export declare const mapDiscriminator: (schemas: (oas31.SchemaObject | oas31.ReferenceObject)[], zodObjects: AnyZodObject[], discriminator: unknown) => oas31.SchemaObject['discriminator']; |
@@ -1,3 +0,3 @@ | ||
import { ZodEnum } from 'zod'; | ||
import { oas31 } from '../../openapi3-ts/dist'; | ||
import type { ZodEnum } from 'zod'; | ||
import type { oas31 } from '../../openapi3-ts/dist'; | ||
export declare const createEnumSchema: (zodEnum: ZodEnum<any>) => oas31.SchemaObject; |
@@ -1,4 +0,4 @@ | ||
import { ZodType, ZodTypeDef } from 'zod'; | ||
import { oas31 } from '../../openapi3-ts/dist'; | ||
import { ComponentsObject, CreationType } from '../components'; | ||
import { type ZodType, type ZodTypeDef } from 'zod'; | ||
import type { oas31 } from '../../openapi3-ts/dist'; | ||
import { type ComponentsObject, type CreationType } from '../components'; | ||
export interface SchemaState { | ||
@@ -5,0 +5,0 @@ components: ComponentsObject; |
@@ -1,4 +0,4 @@ | ||
import { ZodIntersection } from 'zod'; | ||
import { oas31 } from '../../openapi3-ts/dist'; | ||
import { SchemaState } from '.'; | ||
import type { ZodIntersection } from 'zod'; | ||
import type { oas31 } from '../../openapi3-ts/dist'; | ||
import { type SchemaState } from '.'; | ||
export declare const createIntersectionSchema: (zodIntersection: ZodIntersection<any, any>, state: SchemaState) => oas31.SchemaObject | oas31.ReferenceObject; |
@@ -1,4 +0,4 @@ | ||
import { ZodLazy } from 'zod'; | ||
import { oas31 } from '../../openapi3-ts/dist'; | ||
import { SchemaState } from '.'; | ||
import type { ZodLazy } from 'zod'; | ||
import type { oas31 } from '../../openapi3-ts/dist'; | ||
import { type SchemaState } from '.'; | ||
export declare const createLazySchema: (zodLazy: ZodLazy<any>, state: SchemaState) => oas31.ReferenceObject | oas31.SchemaObject; |
@@ -1,3 +0,3 @@ | ||
import { ZodLiteral } from 'zod'; | ||
import { oas31 } from '../../openapi3-ts/dist'; | ||
import type { ZodLiteral } from 'zod'; | ||
import type { oas31 } from '../../openapi3-ts/dist'; | ||
export declare const createLiteralSchema: (zodLiteral: ZodLiteral<any>) => oas31.SchemaObject; |
@@ -1,3 +0,3 @@ | ||
import { ZodType, ZodTypeDef } from 'zod'; | ||
import { oas31 } from '../../openapi3-ts/dist'; | ||
import { type ZodType, type ZodTypeDef } from 'zod'; | ||
import type { oas31 } from '../../openapi3-ts/dist'; | ||
export declare const createManualTypeSchema: <Output = any, Def extends ZodTypeDef = ZodTypeDef, Input = Output>(zodSchema: ZodType<Output, Def, Input>) => oas31.SchemaObject; |
@@ -1,5 +0,5 @@ | ||
import { ZodType, ZodTypeDef } from 'zod'; | ||
import { oas31 } from '../../openapi3-ts/dist'; | ||
import { SchemaState } from '.'; | ||
import type { ZodType, ZodTypeDef } from 'zod'; | ||
import type { oas31 } from '../../openapi3-ts/dist'; | ||
import { type SchemaState } from '.'; | ||
export declare const createSchemaWithMetadata: <Output = any, Def extends ZodTypeDef = ZodTypeDef, Input = Output>(zodSchema: ZodType<Output, Def, Input>, state: SchemaState) => oas31.SchemaObject | oas31.ReferenceObject; | ||
export declare const enhanceWithMetadata: (schemaOrRef: oas31.SchemaObject | oas31.ReferenceObject, metadata: oas31.SchemaObject | oas31.ReferenceObject) => oas31.SchemaObject | oas31.ReferenceObject; |
@@ -1,4 +0,4 @@ | ||
import { EnumLike, ZodNativeEnum } from 'zod'; | ||
import { oas31 } from '../../openapi3-ts/dist'; | ||
import { SchemaState } from '.'; | ||
import type { EnumLike, ZodNativeEnum } from 'zod'; | ||
import type { oas31 } from '../../openapi3-ts/dist'; | ||
import type { SchemaState } from '.'; | ||
export declare const createNativeEnumSchema: <T extends EnumLike>(zodEnum: ZodNativeEnum<T>, state: SchemaState) => oas31.SchemaObject | oas31.ReferenceObject; | ||
@@ -5,0 +5,0 @@ interface StringsAndNumbers { |
@@ -1,3 +0,3 @@ | ||
import { ZodNull } from 'zod'; | ||
import { oas31 } from '../../openapi3-ts/dist'; | ||
import type { ZodNull } from 'zod'; | ||
import type { oas31 } from '../../openapi3-ts/dist'; | ||
export declare const createNullSchema: (_zodNull: ZodNull) => oas31.SchemaObject; |
@@ -1,4 +0,4 @@ | ||
import { ZodNullable } from 'zod'; | ||
import { oas31 } from '../../openapi3-ts/dist'; | ||
import { SchemaState } from '.'; | ||
import type { ZodNullable } from 'zod'; | ||
import type { oas31 } from '../../openapi3-ts/dist'; | ||
import { type SchemaState } from '.'; | ||
export declare const createNullableSchema: (zodNullable: ZodNullable<any>, state: SchemaState) => oas31.SchemaObject; |
@@ -1,5 +0,5 @@ | ||
import { ZodNumber, ZodNumberCheck } from 'zod'; | ||
import { oas30, oas31 } from '../../openapi3-ts/dist'; | ||
import { ZodOpenApiVersion } from '../document'; | ||
import { SchemaState } from '.'; | ||
import type { ZodNumber, ZodNumberCheck } from 'zod'; | ||
import type { oas30, oas31 } from '../../openapi3-ts/dist'; | ||
import type { ZodOpenApiVersion } from '../document'; | ||
import type { SchemaState } from '.'; | ||
export declare const createNumberSchema: (zodNumber: ZodNumber, state: SchemaState) => oas31.SchemaObject; | ||
@@ -6,0 +6,0 @@ export declare const mapNumberChecks: () => void; |
@@ -1,4 +0,4 @@ | ||
import { UnknownKeysParam, ZodObject, ZodRawShape, ZodType } from 'zod'; | ||
import { oas31 } from '../../openapi3-ts/dist'; | ||
import { SchemaState } from '.'; | ||
import { type UnknownKeysParam, type ZodObject, type ZodRawShape, type ZodType } from 'zod'; | ||
import type { oas31 } from '../../openapi3-ts/dist'; | ||
import { type SchemaState } from '.'; | ||
export declare const createObjectSchema: <T extends ZodRawShape, UnknownKeys extends UnknownKeysParam = UnknownKeysParam>(zodObject: ZodObject<T, UnknownKeys, any, any, any>, state: SchemaState) => oas31.SchemaObject; | ||
@@ -5,0 +5,0 @@ export declare const createExtendedSchema: (zodObject: ZodObject<any, any, any, any, any>, baseZodObject: ZodObject<any, any, any, any, any> | undefined, state: SchemaState) => oas31.SchemaObject | undefined; |
@@ -1,4 +0,4 @@ | ||
import { ZodOptional } from 'zod'; | ||
import { oas31 } from '../../openapi3-ts/dist'; | ||
import { SchemaState } from '.'; | ||
import type { ZodOptional } from 'zod'; | ||
import type { oas31 } from '../../openapi3-ts/dist'; | ||
import { type SchemaState } from '.'; | ||
export declare const createOptionalSchema: (zodOptional: ZodOptional<any>, state: SchemaState) => oas31.SchemaObject | oas31.ReferenceObject; |
@@ -1,4 +0,4 @@ | ||
import { ZodPipeline } from 'zod'; | ||
import { oas31 } from '../../openapi3-ts/dist'; | ||
import { SchemaState } from '.'; | ||
import type { ZodPipeline } from 'zod'; | ||
import type { oas31 } from '../../openapi3-ts/dist'; | ||
import { type SchemaState } from '.'; | ||
export declare const createPipelineSchema: (zodPipeline: ZodPipeline<any, any>, state: SchemaState) => oas31.SchemaObject | oas31.ReferenceObject; |
@@ -1,4 +0,4 @@ | ||
import { ZodEffects } from 'zod'; | ||
import { oas31 } from '../../openapi3-ts/dist'; | ||
import { SchemaState } from '.'; | ||
import type { ZodEffects } from 'zod'; | ||
import type { oas31 } from '../../openapi3-ts/dist'; | ||
import { type SchemaState } from '.'; | ||
export declare const createPreprocessSchema: (zodPreprocess: ZodEffects<any, any, any>, state: SchemaState) => oas31.SchemaObject | oas31.ReferenceObject; |
@@ -1,4 +0,4 @@ | ||
import { ZodRecord } from 'zod'; | ||
import { oas31 } from '../../openapi3-ts/dist'; | ||
import { SchemaState } from '.'; | ||
import type { ZodRecord } from 'zod'; | ||
import type { oas31 } from '../../openapi3-ts/dist'; | ||
import { type SchemaState } from '.'; | ||
export declare const createRecordSchema: (zodRecord: ZodRecord<any, any>, state: SchemaState) => oas31.SchemaObject; |
@@ -1,4 +0,4 @@ | ||
import { ZodEffects } from 'zod'; | ||
import { oas31 } from '../../openapi3-ts/dist'; | ||
import { SchemaState } from '.'; | ||
import type { ZodEffects } from 'zod'; | ||
import type { oas31 } from '../../openapi3-ts/dist'; | ||
import { type SchemaState } from '.'; | ||
export declare const createRefineSchema: (zodRefine: ZodEffects<any, any, any>, state: SchemaState) => oas31.SchemaObject | oas31.ReferenceObject; |
@@ -1,3 +0,3 @@ | ||
import { ZodString } from 'zod'; | ||
import { oas31 } from '../../openapi3-ts/dist'; | ||
import type { ZodString } from 'zod'; | ||
import type { oas31 } from '../../openapi3-ts/dist'; | ||
export declare const createStringSchema: (zodString: ZodString) => oas31.SchemaObject; |
@@ -1,4 +0,4 @@ | ||
import { ZodEffects } from 'zod'; | ||
import { oas31 } from '../../openapi3-ts/dist'; | ||
import { SchemaState } from '.'; | ||
import type { ZodEffects } from 'zod'; | ||
import type { oas31 } from '../../openapi3-ts/dist'; | ||
import { type SchemaState } from '.'; | ||
export declare const createTransformSchema: (zodTransform: ZodEffects<any, any, any>, state: SchemaState) => oas31.SchemaObject | oas31.ReferenceObject; |
@@ -1,4 +0,4 @@ | ||
import { ZodTuple } from 'zod'; | ||
import { oas31 } from '../../openapi3-ts/dist'; | ||
import { SchemaState } from '.'; | ||
import type { ZodTuple } from 'zod'; | ||
import type { oas31 } from '../../openapi3-ts/dist'; | ||
import { type SchemaState } from '.'; | ||
export declare const createTupleSchema: (zodTuple: ZodTuple<any, any>, state: SchemaState) => oas31.SchemaObject; |
@@ -1,4 +0,4 @@ | ||
import { ZodUnion } from 'zod'; | ||
import { oas31 } from '../../openapi3-ts/dist'; | ||
import { SchemaState } from '.'; | ||
import type { ZodUnion } from 'zod'; | ||
import type { oas31 } from '../../openapi3-ts/dist'; | ||
import { type SchemaState } from '.'; | ||
export declare const createUnionSchema: (zodUnion: ZodUnion<any>, state: SchemaState) => oas31.SchemaObject; |
@@ -1,3 +0,3 @@ | ||
import { ZodUnknown } from 'zod'; | ||
import { oas31 } from '../../openapi3-ts/dist'; | ||
import type { ZodUnknown } from 'zod'; | ||
import type { oas31 } from '../../openapi3-ts/dist'; | ||
export declare const createUnknownSchema: (_zodUnknown: ZodUnknown) => oas31.SchemaObject; |
@@ -1,4 +0,4 @@ | ||
import { UnknownKeysParam, ZodDate, ZodObject, ZodRawShape, ZodTypeAny, z } from 'zod'; | ||
import { CreationType } from './create/components'; | ||
import { oas30, oas31 } from './openapi3-ts/dist'; | ||
import type { UnknownKeysParam, ZodDate, ZodObject, ZodRawShape, ZodTypeAny, z } from 'zod'; | ||
import type { CreationType } from './create/components'; | ||
import type { oas30, oas31 } from './openapi3-ts/dist'; | ||
type SchemaObject = oas30.SchemaObject & oas31.SchemaObject; | ||
@@ -5,0 +5,0 @@ interface ZodOpenApiMetadata<T extends ZodTypeAny, TInferred = z.input<T> | z.output<T>> extends SchemaObject { |
{ | ||
"name": "zod-openapi", | ||
"version": "2.2.0-beta.1", | ||
"version": "2.2.0", | ||
"description": "A library to create full OpenAPI documents from your Zod types", | ||
@@ -41,3 +41,3 @@ "homepage": "https://github.com/samchungy/zod-openapi#readme", | ||
"openapi3-ts": "^4.1.2", | ||
"skuba": "6.0.2", | ||
"skuba": "6.1.0", | ||
"yaml": "2.2.2", | ||
@@ -44,0 +44,0 @@ "zod": "3.21.4" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
294336
0