Skip to content

Commit

Permalink
Update RELEASE_NOTES.md
Browse files Browse the repository at this point in the history
  • Loading branch information
cristopher1 committed Apr 5, 2024
1 parent 89bbc5b commit f026c47
Showing 1 changed file with 40 additions and 6 deletions.
46 changes: 40 additions & 6 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,46 @@ Yeoman generator that creates a base structure to create APIs in koa2 with seque
- Delete the api/src/config/openapi.js file.
- Delete the api/src/routes/swagger folder.
- In the api/src/routes/index.js file, delete:
if (environment !== 'production') {
router.use('/docs', swaggerRouter.routes())
}
- cd api and run npm uninstall openapi-comment-parser.
```node
if (environment !== 'production') {
router.use('/docs', swaggerRouter.routes())
}
```
- In terminal use:
```sh
cd api
npm uninstall openapi-comment-parser
```
- delete api-specification.yml
- Remove the openapi comment in the files in api/src/routes, for example:
```node
/**
* GET /api/v1/users/{userEmail}
*
* @tag API endpoints
* @security BearerAuth
* @summary Get an user by email
* @pathParam {string} userEmail
* @response 200 - Ok
* @responseContent {User} 200.application/json
* @response 401 - Unauthorized
* @responseComponent {Unauthorized} 401
* @response 404 - Not found
* @responseComponent {NotFound} 404
* @response 500 - Internal Server Error
* @responseComponent {InternalServerError} 500
*/
router.get('/:userEmail', async (ctx) => {
```
This comment begin with GET, POST, PUT or others HTTP Verb.
- If you do not want to use JSON Schemas.
- Delete the api/src/schemas/json folder.
- cd api and run npm uninstall ajv ajv-errors ajv-formats globs
- Delete import { simpleJsonSchemaValidation } from '../../schemas/json/index.js' in api/src/routes/user/registerRouter.js, api/src/routes/user/router.js and api/src/routes/authentication/tokenRouter.js
- In terminal use:
```sh
cd api
npm uninstall ajv ajv-errors ajv-formats globs
```
- Delete in files api/src/routes/user/registerRouter.js, api/src/routes/user/router.js and api/src/routes/authentication/tokenRouter.js
```node
import { simpleJsonSchemaValidation } from '../../schemas/json/index.js'
```

0 comments on commit f026c47

Please sign in to comment.