Skip to content
This repository was archived by the owner on May 12, 2025. It is now read-only.

Commit 3d945c7

Browse files
committed
update documentation
1 parent 15e42b4 commit 3d945c7

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

README.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,7 @@ const baseDefinition = {
3232
},
3333
};
3434

35-
const spec = parseComments({
36-
definition: baseDefinition,
37-
paths: ['src/**/*.js'], // paths to files with comments to be parsed
38-
});
35+
const spec = parseComments(baseDefinition);
3936
```
4037

4138
### Swagger UI Express example
@@ -45,10 +42,7 @@ const path = require('path');
4542
const commentParser = require('openapi-comment-parser');
4643
const swaggerUi = require('swagger-ui-express');
4744

48-
const spec = parseComments({
49-
definition: baseDefinition,
50-
paths: [path.join(__dirname, '**/*.?(js|yaml|yml)')],
51-
});
45+
const spec = parseComments(baseDefinition);
5246

5347
app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(spec));
5448
```

0 commit comments

Comments
 (0)