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

Reusable requestBodies not recognized #909

Open
krisraich opened this issue Dec 12, 2024 · 3 comments
Open

Reusable requestBodies not recognized #909

krisraich opened this issue Dec 12, 2024 · 3 comments
Labels
area:server This item is related to the server extension

Comments

@krisraich
Copy link

Predefined request Bodies (components.requestBodies) are ignored when generating Classes.

See: https://swagger.io/docs/specification/v3_0/describing-request-body/describing-request-body/#reusable-bodies
and: https://github.com/quarkiverse/quarkus-openapi-generator/blob/main/server/deployment/src/test/resources/openapi/petstore-openapi.yaml#L776

Hence, using

post:
  summary: Some Method
  requestBody:
    $ref: '#/components/requestBodies/PetBody'

results in

  @POST
  void someMethod();

instead of

  @POST
  void someMethod(@NotNull PetBody data);
@ricardozanini
Copy link
Member

ricardozanini commented Dec 16, 2024

@krisraich which version are you using? Is this the server side version, right?

@ricardozanini ricardozanini added the area:server This item is related to the server extension label Dec 16, 2024
@krisraich
Copy link
Author

I use version 2.4.7 2.8.0 on Quarkus 3.17.4 with java 17. Yes it's on the server side with the following configuration:

<quarkus.openapi.generator.spec>mySpecs.yml</quarkus.openapi.generator.spec>
<quarkus.openapi.generator.base-package>com.myProject</quarkus.openapi.generator.base-package>

pom dependency:

        <dependency>
            <groupId>io.quarkiverse.openapi.generator</groupId>
            <artifactId>quarkus-openapi-generator-server</artifactId>
            <version>2.8.0</version>
        </dependency>

I just upgraded from 2.4.7 to 2.8.0 but it still seems not to work

@ricardozanini
Copy link
Member

cc @carlesarnal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:server This item is related to the server extension
Projects
None yet
Development

No branches or pull requests

2 participants