vulcain-corejs
Version:
Vulcain micro-service framework
47 lines (46 loc) • 1.99 kB
TypeScript
import { IContainer } from '../../di/resolvers';
import { Domain } from '../../schemas/domain';
import { SwaggerApiDefinition } from './swaggerApiDefinition';
import { IScopedComponent } from '../../di/annotations';
import { IRequestContext } from '../../pipeline/common';
import { ServiceDescription } from '../../pipeline/handlers/descriptions/serviceDescription';
export declare class SwaggerServiceDescriptor implements IScopedComponent {
private container;
private domain;
context: IRequestContext;
private static defaultDefinitionType;
constructor(container: IContainer, domain: Domain);
getDescriptions(serviceDescription: ServiceDescription): Promise<SwaggerApiDefinition>;
private initialize();
/**
* Getting all endpoint Handler (only the first word)
* Example : {verb : "customer.myAction" } it's `customer` who is kept
* @param services
* @return string[]
*/
private computeTags(services);
/**
* Format the path to swagger json format.
* See the documentation here : http://swagger.io/specification/#pathsObject
* @param services
*/
private computePaths(serviceDescription);
createResponseDefinition(listResponse: boolean, payload?: any): any;
private computeResponses(service, operationObject);
/**
* Format the json parameters object for swagger
* See the documentation here: http://swagger.io/specification/#parameterObject
* @param service
*/
private computeParameters(schemas, service);
/**
* Format the json definitions for swagger type
* See the documentation here : http://swagger.io/specification/#definitionsObject
* @param schemas
* @return DefinitionObject
*/
private computeDefinitions(schemas);
private createDefinition(schema);
private setReferenceDefinition(desc, definitionName, propertyReference?);
private isFundamentalObject(inputSchema);
}