OpenAPITools / OpenAPITools/openapi-generator
[BUG][JAVA][MAVEN] Generated classes using 3GPP Release 17 yamls does not contain all the classes
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
I am using OpenAPIGenerator to generate model classes for Release 17 of 3gpp standards. I noticed that some classes present in the yaml files were absent from the generated forlder. This problem is specific to code generation using release 17, the classes were not missing when release 16 yaml files were used.
OpenAPI Generator Versions:
I tried 6.0.0, 6.1.0, 6.2.0, 6.3.0, 6.4.0, and 7.0.0-beta. The number of missing classes was higher in 6.x.x versions as compared to 7.0.0-beta version, but classes were missing nevertheless.
Generation Details:
<build>
<plugins>
<plugin>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<!--<version>4.2.3</version> -->
<!--USE <version>4.3.1</version> FOR GENERATING AppliedBdtPolicy -->
<version>7.0.0-beta</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>src/main/resources/TS29510_Nnrf_NFManagement.yaml</inputSpec>
<generatorName>spring</generatorName>
<apiPackage>${default-package}.api</apiPackage>
<modelPackage>${default-package}.model</modelPackage>
<invokerPackage>${default-package}.invoker</invokerPackage>
<supportingFilesToGenerate>ApiUtil.java</supportingFilesToGenerate>
<library>spring-boot</library>
<configOptions>
<delegatePattern>true</delegatePattern>
<openApiNullable>false</openApiNullable>
</configOptions>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<proc>none</proc>
</configuration>
</plugin>
</plugins>
</build>
Steps to reproduce:
Please goto https://forge.3gpp.org/rep/all/5G_APIs/-/blob/REL-17 for 3gpp release 17 yaml files.
- keep the extracted yaml files at src/main/resources.
- generate code by specifying a yaml file in inputSpec in the pom.xml file of the project. <eg: TS29510_Nnrf_NFManagement.yaml> This is an example of a yaml file for which all the classes are not generated.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Maven configuration in pom.xml and the input spec src/main/resources/TS29510_Nnrf_NFManagement.yaml, then reproduce generation with the Spring generator and compare the generated models with the classes defined in the Release 17 YAML. Done means the missing classes are generated consistently for this spec and the behavior is checked against the Release 16 case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100