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(msw): no more missing properties. support oas31 const #1755

Merged

Conversation

AllieJonsson
Copy link
Contributor

Status

READY

Description

Fixes #1745
Also adds support for setting constant values using OpenAPI 3.1 const property, as used in the schema in the linked issue.

combine: combine
? {
separator: combine.separator,
includedProperties: [],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem was that the linked issue used a anyOf schema where both types has the properties payment_method_id and type. We then saved the includedProperties when traversing down into nested objects, which resulted in the missing properties. I think this is correct, as we don't reset the array, but we still want to be able to add properties of the nested objects.

@melloware melloware merged commit 1853e1b into orval-labs:master Dec 19, 2024
2 checks passed
@melloware
Copy link
Collaborator

nice work!

@AllieJonsson AllieJonsson deleted the fix/msw-missing-properties branch December 19, 2024 19:05
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.

Missing properties in autogenerated mock
2 participants