@povio/openapi-codegen-cli
Version:
**NOTE:** This CLI tool is primarily designed for use within our organization. The generated code output aligns with our internal template. If you are using this tool without our internal template, make sure to use it in **standalone** mode.
24 lines (23 loc) • 1.76 kB
TypeScript
import { ALLOWED_PARAM_MEDIA_TYPES } from "src/generators/const/openapi.const";
import { ParameterObject, PrimitiveType, SingleType, SortingParameterObject } from "src/generators/types/openapi";
export declare const getSchemaRef: (schemaName: string) => string;
export declare const autocorrectRef: (ref: string) => string;
export declare const getSchemaNameByRef: (ref: string) => string;
export declare function normalizeString(text: string): string;
export declare function wrapWithQuotesIfNeeded(str: string): string;
export declare function unwrapQuotesIfNeeded(value: string | number): string | number;
export declare function pathParamToVariableName(name: string): string;
export declare const isPrimitiveType: (type: SingleType | undefined) => type is PrimitiveType;
export declare function escapeControlCharacters(str: string): string;
export declare const toBoolean: (value: undefined | string | boolean, defaultValue: boolean) => boolean;
export declare function isParamMediaTypeAllowed(mediaType: string): mediaType is (typeof ALLOWED_PARAM_MEDIA_TYPES)[number] | `application/${string}json${string}` | `text/${string}`;
export declare function isMainResponseStatus(status: number): boolean;
export declare function isErrorStatus(status: number): boolean;
export declare function isMediaTypeAllowed(mediaType: string): boolean;
/** @example turns `/media-objects/{id}` into `MediaObjectsById` */
export declare function pathToVariableName(path: string): string;
export declare function replaceHyphenatedPath(path: string): string;
export declare const isSortingParameterObject: (param: ParameterObject) => param is SortingParameterObject;
export declare const isPathExcluded: (path: string, options: {
excludePathRegex: string;
}) => boolean;