-
Notifications
You must be signed in to change notification settings - Fork 28
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
fix(swagger/oidc): fix swagger and oidc docs #1159
Conversation
includes the following changes: - oidc and jwks endpoints don't need auth - proper documentation for JWKSet type - fix swagger doc creation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1159 +/- ##
=======================================
Coverage 52.81% 52.81%
=======================================
Files 551 551
Lines 19211 19211
=======================================
Hits 10146 10146
Misses 8501 8501
Partials 564 564
|
I noticed it's still not quite right because now we have swagger model definitions in two places due to the types transition and it's still favoring go-vela/types and/or it's undeterministic :/ Note to self: also consider adding |
the modified model annotations have moved to go-vela/server/api/types where a duplicate of these annotations can be found. this change is needed for accurate swagger doc generation. see go-vela/server#1159
so we're looking to drop usage of |
@plyr4 without this change, JWKSet is being documented as the following via go-swagger (which is very wrong):
i looked through the package to see if there is an alternative, usable type, as i think @ecrupper likely also did - to no avail. if we want to properly document what this produces in the swagger spec, we have to maintain something manually somewhere. ideally, there is either a change in go-swagger or jwkset that would allow proper automatic documentation. open to better ideas here, if there are any. |
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.
sure, if it still works for key discovery then it works for me!
depends on go-vela/types#385
includes the following changes:
x-go-package
fields. apparently it's a bug with the release binaries(?!). using thego install
variant of installing go-swagger the spec is produced properly with the same command (see No struct definition in swagger generate go-swagger/go-swagger#3107)