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

[BUG] [JAVA] annotation library bug when generating spring-http-interface via online generator #20468

Open
4 of 6 tasks
ciis0 opened this issue Jan 14, 2025 · 0 comments
Open
4 of 6 tasks

Comments

@ciis0
Copy link

ciis0 commented Jan 14, 2025

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

when generating spring client with library spring-http-interface via openapi-generator-online the annotationLibrary is set to swagger2.

openapi-generator version

7.11.0-SNAPSHOT / master@4259e927

OpenAPI declaration file content or url

https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml

Generation Details

using openapi-generator-online (using cli the generated code is fine!)

Steps to reproduce
curl -X POST "http://localhost:8888/api/gen/clients/spring" -H "Accept: */*" -H "Content-Type: application/json" -d "{ \"openAPIUrl\": \"https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml\",\"options\":{ \"library\": \"spring-http-interface\"}}"

generates a ZIP that has undeclared @Parameter annotations on parameters, e.g. in spring-client/src/main/java/org/openapitools/api/PetApi.java:

image

Related issues/PRs

N/A

Suggest a fix

workaround:

add "documentationProvider": "none" to options.

@ciis0 ciis0 changed the title [BUG] [JAVA]annotation library bug when generating spring-http-interface via online generator [BUG] [JAVA] annotation library bug when generating spring-http-interface via online generator Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant