Quarkus Openapi

62 Views Asked by At

Currently I'm using the quarkus-maven-plugin

      <plugin>
        <groupId>io.quarkus.platform</groupId>
        <artifactId>quarkus-maven-plugin</artifactId>
        <version>3.8.1</version>
        <executions>
          <execution>
            <goals>
              <goal>build</goal>
              <goal>generate-code</goal>
              <goal>generate-code-tests</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

This generates the model pojo and an interface for my api, however is there a possibility to generate a delegate class containing the default implementation using quarkus-maven-plugin ?

1

There are 1 best solutions below

0
Phillip Krüger On

Where are those classes? Are they in a seperate jar? You can find all options for setting the scanning up here: https://github.com/smallrye/smallrye-open-api/tree/main/tools/maven-plugin#configuration-options

You can also consider, when using Quarkus, to rather use the build-in scanner, and not the maven plugin. You can just save the openAPI file as generated by Quarkus by setting this property: https://quarkus.io/guides/openapi-swaggerui#quarkus-smallrye-openapi_quarkus-smallrye-openapi-store-schema-directory

It's explained here: Quarkus Openapi extension : Get the generated openapi yml file at build time