Closed galih25 closed 5 years ago
Hi! There is no swagger implementation. It have something much better :)
You can get endpoint schema by adding ?schema=true
to any request URI
For example(auth/LoginAction.js) POST: {{host}}/auth/login?schema=true
will return
{
"query": {},
"params": {},
"body": {
"password": "string; min 8 chars; (required)",
"email": "string; email; max 50 chars; (required)",
"fingerprint": "string; min 10; max 50 chars; (required)"
}
}
Swagger have one big issue it require updating on each endpoint changes, supra
takes all endpoint description directly from model layer :)
There is how it works: https://github.com/zmts/supra-api-nodejs/blob/master/controllers/BaseController.js#L141
Good luck!
Hello, i’m just trying to implement your structure but I cannot access the swagger-ui. Could you share how to access it?
First of all, I would like to say thanks to share this great structure.