OpenAPITools / OpenAPITools/openapi-generator

[BUG][Markdown] Missing `title` in the Model markdown

Open
#9,407 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Issue: Bug
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Bug Report Checklist
  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

Missing title in the Model markdown generated by markdown generator.

openapi-generator version

5.1.0

Generation Details
            <plugin>
                <groupId>org.openapitools</groupId>
                <artifactId>openapi-generator-maven-plugin</artifactId>
                <version>5.1.0</version>
                <executions>
                    <execution>
                        <id>3</id>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <configuration>
                            <inputSpec>${project.basedir}/src/main/resources/search.api.yaml</inputSpec>
                            <generatorName>markdown</generatorName>
                            <output>${project.basedir}/doc/markdown/search</output>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
Steps to reproduce
  1. Have following component schema in a yaml file
components:
  schemas:
    FooBar:
      title: Foo
      description: Bar
  1. Use markdown generator to generate

Expect:

Name Type Title Description
FooBar String Foo Bar

Actual:

Name Type Description Notes
FooBar String Bar [default to null]

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the markdown generator entry point and the template or rendering path for model schemas. Reproduce the issue with the shown FooBar schema, then verify that generated model markdown includes its title alongside the name, type, and description.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, markdown, openapi
Domain
documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.