@spailybot/moleculer-auto-openapi
Version:
Generate openapi scheme for moleculer
32 lines (31 loc) • 1.14 kB
TypeScript
import { AliasRouteSchemaOpenApi, definedActionSchema, definedAliasRouteSchemaOpenApi } from '../types/index.js';
import { Route } from './Route.js';
import { ServiceSchema } from 'moleculer';
import { PathAction } from './PathAction.js';
import { ValidationSchema } from 'fastest-validator';
import { HTTP_METHODS, rawHttpMethod } from '../constants.js';
import type { BusboyConfig } from '../types/moleculer-web.js';
export declare class Alias {
fullPath: string;
get path(): string;
set path(value: string);
get method(): rawHttpMethod;
set method(value: string);
readonly route: Route;
type?: string;
private _method;
private _path;
action?: string;
actionSchema?: definedActionSchema & {
params?: ValidationSchema;
};
service?: ServiceSchema;
openapi: definedAliasRouteSchemaOpenApi['openapi'];
skipped: boolean;
readonly busboyConfig?: BusboyConfig<unknown>;
constructor(infos: AliasRouteSchemaOpenApi, route: Route);
isJokerAlias(): boolean;
getMethods(): Array<HTTP_METHODS>;
toJSON(): AliasRouteSchemaOpenApi;
getPaths(): Array<PathAction>;
}