swagger-api / swagger-api/swagger-codegen

swagger-codegen-cli-3.0.8 generation with 3 separated yaml

Open
#12,193 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Description

Unable to have a correct Java generation with 3 separated yaml files

Swagger-codegen version

swagger-codegen-cli-3.0.8.jar

Swagger declaration file content or url

First Yaml:
https://1drv.ms/u/s!ApK-i4jlhHB-qmpjQUB6GHoRqHyO?e=Q5TO2i

Second Yaml
https://1drv.ms/u/s!ApK-i4jlhHB-qmk_7jRkPQzsiKCg?e=iTuQgr

Last Yaml:
https://1drv.ms/u/s!ApK-i4jlhHB-qmtFRbziMmQkTYMr?e=07QeT3

Command line used for generation

java -jar ../../../python/External/swagger-codegen-cli-3.0.8.jar generate -i ../../../python/Development/APIDefinition/OAS_v3/Blue.yaml -l java -o Blue

java -jar ../../../python/External/swagger-codegen-cli-3.0.8.jar generate -i ../../../python/Development/APIDefinition/OAS_v3/EntityModels.yaml -l java -o Blue

java -jar ../../../python/External/swagger-codegen-cli-3.0.8.jar generate -i ../../../python/Development/APIDefinition/OAS_v3/Models.yaml -l java -o Blue

When I generate 3 projects java, I saw that for example in my First yaml "Blue.yaml" I use Entity, but I didn't have the really declaration of the Entity object that I described in the second YAML.

My question is, how I can refer on the first yaml the type describe in the second yaml "EntityModels.yaml" and generate only one project Java with all type plz ?

Because for example in the "Blue" java generated project the "Entity" java class of the BulkOperation object haven't the attributes/properties declared in the second YAML.

Thank a lot and best regards,
Adrien

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the three named inputs, Blue.yaml, EntityModels.yaml, and Models.yaml, and the swagger-codegen-cli-3.0.8 generate commands. Check how the generator handles references or definitions across separate OpenAPI files and whether one invocation can produce the requested Java project. Done means the generated Blue project contains Entity with the properties declared in EntityModels.yaml.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, openapi
Domain
backend-api-design
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.