Skip to content
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

Merged
merged 2 commits into from
Oct 4, 2024
Merged

Update openapi template #323

merged 2 commits into from
Oct 4, 2024

Conversation

jverre
Copy link
Collaborator

@jverre jverre commented Sep 27, 2024

Details

Updates the openapi template used by the backend, this is needed for the docs

@jverre jverre requested a review from a team as a code owner September 27, 2024 16:18
Copy link
Collaborator

@andrescrz andrescrz left a 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}"
Copy link
Collaborator

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.

Copy link
Collaborator Author

@jverre jverre Sep 30, 2024

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

Copy link
Collaborator

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.

Copy link
Collaborator Author

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

Copy link
Collaborator

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.

@jverre jverre merged commit a422d75 into main Oct 4, 2024
7 checks passed
@jverre jverre deleted the jacques/update_openapi_template branch October 4, 2024 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants