Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(
@inject(CoreBindings.APPLICATION_INSTANCE) app: Application,
@inject(RestBindings.CONFIG) config?: RestComponentConfig,
) {
app.bind(RestBindings.SEQUENCE).toClass(DefaultSequence);
const apiSpec = createEmptyApiSpec();
// Merge the OpenAPI `servers` spec from the config into the empty one
if (config?.openApiSpec?.servers) {
Object.assign(apiSpec, {servers: config.openApiSpec.servers});
}
app.bind(RestBindings.API_SPEC).to(apiSpec);
}
}