@loopback/docs
Version:
Documentation for LoopBack 4
895 lines (894 loc) • 30.5 kB
JSON
{
"metadata": {
"toolPackage": "@microsoft/api-extractor",
"toolVersion": "7.6.2",
"schemaVersion": 1003,
"oldestForwardsCompatibleVersion": 1001
},
"kind": "Package",
"canonicalReference": "@loopback/openapi-spec-builder!",
"docComment": "",
"name": "@loopback/openapi-spec-builder",
"members": [
{
"kind": "EntryPoint",
"canonicalReference": "@loopback/openapi-spec-builder!",
"name": "",
"members": [
{
"kind": "Function",
"canonicalReference": "@loopback/openapi-spec-builder!anOpenApiSpec:function(1)",
"docComment": "/**\n * Create a new instance of OpenApiSpecBuilder.\n *\n * @param basePath - The base path on which the API is served.\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "export declare function anOpenApiSpec(): "
},
{
"kind": "Reference",
"text": "OpenApiSpecBuilder",
"canonicalReference": "@loopback/openapi-spec-builder!OpenApiSpecBuilder:class"
},
{
"kind": "Content",
"text": ";"
}
],
"returnTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [],
"name": "anOpenApiSpec"
},
{
"kind": "Function",
"canonicalReference": "@loopback/openapi-spec-builder!anOperationSpec:function(1)",
"docComment": "/**\n * Create a new instance of OperationSpecBuilder.\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "export declare function anOperationSpec(): "
},
{
"kind": "Reference",
"text": "OperationSpecBuilder",
"canonicalReference": "@loopback/openapi-spec-builder!OperationSpecBuilder:class"
},
{
"kind": "Content",
"text": ";"
}
],
"returnTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [],
"name": "anOperationSpec"
},
{
"kind": "Class",
"canonicalReference": "@loopback/openapi-spec-builder!BuilderBase:class",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "export declare class BuilderBase<T extends "
},
{
"kind": "Reference",
"text": "ISpecificationExtension",
"canonicalReference": "openapi3-ts!ISpecificationExtension:interface"
},
{
"kind": "Content",
"text": "> "
}
],
"releaseTag": "Public",
"typeParameters": [
{
"typeParameterName": "T",
"constraintTokenRange": {
"startIndex": 1,
"endIndex": 2
},
"defaultTypeTokenRange": {
"startIndex": 0,
"endIndex": 0
}
}
],
"name": "BuilderBase",
"members": [
{
"kind": "Property",
"canonicalReference": "@loopback/openapi-spec-builder!BuilderBase#_spec:member",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "protected _spec: "
},
{
"kind": "Content",
"text": "T"
},
{
"kind": "Content",
"text": ";"
}
],
"releaseTag": "Public",
"name": "_spec",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
},
"isStatic": false
},
{
"kind": "Constructor",
"canonicalReference": "@loopback/openapi-spec-builder!BuilderBase:constructor(1)",
"docComment": "/**\n * Constructs a new instance of the `BuilderBase` class\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "constructor(initialSpec: "
},
{
"kind": "Content",
"text": "T"
},
{
"kind": "Content",
"text": ");"
}
],
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "initialSpec",
"parameterTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
}
]
},
{
"kind": "Method",
"canonicalReference": "@loopback/openapi-spec-builder!BuilderBase#build:member(1)",
"docComment": "/**\n * Build the spec object.\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "build(): "
},
{
"kind": "Content",
"text": "T"
},
{
"kind": "Content",
"text": ";"
}
],
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [],
"name": "build"
},
{
"kind": "Method",
"canonicalReference": "@loopback/openapi-spec-builder!BuilderBase#withExtension:member(1)",
"docComment": "/**\n * Add a custom (extension) property to the spec object.\n *\n * @param key - The property name starting with \"x-\".\n *\n * @param value - The property value.\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "withExtension(key: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ", value: "
},
{
"kind": "Content",
"text": "any"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Content",
"text": "this"
},
{
"kind": "Content",
"text": ";"
}
],
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 5,
"endIndex": 6
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "key",
"parameterTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
},
{
"parameterName": "value",
"parameterTypeTokenRange": {
"startIndex": 3,
"endIndex": 4
}
}
],
"name": "withExtension"
}
],
"implementsTokenRanges": []
},
{
"kind": "Class",
"canonicalReference": "@loopback/openapi-spec-builder!OpenApiSpecBuilder:class",
"docComment": "/**\n * A builder for creating OpenApiSpec documents.\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "export declare class OpenApiSpecBuilder extends "
},
{
"kind": "Reference",
"text": "BuilderBase",
"canonicalReference": "@loopback/openapi-spec-builder!BuilderBase:class"
},
{
"kind": "Content",
"text": "<"
},
{
"kind": "Reference",
"text": "OpenAPIObject",
"canonicalReference": "openapi3-ts!OpenAPIObject:interface"
},
{
"kind": "Content",
"text": "> "
}
],
"releaseTag": "Public",
"name": "OpenApiSpecBuilder",
"members": [
{
"kind": "Constructor",
"canonicalReference": "@loopback/openapi-spec-builder!OpenApiSpecBuilder:constructor(1)",
"docComment": "/**\n * Constructs a new instance of the `OpenApiSpecBuilder` class\n *\n * @param basePath - The base path on which the API is served.\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "constructor();"
}
],
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": []
},
{
"kind": "Method",
"canonicalReference": "@loopback/openapi-spec-builder!OpenApiSpecBuilder#withOperation:member(1)",
"docComment": "/**\n * Define a new OperationObject at the given path and verb (method).\n *\n * @param verb - The HTTP verb.\n *\n * @param path - The path relative to basePath.\n *\n * @param spec - Additional specification of the operation.\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "withOperation(verb: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ", path: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ", spec: "
},
{
"kind": "Reference",
"text": "OperationObject",
"canonicalReference": "openapi3-ts!OperationObject:interface"
},
{
"kind": "Content",
"text": " | "
},
{
"kind": "Reference",
"text": "OperationSpecBuilder",
"canonicalReference": "@loopback/openapi-spec-builder!OperationSpecBuilder:class"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Content",
"text": "this"
},
{
"kind": "Content",
"text": ";"
}
],
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 9,
"endIndex": 10
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "verb",
"parameterTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
},
{
"parameterName": "path",
"parameterTypeTokenRange": {
"startIndex": 3,
"endIndex": 4
}
},
{
"parameterName": "spec",
"parameterTypeTokenRange": {
"startIndex": 5,
"endIndex": 8
}
}
],
"name": "withOperation"
},
{
"kind": "Method",
"canonicalReference": "@loopback/openapi-spec-builder!OpenApiSpecBuilder#withOperationReturningString:member(1)",
"docComment": "/**\n * Define a new operation that returns a string response.\n *\n * @param verb - The HTTP verb.\n *\n * @param path - The path relative to basePath.\n *\n * @param operationName - The name of the controller method implementing this operation (`x-operation-name` field).\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "withOperationReturningString(verb: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ", path: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ", operationName?: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Content",
"text": "this"
},
{
"kind": "Content",
"text": ";"
}
],
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 7,
"endIndex": 8
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "verb",
"parameterTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
},
{
"parameterName": "path",
"parameterTypeTokenRange": {
"startIndex": 3,
"endIndex": 4
}
},
{
"parameterName": "operationName",
"parameterTypeTokenRange": {
"startIndex": 5,
"endIndex": 6
}
}
],
"name": "withOperationReturningString"
}
],
"extendsTokenRange": {
"startIndex": 1,
"endIndex": 5
},
"implementsTokenRanges": []
},
{
"kind": "Class",
"canonicalReference": "@loopback/openapi-spec-builder!OperationSpecBuilder:class",
"docComment": "/**\n * A builder for creating OperationObject specifications.\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "export declare class OperationSpecBuilder extends "
},
{
"kind": "Reference",
"text": "BuilderBase",
"canonicalReference": "@loopback/openapi-spec-builder!BuilderBase:class"
},
{
"kind": "Content",
"text": "<"
},
{
"kind": "Reference",
"text": "OperationObject",
"canonicalReference": "openapi3-ts!OperationObject:interface"
},
{
"kind": "Content",
"text": "> "
}
],
"releaseTag": "Public",
"name": "OperationSpecBuilder",
"members": [
{
"kind": "Constructor",
"canonicalReference": "@loopback/openapi-spec-builder!OperationSpecBuilder:constructor(1)",
"docComment": "/**\n * Constructs a new instance of the `OperationSpecBuilder` class\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "constructor();"
}
],
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": []
},
{
"kind": "Method",
"canonicalReference": "@loopback/openapi-spec-builder!OperationSpecBuilder#withControllerName:member(1)",
"docComment": "/**\n * Define the controller name (controller name).\n *\n * @param name - The name of the controller containing this operation.\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "withControllerName(name: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Content",
"text": "this"
},
{
"kind": "Content",
"text": ";"
}
],
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 3,
"endIndex": 4
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "name",
"parameterTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
}
],
"name": "withControllerName"
},
{
"kind": "Method",
"canonicalReference": "@loopback/openapi-spec-builder!OperationSpecBuilder#withOperationId:member(1)",
"docComment": "/**\n * Define the operationId\n *\n * @param operationId - Operation id\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "withOperationId(operationId: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Content",
"text": "this"
},
{
"kind": "Content",
"text": ";"
}
],
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 3,
"endIndex": 4
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "operationId",
"parameterTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
}
],
"name": "withOperationId"
},
{
"kind": "Method",
"canonicalReference": "@loopback/openapi-spec-builder!OperationSpecBuilder#withOperationName:member(1)",
"docComment": "/**\n * Define the operation name (controller method name).\n *\n * @param name - The name of the controller method implementing this operation.\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "withOperationName(name: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Content",
"text": "this"
},
{
"kind": "Content",
"text": ";"
}
],
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 3,
"endIndex": 4
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "name",
"parameterTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
}
],
"name": "withOperationName"
},
{
"kind": "Method",
"canonicalReference": "@loopback/openapi-spec-builder!OperationSpecBuilder#withParameter:member(1)",
"docComment": "/**\n * Describe one more parameters accepted by the operation. Note that parameters are positional in OpenAPI Spec, therefore the first call of `withParameter` defines the first parameter, the second call defines the second parameter, etc.\n *\n * @param - parameterSpecs\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "withParameter(...parameterSpecs: "
},
{
"kind": "Reference",
"text": "ParameterObject",
"canonicalReference": "openapi3-ts!ParameterObject:interface"
},
{
"kind": "Content",
"text": "[]"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Content",
"text": "this"
},
{
"kind": "Content",
"text": ";"
}
],
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 4,
"endIndex": 5
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "parameterSpecs",
"parameterTypeTokenRange": {
"startIndex": 1,
"endIndex": 3
}
}
],
"name": "withParameter"
},
{
"kind": "Method",
"canonicalReference": "@loopback/openapi-spec-builder!OperationSpecBuilder#withRequestBody:member(1)",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "withRequestBody(requestBodySpec: "
},
{
"kind": "Reference",
"text": "RequestBodyObject",
"canonicalReference": "openapi3-ts!RequestBodyObject:interface"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Content",
"text": "this"
},
{
"kind": "Content",
"text": ";"
}
],
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 3,
"endIndex": 4
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "requestBodySpec",
"parameterTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
}
],
"name": "withRequestBody"
},
{
"kind": "Method",
"canonicalReference": "@loopback/openapi-spec-builder!OperationSpecBuilder#withResponse:member(1)",
"docComment": "/**\n * Describe a response for a given HTTP status code.\n *\n * @param status - HTTP status code or string \"default\"\n *\n * @param responseSpec - Specification of the response\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "withResponse(status: "
},
{
"kind": "Content",
"text": "number | 'default'"
},
{
"kind": "Content",
"text": ", responseSpec: "
},
{
"kind": "Reference",
"text": "ResponseObject",
"canonicalReference": "openapi3-ts!ResponseObject:interface"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Content",
"text": "this"
},
{
"kind": "Content",
"text": ";"
}
],
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 5,
"endIndex": 6
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "status",
"parameterTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
},
{
"parameterName": "responseSpec",
"parameterTypeTokenRange": {
"startIndex": 3,
"endIndex": 4
}
}
],
"name": "withResponse"
},
{
"kind": "Method",
"canonicalReference": "@loopback/openapi-spec-builder!OperationSpecBuilder#withStringResponse:member(1)",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "withStringResponse(status?: "
},
{
"kind": "Content",
"text": "number | 'default'"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Content",
"text": "this"
},
{
"kind": "Content",
"text": ";"
}
],
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 3,
"endIndex": 4
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "status",
"parameterTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
}
],
"name": "withStringResponse"
},
{
"kind": "Method",
"canonicalReference": "@loopback/openapi-spec-builder!OperationSpecBuilder#withTags:member(1)",
"docComment": "/**\n * Describe tags associated with the operation\n *\n * @param - tags\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "withTags(tags: "
},
{
"kind": "Content",
"text": "string | string[]"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Content",
"text": "this"
},
{
"kind": "Content",
"text": ";"
}
],
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 3,
"endIndex": 4
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "tags",
"parameterTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
}
],
"name": "withTags"
}
],
"extendsTokenRange": {
"startIndex": 1,
"endIndex": 5
},
"implementsTokenRanges": []
}
]
}
]
}