import { Endpoint, ModelMap, ParsedMeshRAML, PropertyDefinition, RequestSchemaInRAML, ResponseMap, ResponseMapYaml, UrlParameterMap } from './interfaces'; /** * Parses the Gentics Mesh RAML for request and response models. */ export declare class MeshRamlParser { /** * Entry point. Parses mesh RAML from a string. */ parseRAML(ramlString: string): Promise; /** * Entry point. Parses mesh RAML from an already-parsed RAML object. */ parseRAML(ramlObject: object): Promise; protected parseYamlToObject(yaml: string): Promise; protected findModelsAndEndpoints(apiRaml: any): Promise<{ endpoints: Endpoint[]; models: { [name: string]: PropertyDefinition; }; }>; /** For parent-child endpoints (e.g. "/{project}", "/{project}/nodes"), add the uri parameters of the parent. */ protected addMissingUriParameters(endpoints: Endpoint[]): void; traverseRequest(requestSchema: RequestSchemaInRAML, methodName: string, url: string, urlParams: UrlParameterMap | undefined, models: ModelMap): Promise; /** Format a RAML parameters hash as a JsonSchema declaration */ private paramsHashToJsonSchema(parameters, description?); traverseResponseSchemas(responseMap: ResponseMapYaml, models: ModelMap): Promise; /** * Normalizes the passed schema from the YAML input. * When schema was already parsed, the old reference is returned. * Object and array schemas are traversed recursively and stored in the passed model hash. */ normalizeSchema(schema: PropertyDefinition, modelMap: ModelMap): Promise; }