OpenAPITools / OpenAPITools/openapi-generator
Interfaces are not getting generated for the Model classes
Open
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
<plugin>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<output>${basedir}</output>
<inputSpec>${basedir}/src/main/resources/raml/v1/MAS_api.yaml</inputSpec>
<language>jaxrs-cxf</language>
<additionalProperties>true</additionalProperties>
<generateApis>true</generateApis>
<generateApiTests>false</generateApiTests>
<generateModels>true</generateModels>
<!-- <withInterfaces>true</withInterfaces> -->
<generateInterfaces>true</generateInterfaces>
<configOptions>
<sourceFolder>src/main/java</sourceFolder>
<useBeanValidation>true</useBeanValidation>
<modelPackage>com.mas.v1.swagger.model</modelPackage>
<apiPackage>com.mas.v1.swagger.resource</apiPackage>
<useWadlFeature>false</useWadlFeature>
<dateLibrary>java8</dateLibrary>
<customAnnotator>com.nagra.util.SchemaAnnotator</customAnnotator>
<extensions>
<extension>com.nagra.util.ResourceAnnotator</extension>
</extensions>
</configOptions>
</configuration>
</execution>
</executions>
</plugin>
Interfaces are not getting generated for the generated Model classes .
Is there any options to be enable the generation of the interface? ( something like <withInterfaces>true</withInterfaces>
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 shown for the jaxrs-cxf generator, especially generateModels, generateInterfaces, and the commented withInterfaces option. Trace how the generator handles the MAS_api.yaml input and determine the expected model-interface output; the work is done when interfaces are generated alongside the model classes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, openapi
- Domain
- api, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100