Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Swagger generation for array of embedded objects with empty array as default value #11

Merged
merged 1 commit into from
Jul 22, 2024

Conversation

pidhorodetskyi
Copy link
Contributor

@pidhorodetskyi pidhorodetskyi commented Jun 25, 2024

If response dto has property $entities with type Entity[] and with default value as empty array
swagger file will be generated with empty array and not with Entity[] schema

{
 "entities": []
}

This part of code will replace empty array with Generator::UNDEFINED
and swagger file will generate proper Entity[] schema

{
    "entities": [
        {
            "propertyId": 0,
            "branchId": 0,
            ....
        }
    ]
}

@pidhorodetskyi pidhorodetskyi changed the title Fix Swagger generation for array of embedded objects with empty array… Fix Swagger generation for array of embedded objects with empty array as default value Jun 25, 2024
@diego1auto diego1auto merged commit a030263 into auto1-oss:master Jul 22, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants