OpenAPITools / OpenAPITools/openapi-generator
[REQ] Conveniently only generate client classes
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
I often generate client code from a spec file with the maven plugin, like this:
<configuration>
<inputSpec>src/main/oas/oas.yaml</inputSpec>
<generatorName>java</generatorName>
<library>native</library>
<configOptions>
<dateLibrary>java8</dateLibrary>
</configOptions>
<apiPackage>${project.groupId}.client</apiPackage>
<modelPackage>${project.groupId}.client</modelPackage>
<invokerPackage>${project.groupId}.client</invokerPackage>
<generateApiTests>false</generateApiTests>
<generateModelTests>false</generateModelTests>
<generateModelDocumentation>false</generateModelDocumentation>
<generateApiDocumentation>false</generateApiDocumentation>
<supportingFilesToGenerate>
ApiException.java,Pair.java,ApiClient.java
</supportingFilesToGenerate>
</configuration>
It would be nice to have a single config property that disables the generation of tests, documentation and also all the supporting files that are not needed for compilation.
It would also be nice to be able to specify the package name only once if you want everything in the same package. packageName does not do this.
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 plugin configuration and the existing generateApiTests, generateModelTests, generateModelDocumentation, generateApiDocumentation, supportingFilesToGenerate, and package settings shown in the issue. Trace how these options are applied, then define and test the requested consolidated generation and package-name behavior against the Java client example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100