refactor(cmd-api-server): pull OAuth2 endpoint scopes from openapi.json
Commit to be reviewed
refactor(cmd-api-server): pull OAuth2 endpoint scopes from openapi.json
Primary Changes
----------------
1. added OAuth2 security endpoints scopes to openapi.json
2. added a test to make sure if the scopes are indeed getting
pulled from the spec file
Fixes #2693
Pull Request Requirements
- [x] Rebased onto
upstream/mainbranch and squashed into single commit to help maintainers review it more efficient and to avoid spaghetti git commit graphs that obfuscate which commit did exactly what change, when and, why. - [x] Have git sign off at the end of commit message to avoid being marked red. You can add
-sflag when usinggit commitcommand. You may refer to this link for more information. - [x] Follow the Commit Linting specification. You may refer to this link for more information.
Character Limit
- [x] Pull Request Title and Commit Subject must not exceed 72 characters (including spaces and special characters).
- [x] Commit Message per line must not exceed 80 characters (including spaces and special characters).
A Must Read for Beginners For rebasing and squashing, here's a must read guide for beginners.
Hello @petermetz, Already done the requested changes, re-requested for your review. Thank you
Hello @petermetz I added another test case where it would be 403, and then I also added that it logs which status code it gets,. Should I also add 403 in the responses on the openapi.json as well? Thanks
Hello @petermetz I added another test case where it would be 403, and then I also added that it logs which status code it gets,. Should I also add 403 in the responses on the openapi.json as well? Thanks
@aldousalvarez Sorry for the slow response! Thank you for the changes and to your question: Yes, please declare the 403 in the openapi.tpl.json spec as well (and make sure to run codegen so that it updates openapi.json also)
Hello @petermetz re-requested for review. already done with the requested changes and updated some of the tests with the required scope after running yarn run codegen so the tests would pass. Thank you