-
Notifications
You must be signed in to change notification settings - Fork 117
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
Support OpenAPI for custom APIs #5134
Conversation
runtime/server/api.go
Outdated
baseSpec := &spec.Swagger{ | ||
SwaggerProps: spec.SwaggerProps{ | ||
Swagger: "2.0", |
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.
Any reason for using v2 instead of v3?
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.
Majorly, to align with project swagger specs and also there is no support of v3 in go-openapi/spec
There is go-openapi/spec3 but it is incomplete
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.
I think we should go for OpenAPI 3 if possible because it has some useful new features and has been out for a very long time. These libraries might be worth looking into:
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.
Migrated to kin-openapi
# Conflicts: # proto/gen/rill/runtime/v1/resources.pb.go # web-common/src/runtime-client/gen/index.schemas.ts
# Conflicts: # proto/gen/rill/runtime/v1/resources.pb.go
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.
I think this PR looks great now, I think we should use OpenAPI v3 though (see my response to the last unresolved comment)
Closes #4424
Example of OpenAPI spec