@loopback/docs
Version:
Documentation for LoopBack 4
1,131 lines (1,130 loc) • 36 kB
JSON
{
"metadata": {
"toolPackage": "@microsoft/api-extractor",
"toolVersion": "7.3.8",
"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 "
},
{
"kind": "Reference",
"text": "anOpenApiSpec"
},
{
"kind": "Content",
"text": "(): "
},
{
"kind": "Reference",
"text": "OpenApiSpecBuilder"
},
{
"kind": "Content",
"text": ";"
}
],
"returnTypeTokenRange": {
"startIndex": 3,
"endIndex": 4
},
"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 "
},
{
"kind": "Reference",
"text": "anOperationSpec"
},
{
"kind": "Content",
"text": "(): "
},
{
"kind": "Reference",
"text": "OperationSpecBuilder"
},
{
"kind": "Content",
"text": ";"
}
],
"returnTypeTokenRange": {
"startIndex": 3,
"endIndex": 4
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [],
"name": "anOperationSpec"
},
{
"kind": "Class",
"canonicalReference": "@loopback/openapi-spec-builder!BuilderBase:class",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "export declare class "
},
{
"kind": "Reference",
"text": "BuilderBase"
},
{
"kind": "Content",
"text": "<"
},
{
"kind": "Reference",
"text": "T"
},
{
"kind": "Content",
"text": " extends "
},
{
"kind": "Reference",
"text": "ISpecificationExtension"
},
{
"kind": "Content",
"text": "> "
}
],
"releaseTag": "Public",
"typeParameters": [
{
"typeParameterName": "T",
"constraintTokenRange": {
"startIndex": 5,
"endIndex": 6
},
"defaultTypeTokenRange": {
"startIndex": 0,
"endIndex": 0
}
}
],
"name": "BuilderBase",
"members": [
{
"kind": "Property",
"canonicalReference": "@loopback/openapi-spec-builder!BuilderBase#_spec:member",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "protected "
},
{
"kind": "Reference",
"text": "_spec"
},
{
"kind": "Content",
"text": ": "
},
{
"kind": "Reference",
"text": "T"
},
{
"kind": "Content",
"text": ";"
}
],
"releaseTag": "Public",
"name": "_spec",
"propertyTypeTokenRange": {
"startIndex": 3,
"endIndex": 4
},
"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("
},
{
"kind": "Reference",
"text": "initialSpec"
},
{
"kind": "Content",
"text": ": "
},
{
"kind": "Reference",
"text": "T"
},
{
"kind": "Content",
"text": ");"
}
],
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "initialSpec",
"parameterTypeTokenRange": {
"startIndex": 3,
"endIndex": 4
}
}
]
},
{
"kind": "Method",
"canonicalReference": "@loopback/openapi-spec-builder!BuilderBase#build:member(1)",
"docComment": "/**\n * Build the spec object.\n */\n",
"excerptTokens": [
{
"kind": "Reference",
"text": "build"
},
{
"kind": "Content",
"text": "(): "
},
{
"kind": "Reference",
"text": "T"
},
{
"kind": "Content",
"text": ";"
}
],
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 2,
"endIndex": 3
},
"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": "Reference",
"text": "withExtension"
},
{
"kind": "Content",
"text": "("
},
{
"kind": "Reference",
"text": "key"
},
{
"kind": "Content",
"text": ": "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ", "
},
{
"kind": "Reference",
"text": "value"
},
{
"kind": "Content",
"text": ": "
},
{
"kind": "Content",
"text": "any"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Content",
"text": "this"
},
{
"kind": "Content",
"text": ";"
}
],
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 10,
"endIndex": 11
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "key",
"parameterTypeTokenRange": {
"startIndex": 4,
"endIndex": 5
}
},
{
"parameterName": "value",
"parameterTypeTokenRange": {
"startIndex": 8,
"endIndex": 9
}
}
],
"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 "
},
{
"kind": "Reference",
"text": "OpenApiSpecBuilder"
},
{
"kind": "Content",
"text": " extends "
},
{
"kind": "Reference",
"text": "BuilderBase"
},
{
"kind": "Content",
"text": "<"
},
{
"kind": "Reference",
"text": "OpenAPIObject"
},
{
"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": "Reference",
"text": "withOperation"
},
{
"kind": "Content",
"text": "("
},
{
"kind": "Reference",
"text": "verb"
},
{
"kind": "Content",
"text": ": "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ", "
},
{
"kind": "Reference",
"text": "path"
},
{
"kind": "Content",
"text": ": "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ", "
},
{
"kind": "Reference",
"text": "spec"
},
{
"kind": "Content",
"text": ": "
},
{
"kind": "Reference",
"text": "OperationObject"
},
{
"kind": "Content",
"text": " | "
},
{
"kind": "Reference",
"text": "OperationSpecBuilder"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Content",
"text": "this"
},
{
"kind": "Content",
"text": ";"
}
],
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 16,
"endIndex": 17
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "verb",
"parameterTypeTokenRange": {
"startIndex": 4,
"endIndex": 5
}
},
{
"parameterName": "path",
"parameterTypeTokenRange": {
"startIndex": 8,
"endIndex": 9
}
},
{
"parameterName": "spec",
"parameterTypeTokenRange": {
"startIndex": 12,
"endIndex": 15
}
}
],
"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": "Reference",
"text": "withOperationReturningString"
},
{
"kind": "Content",
"text": "("
},
{
"kind": "Reference",
"text": "verb"
},
{
"kind": "Content",
"text": ": "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ", "
},
{
"kind": "Reference",
"text": "path"
},
{
"kind": "Content",
"text": ": "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ", "
},
{
"kind": "Reference",
"text": "operationName"
},
{
"kind": "Content",
"text": "?: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Content",
"text": "this"
},
{
"kind": "Content",
"text": ";"
}
],
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 14,
"endIndex": 15
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "verb",
"parameterTypeTokenRange": {
"startIndex": 4,
"endIndex": 5
}
},
{
"parameterName": "path",
"parameterTypeTokenRange": {
"startIndex": 8,
"endIndex": 9
}
},
{
"parameterName": "operationName",
"parameterTypeTokenRange": {
"startIndex": 12,
"endIndex": 13
}
}
],
"name": "withOperationReturningString"
}
],
"extendsTokenRange": {
"startIndex": 3,
"endIndex": 7
},
"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 "
},
{
"kind": "Reference",
"text": "OperationSpecBuilder"
},
{
"kind": "Content",
"text": " extends "
},
{
"kind": "Reference",
"text": "BuilderBase"
},
{
"kind": "Content",
"text": "<"
},
{
"kind": "Reference",
"text": "OperationObject"
},
{
"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": "Reference",
"text": "withControllerName"
},
{
"kind": "Content",
"text": "("
},
{
"kind": "Reference",
"text": "name"
},
{
"kind": "Content",
"text": ": "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Content",
"text": "this"
},
{
"kind": "Content",
"text": ";"
}
],
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 6,
"endIndex": 7
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "name",
"parameterTypeTokenRange": {
"startIndex": 4,
"endIndex": 5
}
}
],
"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": "Reference",
"text": "withOperationId"
},
{
"kind": "Content",
"text": "("
},
{
"kind": "Reference",
"text": "operationId"
},
{
"kind": "Content",
"text": ": "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Content",
"text": "this"
},
{
"kind": "Content",
"text": ";"
}
],
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 6,
"endIndex": 7
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "operationId",
"parameterTypeTokenRange": {
"startIndex": 4,
"endIndex": 5
}
}
],
"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": "Reference",
"text": "withOperationName"
},
{
"kind": "Content",
"text": "("
},
{
"kind": "Reference",
"text": "name"
},
{
"kind": "Content",
"text": ": "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Content",
"text": "this"
},
{
"kind": "Content",
"text": ";"
}
],
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 6,
"endIndex": 7
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "name",
"parameterTypeTokenRange": {
"startIndex": 4,
"endIndex": 5
}
}
],
"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": "Reference",
"text": "withParameter"
},
{
"kind": "Content",
"text": "(..."
},
{
"kind": "Reference",
"text": "parameterSpecs"
},
{
"kind": "Content",
"text": ": "
},
{
"kind": "Reference",
"text": "ParameterObject"
},
{
"kind": "Content",
"text": "[]"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Content",
"text": "this"
},
{
"kind": "Content",
"text": ";"
}
],
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 7,
"endIndex": 8
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "parameterSpecs",
"parameterTypeTokenRange": {
"startIndex": 4,
"endIndex": 6
}
}
],
"name": "withParameter"
},
{
"kind": "Method",
"canonicalReference": "@loopback/openapi-spec-builder!OperationSpecBuilder#withRequestBody:member(1)",
"docComment": "",
"excerptTokens": [
{
"kind": "Reference",
"text": "withRequestBody"
},
{
"kind": "Content",
"text": "("
},
{
"kind": "Reference",
"text": "requestBodySpec"
},
{
"kind": "Content",
"text": ": "
},
{
"kind": "Reference",
"text": "RequestBodyObject"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Content",
"text": "this"
},
{
"kind": "Content",
"text": ";"
}
],
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 6,
"endIndex": 7
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "requestBodySpec",
"parameterTypeTokenRange": {
"startIndex": 4,
"endIndex": 5
}
}
],
"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": "Reference",
"text": "withResponse"
},
{
"kind": "Content",
"text": "("
},
{
"kind": "Reference",
"text": "status"
},
{
"kind": "Content",
"text": ": "
},
{
"kind": "Content",
"text": "number | 'default'"
},
{
"kind": "Content",
"text": ", "
},
{
"kind": "Reference",
"text": "responseSpec"
},
{
"kind": "Content",
"text": ": "
},
{
"kind": "Reference",
"text": "ResponseObject"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Content",
"text": "this"
},
{
"kind": "Content",
"text": ";"
}
],
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 10,
"endIndex": 11
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "status",
"parameterTypeTokenRange": {
"startIndex": 4,
"endIndex": 5
}
},
{
"parameterName": "responseSpec",
"parameterTypeTokenRange": {
"startIndex": 8,
"endIndex": 9
}
}
],
"name": "withResponse"
},
{
"kind": "Method",
"canonicalReference": "@loopback/openapi-spec-builder!OperationSpecBuilder#withStringResponse:member(1)",
"docComment": "",
"excerptTokens": [
{
"kind": "Reference",
"text": "withStringResponse"
},
{
"kind": "Content",
"text": "("
},
{
"kind": "Reference",
"text": "status"
},
{
"kind": "Content",
"text": "?: "
},
{
"kind": "Content",
"text": "number | 'default'"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Content",
"text": "this"
},
{
"kind": "Content",
"text": ";"
}
],
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 6,
"endIndex": 7
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "status",
"parameterTypeTokenRange": {
"startIndex": 4,
"endIndex": 5
}
}
],
"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": "Reference",
"text": "withTags"
},
{
"kind": "Content",
"text": "("
},
{
"kind": "Reference",
"text": "tags"
},
{
"kind": "Content",
"text": ": "
},
{
"kind": "Content",
"text": "string | string[]"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Content",
"text": "this"
},
{
"kind": "Content",
"text": ";"
}
],
"isStatic": false,
"returnTypeTokenRange": {
"startIndex": 6,
"endIndex": 7
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "tags",
"parameterTypeTokenRange": {
"startIndex": 4,
"endIndex": 5
}
}
],
"name": "withTags"
}
],
"extendsTokenRange": {
"startIndex": 3,
"endIndex": 7
},
"implementsTokenRanges": []
}
]
}
]
}