Skip to content

Add OpenAPI enhancer service in @loopback/rest #4380

Closed
@jannyHou

Description

@jannyHou

Suggestion

This is a follow-up story for #4258, after creating the oai enhancer service as extension point, we should add the service in @loopback/rest module so that other enhancers could register and contribute OpenAPI specs into the application(server).

Use Cases

Inside function getApiSpec(), you can apply an enhancer like:

getApiSpec (requestContext?: RequestContext): OpenApiSpec {
  // ...other code
  spec = this.OAIEnhancer.applyEnhancerByName('authorization-bearer');
}

Examples

Same as use cases

Acceptance criteria

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions