@spailybot/moleculer-auto-openapi
Version:
Generate openapi scheme for moleculer
52 lines (51 loc) • 2.2 kB
TypeScript
export declare const UNRESOLVED_ACTION_NAME = "unknown-action";
export declare const EOAOperationsExtensions: {
readonly server: "x-moleculer-web-server";
};
export declare const EOASchemaExtensions: {
readonly optional: "x-fastest-optional";
readonly description: "x-fastest-description";
readonly summary: "x-fastest-summary";
readonly deprecated: "x-fastest-deprecated";
};
export declare const EOAExtensions: {
readonly optional: "x-fastest-optional";
readonly description: "x-fastest-description";
readonly summary: "x-fastest-summary";
readonly deprecated: "x-fastest-deprecated";
readonly server: "x-moleculer-web-server";
};
export declare enum HTTP_METHODS {
GET = "get",
PUT = "put",
POST = "post",
DELETE = "delete",
OPTIONS = "options",
HEAD = "head",
PATCH = "patch",
TRACE = "trace"
}
export declare const OPENAPI_VERSIONS_SUPPORTED: readonly ["3.1"];
export type OpenApiVersionsSupported = (typeof OPENAPI_VERSIONS_SUPPORTED)[number];
export declare const DEFAULT_OPENAPI_VERSION: OpenApiVersionsSupported;
export declare const HTTP_METHODS_ARRAY: HTTP_METHODS[];
export declare const methodIsHttpMethod: (method: string) => method is HTTP_METHODS;
export declare const JOKER_METHOD: "*";
export declare const REST_METHOD: "rest";
export declare const multiOAProperties: readonly ["oneOf", "allOf", "anyOf"];
export type rawHttpMethod = HTTP_METHODS | typeof JOKER_METHOD;
export type rawHttpMethodFromMWeb = HTTP_METHODS | typeof JOKER_METHOD | typeof REST_METHOD;
export declare const ALLOWING_BODY_METHODS: Array<HTTP_METHODS>;
export declare const DISALLOWING_BODY_METHODS: Array<HTTP_METHODS>;
export declare const DEFAULT_CONTENT_TYPE = "application/json";
export declare const DEFAULT_MULTI_PART_FIELD_NAME = "file";
export declare const DEFAULT_SUMMARY_TEMPLATE = "{{summary}}\n ({{action}}){{autoAlias}}";
export declare const DEFAULT_SWAGGER_UI_DIST = "//unpkg.com/swagger-ui-dist";
export declare const OA_NAME_REGEXP: RegExp;
export declare const BODY_PARSERS_CONTENT_TYPE: {
json: string[];
urlencoded: string[];
text: string[];
multipart: string[];
stream: string[];
};