-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add empty
value
check in getRequestBodyExamples() (#904)
| 🚥 Resolves ISSUE_ID | | :------------------- | ## 🧰 Changes There is a weird case in our main repo where we initialize `Webhooks` with an empty `requestBodyExamples` with the following structure: ``` requestBodyExamples: [ { mediaType: 'application/json', examples: [{ value: undefined }], }, ]; ``` This causes `Operation.getRequestBodyExamples()` to return with an empty request example even though we should be creating an example for them. This adds an extra check so that we avoid returning the empty example and proceed to the subsequent `getRequestBodyExamples()` call that generates an example for the user. ## 🧬 QA & Testing Provide as much information as you can on how to test what you've done.
- Loading branch information
1 parent
42c2a5d
commit dcb7ab6
Showing
2 changed files
with
37 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters