Skip to content

Fix: Align OpenAPI Type for Auth Timeout#4354

Closed
Sanskarzz wants to merge 1 commit intostacklok:mainfrom
Sanskarzz:fixtype
Closed

Fix: Align OpenAPI Type for Auth Timeout#4354
Sanskarzz wants to merge 1 commit intostacklok:mainfrom
Sanskarzz:fixtype

Conversation

@Sanskarzz
Copy link
Copy Markdown
Contributor

This PR updates the swaggertype tag for the Timeout field in pkg/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

  • Modified pkg/auth/remote/config.go to use swaggertype:"primitive,integer" for the Timeout field.
  • Updated docs/server/docs.go, docs/server/swagger.json, and docs/server/swagger.yaml accordingly.

Verification

  • Ran task docs to confirm no unwanted schema bloat for time.Duration.
  • Verified documentation synchronization with ./cmd/help/verify.sh.

Signed-off-by: Sanskarzz <sanskar.gur@gmail.com>
@github-actions github-actions bot added the size/XS Extra small PR: < 100 lines changed label Mar 24, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.39%. Comparing base (074326e) to head (60b3b2e).
⚠️ Report is 14 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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"`
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Sanskarzz digging more into this, I'm a little confused. There is no other time.Duration that actually uses primitive,integer.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@amirejaz
Copy link
Copy Markdown
Contributor

@Sanskarzz could you add the reason/motivation for this change?

@Sanskarzz
Copy link
Copy Markdown
Contributor Author

@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

@Sanskarzz Sanskarzz closed this Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS Extra small PR: < 100 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Align OpenAPI/Swagger Type for time.Duration (pkg/auth/remote/config.go)

3 participants