swagger-api / swagger-api/swagger-codegen

Spring Java generated OpenAPI HTML web page doesn't properly render embedded API docs?

Open
#9,648 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Description

OpenAPI codegen generated API documentation for Spring Java HTML REST API web page appears incomplete. In particular, the model and example code of the YAML specification, whether or not the schema is specified in context or a $ref, is not echoed to the screen.

Swagger-codegen version

3.0.10

Swagger declaration file content or url

This NIH project OpenAPI 3.0 specification:

https://raw.githubusercontent.com/NCATS-Tangerine/NCATS-ReasonerStdAPI/master/API/TranslatorReasonersAPI.yaml

is what we're trying to run through the Spring Java codegen.

If there are some things non-compliant with the OpenAPI 3.0 specification, let me know. However, this specification seems to render well in the Swagger editor (https://editor.swagger.io/?url=https://raw.githubusercontent.com/NCATS-Tangerine/NCATS-ReasonerStdAPI/master/API/TranslatorReasonersAPI.yaml).

It would be helpful to have a reliable Spring Java code generator again by fixing this and other recent related issues (https://github.com/swagger-api/swagger-codegen/issues/9644, https://github.com/swagger-api/swagger-codegen/issues/9645, https://github.com/swagger-api/swagger-codegen/issues/9646) posted.

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

The issue provides the TranslatorReasonersAPI.yaml specification and the Swagger Editor URL, but names no repository files or tests. Start by generating the Spring Java HTML documentation with swagger-codegen 3.0.10 and compare its missing model and example output with the Swagger Editor rendering. Done means embedded API documentation renders those model and example details for both inline schemas and $ref schemas.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, openapi, spring
Domain
api, documentation
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.