{"_id":"@brielll2002/swagger-made-easy","name":"@brielll2002/swagger-made-easy","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.1":{"name":"@brielll2002/swagger-made-easy","version":"1.0.1","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["swagger","Swagger"],"author":{"name":"brielll2002"},"license":"ISC","description":"- ```npm i swagger-made-easy```","dependencies":{"axios":"^1.6.8","express":"^4.19.2","swagger-ui-express":"^5.0.0"},"repository":{"type":"git","url":"git+https://github.com/Brielll2002/swagger-made-easy.git"},"bugs":{"url":"https://github.com/Brielll2002/swagger-made-easy/issues"},"homepage":"https://github.com/Brielll2002/swagger-made-easy#readme","_id":"@brielll2002/swagger-made-easy@1.0.1","gitHead":"5522938d28c95ce60bd90f8651218b62851975db","_nodeVersion":"21.6.2","_npmVersion":"10.7.0","dist":{"integrity":"sha512-lIeijKTjbp95J1iTPJlFLRpdkrgEeZGEVVaQ7DWWBlE/s0vB9EKKOoOhvFDD0FLSAsWhnCOABfGnBlGQV0NMtA==","shasum":"79c5d6d109a8170e8b3e2240aeca1262f21cf21f","tarball":"https://registry.npmjs.org/@brielll2002/swagger-made-easy/-/swagger-made-easy-1.0.1.tgz","fileCount":3,"unpackedSize":4153,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCVmasDVFgawE5yhKNXKbb36yl6zXfSQGJRfBxATmRd4QIgaRVlHKqwdEehINhx+FdIbM9lKbRmhxfndXuqVnWcaUk="}]},"_npmUser":{"name":"brielll2002","email":"gabrielrodrigues62902@gmail.com"},"directories":{},"maintainers":[{"name":"brielll2002","email":"gabrielrodrigues62902@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/swagger-made-easy_1.0.1_1715963803524_0.5739577237583093"},"_hasShrinkwrap":false}},"time":{"created":"2024-05-17T16:36:43.421Z","1.0.1":"2024-05-17T16:36:43.673Z","modified":"2024-05-17T16:36:43.930Z"},"maintainers":[{"name":"brielll2002","email":"gabrielrodrigues62902@gmail.com"}],"description":"- ```npm i swagger-made-easy```","homepage":"https://github.com/Brielll2002/swagger-made-easy#readme","keywords":["swagger","Swagger"],"repository":{"type":"git","url":"git+https://github.com/Brielll2002/swagger-made-easy.git"},"author":{"name":"brielll2002"},"bugs":{"url":"https://github.com/Brielll2002/swagger-made-easy/issues"},"license":"ISC","readme":"# Install Lib\r\n\r\n- ```npm i swagger-made-easy```\r\n\r\n# Example of use\r\n\r\nconst Swagger = require('swagger-made-easy')\r\n\r\nSwagger(['http://localhost:3100/exemple', 'http://localhost:3100/'], (err, swg)=>{\r\n    if(err)console.error(err)\r\n\r\n    const swagger = swg\r\n\r\n    const swaggerDoc = require('./swagger.json')\r\n\r\n    app.use('/api-docs', swagger.serve, swagger.setup(swaggerDoc))\r\n\r\n    console.log('documentation path: \"/api-docs\"')\r\n})\r\n\r\n- Explanation:  \r\nThe Swagger function has a parameter and a callback function.\r\nThe parameter is an array, which must contain the endpoints of your API. The callback needs to be called so that the documentation can be accessed through the path that will appear in the console.\r\n\r\n- Explicação:  \r\nA função Swagger possui um parâmetro e uma função callback.\r\nO parâmetro se trata de um array, que deve conter os endpoints da sua API, a callback precisa ser chamada para que a documentação possa ser acessada através do caminho que aparecerá no console.\r\n","readmeFilename":"README.md"}