-
Notifications
You must be signed in to change notification settings - Fork 286
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
Update openapi template #323
Conversation
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.
This will break references to our inline documentation in the majority of the endpoints.
license : | ||
name : "Apache 2.0" | ||
url : "http://www.apache.org/licenses/LICENSE-2.0.html" | ||
|
||
servers : | ||
- url : "{basePath}/{apiVersion}" |
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.
The basePath
variable is referenced from all swagger annotations.
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.
@andrescrz Is this inline documentation in Java ? Because it is being rendered correctly in the docs: https://www.comet.com/docs/opik/reference/rest_api/find-experiments
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.
No, that's actually the source of truth. The whole OpenAPI spec is generated from the swagger annotations in the Java code.
This affects the generated openapi.yaml
file which is served in localhost:3003.
I just checked and the missing variables are just ignored and it works well there. But you should clean up the old references.
After that, you just need to double check how the Fern generation is affected and if all is good in the auto-generated code of the SDK.
After those two are ok, you should be good to 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 have checked that the Fern SDK code is generated correctly (no diffs in the output code and trace logged correctly), I will go ahead and merge the change
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.
Great that you tested it and no issues, so fine to moved ahead with this. But I don't think it's right to leave the annotations in the Java code pointing to an deleted variable (basePath). I recommend cleaning those up in a follow up PR. It's a trivial change, just find a replace everywhere plus checking that all good after.
Details
Updates the openapi template used by the backend, this is needed for the docs