hyperledger-cacti / cacti

Hyperledger Cacti is a new approach to the blockchain interoperability problem
https://wiki.hyperledger.org/display/cactus
Apache License 2.0
344 stars 286 forks source link

refactor(cmd-api-server): pull OAuth2 endpoint scopes from openapi.json #3463

Open aldousalvarez opened 3 months ago

aldousalvarez commented 3 months ago

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

Character Limit

A Must Read for Beginners For rebasing and squashing, here's a must read guide for beginners.

aldousalvarez commented 3 months ago

Hello @petermetz, Already done the requested changes, re-requested for your review. Thank you

aldousalvarez commented 1 month ago

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

petermetz commented 3 weeks ago

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)

aldousalvarez commented 2 weeks ago

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