Skip to content

chore(ws): update swag to 1.16.6 for required fields #489

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

Merged

Conversation

andyatmiami
Copy link
Contributor

@andyatmiami andyatmiami commented Jul 18, 2025

related: #430

  • Updated swaggo/swag from v1.16.4 to v1.16.6 in go.mod and Makefile.
  • Added required fields to various OpenAPI definitions in docs.go and swagger.json for better validation via --requiredByDefault flag
    • swag v1.16.6 contains a commit we authored to treat json:omitempty as required: false. That, in conjunction with --requiredByDefault flag, allows us to generate models with proper required-ness

@github-project-automation github-project-automation bot moved this to Needs Triage in Kubeflow Notebooks Jul 18, 2025
@google-oss-prow google-oss-prow bot added the area/backend area - related to backend components label Jul 18, 2025
@google-oss-prow google-oss-prow bot added area/v2 area - version - kubeflow notebooks v2 size/L labels Jul 18, 2025
@andyatmiami
Copy link
Contributor Author

/hold

The v1.16.5 release of swag is quasi-broken in that numerous adopters raised an issue shortly after release around a nil pointer dereference:

While this particular bug does not seem to affect kubeflow/notebooks - even though we are leveraging the parseDependency flag - I would prefer we wait a couple days to see if a v1.16.6 release will be published since a fix to swaggo/swag#2042 has been merged.

…s in OpenAPI definitions

- Updated swaggo/swag from v1.16.4 to v1.16.6 in go.mod and Makefile.
- Added required fields to various OpenAPI definitions in docs.go and swagger.json for better validation via `--requiredByDefault` flag
    - `swag` `v1.16.6` contains a commit we authored to treat `json:omitempty` as `required: false`.  That, in conjunction with `--requiredByDefault` flag, allows us to generate models with proper _required-ness_

Signed-off-by: Andy Stoneberg <[email protected]>
@andyatmiami andyatmiami force-pushed the chore/swag-dep-update branch from c51c964 to 62d1085 Compare July 31, 2025 17:26
@andyatmiami andyatmiami changed the title chore(ws): update swaggo dependency to v1.16.5 and add required fields in OpenAPI definitions chore(ws): update swaggo dependency to v1.16.6 and add required fields in OpenAPI definitions Jul 31, 2025
@andyatmiami
Copy link
Contributor Author

/unhold

@andyatmiami
Copy link
Contributor Author

/ok-to-test

@thesuperzapper thesuperzapper changed the title chore(ws): update swaggo dependency to v1.16.6 and add required fields in OpenAPI definitions chore(ws): update swag to 1.16.6 for required fields Jul 31, 2025
@thesuperzapper
Copy link
Member

@andyatmiami thanks for this, should make it easier for the frontend to generate a client.

/lgtm
/approve

Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: thesuperzapper

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow bot merged commit 4f0a29d into kubeflow:notebooks-v2 Jul 31, 2025
14 of 15 checks passed
@github-project-automation github-project-automation bot moved this from Needs Triage to Done in Kubeflow Notebooks Jul 31, 2025
@andyatmiami andyatmiami deleted the chore/swag-dep-update branch August 6, 2025 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved area/backend area - related to backend components area/v2 area - version - kubeflow notebooks v2 lgtm ok-to-test size/L
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants