smallrye / smallrye-open-api

SmallRye implementation of Eclipse MicroProfile OpenAPI
Apache License 2.0
112 stars 87 forks source link

How to use system properties in Maven plugin? #1822

Closed morettileo closed 1 week ago

morettileo commented 2 months ago

With reference to #1063, I tried to specify some properties but they are ignored.

<plugin>
  <artifactId>smallrye-open-api-maven-plugin</artifactId>
  <groupId>io.smallrye</groupId>
  <version>3.10.0</version>
  <executions>
      <execution>
          <id>generate-openapi</id>
          <phase>process-classes</phase>
          <goals>
              <goal>generate-schema</goal>
          </goals>
          <configuration>
              <scanDependenciesDisable>true</scanDependenciesDisable>
              <systemPropertyVariables>
                  <mp.openapi.extensions.smallrye.defaultConsumes>*/*</mp.openapi.extensions.smallrye.defaultConsumes>
                  <mp.openapi.extensions.smallrye.auto-inheritance>BOTH</mp.openapi.extensions.smallrye.auto-inheritance>
              </systemPropertyVariables>
          </configuration>
      </execution>
  </executions>
</plugin>

Neither mp.openapi.extensions.smallrye.defaultConsumes or mp.openapi.extensions.smallrye.auto-inheritance has effect on generation.

MikeEdgar commented 2 months ago

I think this is a bug that was fixed with #1774, which will be in the next release soon.

codespearhead commented 3 weeks ago

@morettileo PR #1774 is available in v3.11.0, which was released two days ago.

Is this problem solved?

Postremus commented 1 week ago

Hey @MikeEdgar I just tested this. With 3.11 systemProperties work.

MikeEdgar commented 1 week ago

Thanks @Postremus

Fixed by #1774