Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/example/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ const {registerRoutes, getDocsHandler} = createOpenApiRegistry({
swaggerUi: {
explorer: true,
customCss: theme.getBuffer(SwaggerThemeNameEnum.DARK),
swaggerOptions: {
persistAuthorization: true,
},
},
skipMount: true,
});
Expand All @@ -21,6 +24,7 @@ const nodekit = new NodeKit({
appLoggingDestination: {
write: () => {},
},
appPort: 1337,
},
});

Expand All @@ -32,7 +36,7 @@ app.express.use('/api/docs', getDocsHandler());
if (require.main === module) {
app.run();

console.log(`Example server running on port`);
console.log(`Example server running on port ${nodekit.config.appPort}`);
console.log('Try:');
console.log(' GET /users/123e4567-e89b-12d3-a456-426614174000');
console.log(' Header: Authorization: Bearer valid_token');
Expand Down
2 changes: 1 addition & 1 deletion src/openapi-registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ export function createOpenApiRegistry(config: OpenApiRegistryConfig) {

router.use('/', serveFiles(undefined, asyncOptions), setup(null, asyncOptions));
} else {
router.use('/', serveFiles(schema), setup(schema, options));
router.use('/', serveFiles(schema, options), setup(schema, options));
}

return router;
Expand Down
Loading