Fix: Align OpenAPI Type for Auth Timeout#4354
Fix: Align OpenAPI Type for Auth Timeout#4354Sanskarzz wants to merge 1 commit intostacklok:mainfrom
Conversation
Signed-off-by: Sanskarzz <sanskar.gur@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4354 +/- ##
==========================================
- Coverage 68.45% 68.39% -0.07%
==========================================
Files 479 479
Lines 48642 48642
==========================================
- Hits 33300 33268 -32
- Misses 12373 12406 +33
+ Partials 2969 2968 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| Scopes []string `json:"scopes,omitempty" yaml:"scopes,omitempty"` | ||
| SkipBrowser bool `json:"skip_browser,omitempty" yaml:"skip_browser,omitempty"` | ||
| Timeout time.Duration `json:"timeout,omitempty" yaml:"timeout,omitempty" swaggertype:"string" example:"5m"` | ||
| Timeout time.Duration `json:"timeout,omitempty" yaml:"timeout,omitempty" swaggertype:"primitive,integer"` |
There was a problem hiding this comment.
@Sanskarzz digging more into this, I'm a little confused. There is no other time.Duration that actually uses primitive,integer.
There was a problem hiding this comment.
I was also confused, but after making this change here, the doc's error got resolved locally. And also removing swaggertype from here also resolved the error locally.
Do I need to make changes to all timeout fields?
|
@Sanskarzz could you add the reason/motivation for this change? |
I have created this PR because this change was fixing CI docs error for this PR, discussed here. BTW, somehow now the CI swag docs error got fixed automatically after upstream/main pull, I will close this PR and the associated Issue. Thanks |
This PR updates the
swaggertypetag for theTimeoutfield inpkg/auth/remote/config.go.This change was originally part of PR #4314 but was requested to be split into its own PR to keep the main feature PR focused on the validating webhook middleware.
Fix: #4353
Changes Included
pkg/auth/remote/config.goto useswaggertype:"primitive,integer"for theTimeoutfield.docs/server/docs.go,docs/server/swagger.json, anddocs/server/swagger.yamlaccordingly.Verification
task docsto confirm no unwanted schema bloat fortime.Duration../cmd/help/verify.sh.