Introduce OpenAPI specs (#4351)
* wip * wip * wip * Update index.ts * Update gen-openapi-spec.ts * Update api.ja-JP.md * Fix * Improve doc * Update gen-openapi-spec.ts * Update redoc.html * Improve doc * Update gen-openapi-spec.ts * Improve doc * Update CHANGELOG.md
This commit is contained in:
@@ -2,18 +2,30 @@ import { Context } from 'cafy';
|
||||
import * as path from 'path';
|
||||
import * as glob from 'glob';
|
||||
|
||||
export type Param = {
|
||||
validator: Context<any>;
|
||||
transform?: any;
|
||||
default?: any;
|
||||
desc?: { [key: string]: string };
|
||||
ref?: string;
|
||||
};
|
||||
|
||||
export interface IEndpointMeta {
|
||||
stability?: string; //'deprecated' | 'experimental' | 'stable';
|
||||
|
||||
desc?: { [key: string]: string };
|
||||
|
||||
tags?: string[];
|
||||
|
||||
params?: {
|
||||
[key: string]: Param;
|
||||
};
|
||||
|
||||
errors?: {
|
||||
[key: string]: {
|
||||
validator: Context<any>;
|
||||
transform?: any;
|
||||
default?: any;
|
||||
desc?: { [key: string]: string };
|
||||
ref?: string;
|
||||
message: string;
|
||||
code: string;
|
||||
id: string;
|
||||
};
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user