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

Inconsistent Java API generated from openapi.yaml #2233

Open
ecervena opened this issue Jan 14, 2025 · 0 comments
Open

Inconsistent Java API generated from openapi.yaml #2233

ecervena opened this issue Jan 14, 2025 · 0 comments
Labels
type/bug Something isn't working

Comments

@ecervena
Copy link

Describe the bug

Java API generated from openapi.yaml does not work OOTB without modifications. I have used java openapi generator version 7.10.0 to generate classes.

Goal was to utilize RunApi and post run data.

You can see client initialization and call here.

Modifications needed:

  1. There was no obvious way how to initialize ApiClient with authentication (authName, ApiKey).
    Therefor I needed to add constructor to ApiClient.

  2. Later in the chain there was no call which sets authentication names in order to utilize required authentication method. I needed to modify RunApi.

  3. There was also a problem with double escaped json body when provided body was already valid json.

Version

Horreum version 0.17 (openapi.yaml)

Link to thread with discussion in slack #horreum channel

(Yes, in this case provided horreum-client from hyperfoil.tools would be more convenient to use.)

@ecervena ecervena added the type/bug Something isn't working label Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant