-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Emitting warnings for inconsistent API doc elements #1189
Emitting warnings for inconsistent API doc elements #1189
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello, thank you for wanting to contribute to apidoc. Your proposition looks great. Could you please try and add a test case for your new code?
Sure, I have just added a unit test |
The GitHub Actions pipeline is ✔️: https://github.com/voyages-sncf-technologies/apidoc/actions/runs/2008326289 |
We could even push further and add a warning if there is an api param that doesn't correspond to anything (so the other way around). Code that would emit a warning: /**
* @api {get} /user/:id
* @apiParam {Number} id user id
* @apiParam {String} oops some leftover
*/ Would you be willing to add this to your PR? |
OK, I also added that check Pipeline is ✔️: https://github.com/voyages-sncf-technologies/apidoc/actions/runs/2012844549 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, great work!
Thank you for maintaining this lib, and for accepting my contribution 😊 |
The goal of this PR is to generate warnings for inconsistent API doc comments.
For example, the following comment:
...would trigger this warning:
A warning would also be emitted in case of parameter name mismatch: