OpenAPITools / openapi-generator

OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
https://openapi-generator.tech
Apache License 2.0
20.54k stars 6.27k forks source link

[BUG][SPRING] execution with configuration file does not apply #18937

Open AdriaBergeAguilar opened 2 weeks ago

AdriaBergeAguilar commented 2 weeks ago

Bug Report Checklist

Description

The main problem that occurs to me is that the generation command does not use the properties that it applied with a yml file, it is assumed that all the properties are those that are documented for Spring and there is no way for them to be applied.

openapi-generator version
services:
  openapi-generator-version:
    image: openapitools/openapi-generator-cli
    command: version

openapi-generator-version-1 | 7.7.0-SNAPSHOT openapi-generator-version-1 exited with code 0

OpenAPI declaration file content or url

I am using the example file petstore.yaml for the open api definition, since my current intention is to configure the tool to generate the client and the server as I am interested.

petstore.yaml

Generation Details

I have prepared the following configuration file but not all the characteristics indicated in the documentation apply to me.

Spring-doc

I have put some characteristics of one of the examples to see if it reads my file and see how it applies the changes

example see

Then I see that the entire lombok theme applies them but does not apply all the Spring options, such as those of scm or those of develop.

Steps to reproduce

execute command docker.

docker-compose.yml

services:
  openapi-generator-api-v2:
    image: openapitools/openapi-generator-cli
    volumes:
      - ./config\api-config.yaml:/local/api-config.yaml
      - ./data/out:/local/out
      - ./data/petstore.yaml:/local/petstore.yaml
    command: generate -i /local/petstore.yaml -o /local/out/api -c /local/api-config.yaml 

petstore.yaml api-config.txt

Related issues/PRs
Suggest a fix