You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
melloware
changed the title
Code generator fails to produce MSW source code for nested objects with the same attribute names.
MSW: nested objects with the same attribute names.
Nov 9, 2023
What are the steps to reproduce this issue?
Set Up the Environment:
orval
v6.17.0 on your machine.Provide the OpenAPI Definition:
Create an OpenAPI document in which the
parent
attribute appears multiple times in a nested structure.Run Orval Code Generator:
run command with config
mock:true
.Inspect the Generated MSW Mock:
What happens?
The
GreatParent
type, which should appear nested under theGrandParent
schema'sparent
attribute in the generated MSW mock, is missing.What were you expecting to happen?
The
GreatParent
mock should be generated in the MSW mock file, reflecting its definition and the structure provided in the OpenAPI spec.Any logs, error output, etc?
No specific error messages are shown during the code generation, but the generated code is missing the expected mock structure.
Any other comments?
It's crucial for our application to have complete mock data for accurate testing, including nested types.
What versions are you using?
**Operating System: Mac Ventura 13.4.1
**Package Version: Orval: v6.17.0, Node:20.5.0
**Browser Version: -
The text was updated successfully, but these errors were encountered: