File tree Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ const swaggerJsdoc = require ( 'swagger-jsdoc' ) ;
2+
3+ const options = {
4+ definition : {
5+ openapi : '3.0.0' ,
6+ info : {
7+ title : 'API de E-commerce' ,
8+ version : '1.0.0' ,
9+ description : 'API para gerenciamento de produtos e carrinhos de compras de uma loja virtual. Não documenta sessões.' ,
10+ } ,
11+ servers : [
12+ {
13+ url : 'http://localhost:3000/api/v1' ,
14+ description : 'Servidor de Desenvolvimento' ,
15+ } ,
16+ ] ,
17+ // components: {
18+ // securitySchemes: {
19+ // bearerAuth: {
20+ // type: 'http',
21+ // scheme: 'bearer',
22+ // bearerFormat: 'JWT',
23+ // }
24+ // }
25+ // },
26+ // security: [
27+ // {
28+ // bearerAuth: []
29+ // }
30+ // ]
31+ } ,
32+ apis : [ './src/routes/*.js' ] ,
33+ } ;
34+
35+ const swaggerSpec = swaggerJsdoc ( options ) ;
36+
37+ module . exports = swaggerSpec ;
You can’t perform that action at this time.
0 commit comments