-
Notifications
You must be signed in to change notification settings - Fork 33
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
feat(ws): add swagger config #206
base: notebooks-v2
Are you sure you want to change the base?
feat(ws): add swagger config #206
Conversation
Signed-off-by: mohamed-ben-khemis <[email protected]>
153dd94
to
5f04a46
Compare
Signed-off-by: mohamed-ben-khemis <[email protected]>
Signed-off-by: mohamed-ben-khemis <[email protected]>
Signed-off-by: mohamed-ben-khemis <[email protected]>
Signed-off-by: mohamed-ben-khemis <[email protected]>
Signed-off-by: mohamed-ben-khemis <[email protected]>
Signed-off-by: mohamed-ben-khemis <[email protected]>
/ok-to-test |
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.
We are on the right path. Just added some comments there:
Also, can we reduce the logs generated?
:no Go files in /Users/ederign/src/kubeflow/notebooks/workspaces/backend
2025/02/18 10:29:57 Generating health_check.HealthCheck
2025/02/18 10:29:57 Generating health_check.ServiceStatus
2025/02/18 10:29:57 Generating health_check.SystemInfo
2025/02/18 10:29:57 Generating api.ErrorResponse
2025/02/18 10:29:57 create docs.go at api/v1/swagger/docs.go
2025/02/18 10:29:57 create swagger.json at api/v1/swagger/swagger.json
2025/02/18 10:29:57 create swagger.yaml at api/v1/swagger/swagger.yaml
workspaces/backend/Makefile
Outdated
##@ Swagger | ||
|
||
.PHONY: swag | ||
swag: |
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.
We will have to add instructions to either user install it or make sure that we install as binary. Do you think we can do similar to what we do on bin? with env test?
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.
Also, other kubeflow projects "version" the file under api folder:
https://github.com/kubeflow/model-registry/tree/main/api/
https://github.com/kubeflow/pipelines/tree/master/api
Can we do the same? If we have the generated file inside our codebase we add easily to kubeflow docs.
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.
@@ -0,0 +1,110 @@ | |||
// Package swagger Code generated by swaggo/swag. DO NOT EDIT | |||
package swagger |
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.
As I mention on other, my suggestion is to serialize into another folder (i.e. openapi) on root of backend
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.
Done! It's now generating into the openapi folder at the root of the backend(backend/openapi).
Great progress @Mohamed-ben-khemis take a look on our tests that are failing due to lack of binary. Also, 7 warning: failed to get package name in dir: ./, error: execute go list command, exit status 1, stdout:, stderr:no Go files in /Users/ederign/src/kubeflow/notebooks/workspaces/backend |
Signed-off-by: mohamed-ben-khemis <[email protected]>
Signed-off-by: mohamed-ben-khemis <[email protected]>
|
![]() |
/assign @ederign |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ederign The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Nice work @Mohamed-ben-khemis! This is a good starting point for our swagger generation. Let's review it on the call today with @thesuperzapper, and my suggestion would be for you to start the other endpoints! |
/lgtm |
Great! Thanks for the review @ederign. Now that this is merged, I'll begin working on the other endpoints. |
Closes #46
Summary
This PR introduces Swagger configuration for the project, enabling API documentation and interactive testing directly from the browser.
Changes Implemented
api/v1/swagger
.