Non-required parameters are checked for the in-file example
- Dominant language
- TypeScript
- Stars
- 104
- Forks
- 62
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 5
Description
For model validation, the request object composed for in-file example includes the non-required parameter. This ends up with false alarm on the non-required parameter type mismatch. Code fix may be around [here](https://github.com/Azure/oav/blob/d5deab20237e61f754ef26e23b7773eacac31448/lib/validators/modelValidator.ts#L458)
Since there're few cases using in-file example for swagger specs, so make this issue as low priority.
Contributor guide
Research direction
Start in lib/validators/modelValidator.ts around line 458 and trace how requests are composed for in-file examples. Verify how non-required parameters are included and how type mismatches are reported. Done means optional parameters no longer produce false type-mismatch alarms in these examples.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100