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
DevSDK
changed the title
Mock generation doesn't guarantee the required property creation
Mock generation doesn't guarantee the required property mocking
Feb 8, 2024
What are the steps to reproduce this issue?
/test
directorytests/generated/angular/tags-split/pets/pets.msw.ts
What happens?
The element of generated result possibly does not have the required property.
The schemes:
https://github.com/anymaniax/orval/blob/288f48876509978bfbf5449f52ba214f54cc33e5/tests/specifications/petstore.yaml#L179-L186
https://github.com/anymaniax/orval/blob/288f48876509978bfbf5449f52ba214f54cc33e5/tests/specifications/petstore.yaml#L64-L119
One of actual generated mocking function:
What were you expecting to happen?
The required property must exist.
Any logs, error output, etc?
This can non-type error because the spread syntax makes the type 'any'. [1]
[1] https://www.typescriptlang.org/play?ts=5.2.2#code/FAFwngDgpgBAClEMC8MDeMB2BDAtrALhgGcQAnAS0wHMYBfYYAYwHtNSYA3bAGwFcoRBElRoc+IgCIQUXBEn1GrdkmyYwANV4CiasCnSLmbDjNJDEBjDAB0dvVv6wGwIA
Any other comments?
Further context:
#1199 (comment)
What versions are you using?
Current master 288f488
Operating System: …
Package Version: 6.24.0 …
Browser Version: …
The text was updated successfully, but these errors were encountered: