quarkiverse / quarkus-openapi-generator

OpenAPI Generator - REST Client Generator
Apache License 2.0
125 stars 89 forks source link

compile fails if directory "openapi" is not present, even if another directory is used #871

Open SteveGueldner opened 4 days ago

SteveGueldner commented 4 days ago

Hi!

when I use a different path than "../resources/openapi" for my API definition and omit the directory completely, then compilation fails. When I just add an empty directory "openapi" but keep using the different path it works without any problems.

How to reproduce:

  1. Delete the directory "openapi" or don't even create it
  2. Define a different path in application.properties: quarkus.openapi.generator.spec=../test/openapi.yaml
  3. (mvn clean)
  4. mvn compile

Result:

Compilation fails due to missing referenced imports. No error message suggesting the missing file or directory.

Possible workaround:

Just add an empty directory "openapi" in resources. If Git can't handle the empty directory just put in a dummy file.

Versions used:

quarkus-openapi-generator: 2.6.0 Quarkus: 3.15.2 Java: 21 maven-compiler-plugin: 3.9.6

SteveGueldner commented 12 hours ago

Just realized I forgot to mention that this happened with quarkus-openapi-generator-server...

hbelmiro commented 10 hours ago

cc @carlesarnal