OpenAPITools / OpenAPITools/openapi-generator
[BUG][MARKDOWN] Enums in model are empty
Open
Nobody has claimed this yet.
Doc: Markdown
Issue: Bug
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Description
Enums in a model do not show possible values; they just have an empty table like regular objects, which is not suitable here.
components:
schemas:
WarningType:
enum:
- FORMATTED
- DISCONTINUITY
- SWITCH
# WarningType
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
openapi-generator version
4.3.0
OpenAPI declaration file content or url
Command line used for generation
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<version>4.3.0</version>
<executions>
<execution>
<id>markdown</id>
mvn clean compile
Steps to reproduce
Create OpenAPI yaml with enum component.
Related issues/PRs
Suggest a fix
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
Reproduce the issue from the attached bug.zip using the shown OpenAPI Generator Maven setup and inspect the generated Markdown model for WarningType. Compare enum output with the empty Properties table and verify that generated enum models list their possible values without affecting regular object models.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, markdown
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100