Skip to content

Commit

Permalink
fix(components.yaml): move components.yaml out of src
Browse files Browse the repository at this point in the history
Move components.yaml out of src to prevent code duplication

BREAKING CHANGE: swagger routes have to use the new components.yaml path i.e.
packages/components.yaml
  • Loading branch information
saisilinus committed Apr 26, 2022
1 parent e94887f commit 3decabe
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 103 deletions.
2 changes: 1 addition & 1 deletion dist/routes/v1/swagger.route.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import swaggerDefinition from '../../modules/swagger/swagger.definition';
const router = express.Router();
const specs = swaggerJsdoc({
swaggerDefinition,
apis: ['dist/modules/swagger/components.yaml', 'dist/routes/v1/*.js'],
apis: ['packages/components.yaml', 'dist/routes/v1/*.js'],
});
router.use('/', swaggerUi.serve);
router.get(
Expand Down
2 changes: 1 addition & 1 deletion dist/routes/v1/swagger.route.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
100 changes: 0 additions & 100 deletions src/modules/swagger/components.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion src/routes/v1/swagger.route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const router = express.Router();

const specs = swaggerJsdoc({
swaggerDefinition,
apis: ['dist/modules/swagger/components.yaml', 'dist/routes/v1/*.js'],
apis: ['packages/components.yaml', 'dist/routes/v1/*.js'],
});

router.use('/', swaggerUi.serve);
Expand Down

0 comments on commit 3decabe

Please sign in to comment.