openapi-generator icon indicating copy to clipboard operation
openapi-generator copied to clipboard

[BUG] html2 generator: documentation for schemas is missing

Open Cs4r opened this issue 1 year ago • 0 comments

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
  1. Use OpenApi spec provided
  2. Generate html documentation: mvn clean package
Generated docs

Screenshot 2024-04-24 at 16 12 46

Expected behaviour

The html2 generator of openapi-generator-maven-plugin should incorporate documentation for schemas within the resulting HTML documentation.

Cs4r avatar Apr 24 '24 14:04 Cs4r