OpenAPITools / OpenAPITools/openapi-generator
[BUG] html2 generator: documentation for schemas is missing
Open
Nobody has claimed this yet.
Issue: Bug
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Description
openapi-generator-maven-plugin fails to include documentation for schemas in the generated HTML documentation, despite configuring the plugin to do so.
openapi-generator version
7.5.0
plugin configuration
<plugin>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<version>7.5.0</version>
<executions>
<execution>
<id>generate-html-docs</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.basedir}/spec.json</inputSpec>
<generatorName>html2</generatorName>
<output>${project.build.directory}/docs</output>
<generateModelDocumentation>true</generateModelDocumentation>
</configuration>
</execution>
</executions>
</plugin>
OpenAPI declaration file content (spec.json)
{
"openapi": "3.0.0",
"info": {
"title": "Sample contract",
"version": "1.0.0"
},
"paths": {},
"components": {
"schemas": {
"Request": {
"type": "object",
"required": ["token"],
"properties": {
"token": {
"type": "string"
}
}
}
}
}
}
Steps to reproduce
- Use OpenApi spec provided
- Generate html documentation:
mvn clean package
Generated docs
Expected behaviour
The html2 generator of openapi-generator-maven-plugin should incorporate documentation for schemas within the resulting HTML documentation.
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 spec.json example in the issue, then run mvn clean package using the html2 generator. Inspect the generated HTML documentation for the Request schema and verify that schema documentation is included as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, openapi
- Domain
- documentation, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100