-
Notifications
You must be signed in to change notification settings - Fork 33
Details about mockapi rule
Yuchao Yan edited this page Aug 22, 2022
·
1 revision
mockapi rule about check logic in mockapi.ts
:
- Only check whether the required property exist like: https://github.com/Azure/cadl-ranch/blob/aa782b96539185cae59ae85aafe283e04a225056/packages/cadl-ranch-specs/http/models/input-basic/mockapi.ts#L7-L10
- Comment the expected requstBody in
@scenarioDoc
ofmain.cadl
and check whether received requestBody is exactly same with expected requestBody like: https://github.com/Azure/cadl-ranch/blob/c1aecffe73b1a30ba22c554353b42548766301bc/packages/cadl-ranch-specs/http/models/collections-basic/mockapi.ts#L8-L9.
Both are ok and please choose one to implement the mockapi.ts