quarkus-openapi-generator
quarkus-openapi-generator copied to clipboard
Server Code Generation does not support multiple yaml files
Hi team
My open api spec is structured as follows
common
-- common-spec.yaml
module1
-- module1.yaml
module2
-- module2.yaml
module1.yaml could use component/schema elements from common-spec.yaml. Before running the generation logic, I copy the common file common-spec.yaml and module1.yaml to a temp location and then run the code generation logic. This works for client code generation but fails for server code generation.
Server Config (fails):
<quarkus.openapi.generator.input-base-dir>/tmp/download/api-specs</quarkus.openapi.generator.input-base-dir>
<quarkus.openapi.generator.spec>module1.yaml</quarkus.openapi.generator.spec>
Client Config (works):
<quarkus.openapi-generator.codegen.input-base-dir>/tmp/download/api-specs</quarkus.openapi-generator.codegen.input-base-dir>
<quarkus.openapi-generator.codegen.include>module1.yaml</quarkus.openapi-generator.codegen.include>
I have tried going through the code base, I believe the issue is here https://github.com/quarkiverse/quarkus-openapi-generator/blob/main/server/deployment/src/main/java/io/quarkiverse/openapi/server/generator/deployment/codegen/ApicurioOpenApiServerCodegen.java#L88 - where we generate json file only for the input file and not other files in the /tmp/download/api-specs directory.
Since the behaviour here is inconsistent between server and client code generation - is this something to be implemented/fixed? If not, do we have any workaround for the same?
@carlesarnal please take a look
@ricardozanini @hbelmiro This is being labeled as Stale.
@mcruzdev are you going to take this one too?
@vladprado can you try this one? I can help you with some details.
Sure, @mcruzdev ! Assign it to me.
Nice @vladprado, just to give you a context... the server extension uses behind the scenes apicurio/apicurio-codegen project. Please, if necessary crest an issue there :)
@ricardozanini @hbelmiro This is being labeled as Stale.
@mcruzdev @ricardozanini Sorry for disappearing for so long. I will review this issue in the next few days and get back to it.
No worry @vladprado , take your time... let me know if you have any question.
Hi there. Any updates on this issue?
@lazno i was looking into it but I will be out till mid-October.
@ricardozanini @hbelmiro This is being labeled as Stale.