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

Property mp.openapi.extensions.smallrye.openapi is being overwritten by Maven plugin #2129

Open
jbgomond opened this issue Jan 5, 2025 · 2 comments · May be fixed by #2136
Open

Property mp.openapi.extensions.smallrye.openapi is being overwritten by Maven plugin #2129

jbgomond opened this issue Jan 5, 2025 · 2 comments · May be fixed by #2136
Labels
bug Something isn't working plugin/maven

Comments

@jbgomond
Copy link

jbgomond commented Jan 5, 2025

Hello,

It seems that defining the OpenAPI version via mp.openapi.extensions.smallrye.openapi does not work with the Maven plugin.
It works fine with other properties like "mp.openapi.extensions.smallrye.duplicateOperationIdBehavior" and "mp.openapi.extensions.smallrye.operationIdStrategy".

To define the value, I need to define the "openApiVersion" config property in pom.xml.

It's maybe linked to the default value being 3.1.0 ?

Thanks !

@MikeEdgar
Copy link
Member

Hi @jbgomond , where are you setting the properties outside of the POM? In a .properties file?

@jbgomond
Copy link
Author

jbgomond commented Jan 5, 2025

Hi @MikeEdgar, yes I've set the following in application.properties :

mp.openapi.extensions.smallrye.openapi=3.0.3
mp.openapi.extensions.smallrye.duplicateOperationIdBehavior=FAIL
mp.openapi.extensions.smallrye.operationIdStrategy=PACKAGE_CLASS_METHOD

and in pom.xml :

<plugin>
    <groupId>io.smallrye</groupId>
    <artifactId>smallrye-open-api-maven-plugin</artifactId>
    <version>${smallrye-open-api-plugin.version}</version>
    <executions>
        <execution>
            <goals>
                <goal>generate-schema</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
        <configProperties>${basedir}/src/main/resources/application.properties</configProperties>
    </configuration>
</plugin>

duplicateOperationIdBehavior and operationIdStrategy works well, not openapi

Thanks

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

Successfully merging a pull request may close this issue.

2 participants