-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Open
Description
Description
If you use the cwiki generator, there are two problems in the Models table at the bottom of the generated Confluence wiki markup. First, the required column is not checked when required: true. Second, the description is not filled in when referencing another component such as $ref: "/#components/schemas/Error"
openapi-generator version
Version 3.3.1.
OpenAPI declaration file content or url
Modified petstore.yaml. Change the components section to be:
components:
schemas:
Pet:
required:
- id
- name
properties:
id:
type: integer
format: int64
description: Id of the pet
name:
type: string
description: Name of the pet
tag:
type: string
description: Tag of the pet
msg:
$ref: "#/components/schemas/Error"
description: Message of the pet
Pets:
type: array
items:
$ref: "#/components/schemas/Pet"
Error:
required:
- code
- message
properties:
code:
type: integer
format: int32
message:
type: stringCommand line used for generation
java -jar openapi-generator-cli.jar generate -i ~/test_openapi/petstore.yaml -g cwiki -o ~/openapi-output/petstoreCWiki
Steps to reproduce
- Make a yaml file that has at least two components.
- Make at least one of the properties on a component required. (In the example above, note that both Pet and Error have required properties).
- Make one of the components have a property of the other component. Add a description to that property. (In the example above, Pet has a msg property of component Error and the msg property has a description).
- Run the cwiki generator.
- Note that the Models table at the bottom does not have the checkbox(es) for the required property/properties.
- Note that the description of the property of the other component type is not listed in the description column. (The other description rows are fine).
Related issues/PRs
Suggest a fix/enhancement
I think something is wrong in the mustache template, but I don't know.
Metadata
Metadata
Assignees
Labels
No labels