UNPKG

openapi-zod-client-yohoji

Version:

[![Screenshot 2022-11-12 at 18 52 25](https://user-images.githubusercontent.com/47224540/201487856-ffc4c862-6f31-4de1-8ef1-3981fabf3416.png)](https://openapi-zod-client.vercel.app/)

16 lines (15 loc) 1.06 kB
import type { SchemaObject } from "openapi3-ts"; export declare const asComponentSchema: (name: string) => string; export declare function normalizeString(text: string): string; export declare const wrapWithQuotesIfNeeded: (str: string) => string; export declare const pathParamToVariableName: (name: string) => string; export declare const replaceHyphenatedPath: (path: string) => string; /** @example turns `/media-objects/{id}` into `MediaObjectsId` */ export declare const pathToVariableName: (path: string) => string; type SingleType = Exclude<SchemaObject["type"], any[] | undefined>; export declare const isPrimitiveType: (type: SingleType) => type is "string" | "number" | "boolean" | "integer" | "null"; declare const primitiveTypeList: readonly ["string", "number", "integer", "boolean", "null"]; export type PrimitiveType = typeof primitiveTypeList[number]; export declare const escapeControlCharacters: (str: string) => string; export declare const toBoolean: (value: undefined | string | boolean, defaultValue: boolean) => boolean; export {};