@infinite-debugger/swagger-to-ts
Version:
swagger-to-ts is a powerful library that allows you to generate TypeScript code from Swagger documentation or OpenAPI specifications. It simplifies the process of integrating API definitions into your TypeScript projects, saving you time and effort.
159 lines (158 loc) • 3.37 kB
TypeScript
import { z } from 'zod';
import { Schema, StringSchema } from './Schema';
export declare const JSONContentValidationSchema: z.ZodObject<{
'application/json': z.ZodObject<{
schema: z.ZodOptional<z.ZodAny>;
}, "strip", z.ZodTypeAny, {
schema?: any;
}, {
schema?: any;
}>;
}, "strip", z.ZodTypeAny, {
'application/json': {
schema?: any;
};
}, {
'application/json': {
schema?: any;
};
}>;
export type JSONContent = {
'application/json': {
schema?: Schema;
};
};
export declare const PDFContentValidationSchema: z.ZodObject<{
'application/pdf': z.ZodObject<{
schema: z.ZodOptional<z.ZodAny>;
}, "strip", z.ZodTypeAny, {
schema?: any;
}, {
schema?: any;
}>;
}, "strip", z.ZodTypeAny, {
'application/pdf': {
schema?: any;
};
}, {
'application/pdf': {
schema?: any;
};
}>;
export type PDFContent = {
'application/pdf': {
schema?: any;
};
};
export declare const PNGContentValidationSchema: z.ZodObject<{
'image/png': z.ZodObject<{
schema: z.ZodOptional<z.ZodAny>;
}, "strip", z.ZodTypeAny, {
schema?: any;
}, {
schema?: any;
}>;
}, "strip", z.ZodTypeAny, {
'image/png': {
schema?: any;
};
}, {
'image/png': {
schema?: any;
};
}>;
export type PNGContent = {
'image/png': {
schema?: any;
};
};
export declare const XMLContentValidationSchema: z.ZodObject<{
'application/xml': z.ZodObject<{
schema: z.ZodAny;
}, "strip", z.ZodTypeAny, {
schema?: any;
}, {
schema?: any;
}>;
}, "strip", z.ZodTypeAny, {
'application/xml': {
schema?: any;
};
}, {
'application/xml': {
schema?: any;
};
}>;
export type XMLContent = {
'application/xml': {
schema: StringSchema;
};
};
export declare const HTMLContentValidationSchema: z.ZodObject<{
'text/html': z.ZodObject<{
schema: z.ZodAny;
}, "strip", z.ZodTypeAny, {
schema?: any;
}, {
schema?: any;
}>;
}, "strip", z.ZodTypeAny, {
'text/html': {
schema?: any;
};
}, {
'text/html': {
schema?: any;
};
}>;
export type HTMLContent = {
'text/html': {
schema: StringSchema;
};
};
export declare const CSVContentValidationSchema: z.ZodObject<{
'text/csv': z.ZodObject<{
schema: z.ZodAny;
}, "strip", z.ZodTypeAny, {
schema?: any;
}, {
schema?: any;
}>;
}, "strip", z.ZodTypeAny, {
'text/csv': {
schema?: any;
};
}, {
'text/csv': {
schema?: any;
};
}>;
export type CSVContent = {
'text/csv': {
schema: StringSchema;
};
};
export declare const GenericContentValidationSchema: z.ZodObject<{
'*/*': z.ZodObject<{
schema: z.ZodOptional<z.ZodAny>;
}, "strip", z.ZodTypeAny, {
schema?: any;
}, {
schema?: any;
}>;
}, "strip", z.ZodTypeAny, {
'*/*': {
schema?: any;
};
}, {
'*/*': {
schema?: any;
};
}>;
export type GenericContent = {
'*/*': {
schema?: any;
};
};
export declare const ContentValidationSchema: any;
export type Content = Partial<JSONContent & PNGContent & PDFContent & XMLContent & HTMLContent & CSVContent & GenericContent>;