Skip to content

[General] nested "required" doesn't work #1201

@fuj1g0n

Description

@fuj1g0n
Description

openapi-generator doesn't recognized nested "required" of schemas.

openapi-generator version

current master 56c4751

OpenAPI declaration file content or url

https://gist.github.com/fujigon/3690e1c285ed0a1e06e344bf306725f4

Command line used for generation
# git clone, etc
mvn package
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -i my-api-spec/openapi.yaml -g jaxrs-jersey -o generated-code/ -v
Steps to reproduce

When I execute the generator with the gisted openapi.yaml file, I get
https://gist.github.com/fujigon/40c38652ca1ce6a93b0e5dbc2de277e8#file-stdout-L370 .

The problem is that, I set "bar" is as "required" (https://gist.github.com/fujigon/3690e1c285ed0a1e06e344bf306725f4#file-openapi-yaml-L24), but the openapi-generator doesn't recognize it.

Related issues/PRs
Suggest a fix/enhancement

#1200

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions