#1896 added support for a LoopBack-specific OpenAPI metadata allowing API developers to hide an endpoint (an OpenAPI operation) from the spec generated by the server.
{
"x-visibility": "undocumented"
}
At the moment, developers must use @operation decorator to provide this metadata, decorators like @get and @post cannot be used.
Let's implement a new decorator @visibility to make it easier to add x-visibility metadata to controller methods.
Example use:
class MyController {
@get('/')
@visibility('undocumented')
index() {
return '<html>Undocumented internal endpoint.</html>';
}
}
#1896 added support for a LoopBack-specific OpenAPI metadata allowing API developers to hide an endpoint (an OpenAPI operation) from the spec generated by the server.
{ "x-visibility": "undocumented" }At the moment, developers must use@operationdecorator to provide this metadata, decorators like@getand@postcannot be used.Let's implement a new decorator
@visibilityto make it easier to addx-visibilitymetadata to controller methods.Example use: