check if response exists bevor assigning to it #52
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
hi, its me again, working behind a corporate proxy isn't the best...
As you can see down in
strip-definition | line 263
it's trying to asssign an empty object toresponses
.Since the
description
dosen't have a response the code breaks.Not sure why it has to be an empty response, can't it just be deleted?
This behavior is problematic if the
removeResponses
flag is set.And a
description
is provided on the path (see #50)The response gets changed bevor all descriptions get stripped, that's why #50 didn't fix the real issue...
Furthermore I added a few more tests, to actually test the combination of all options in the presets.
I used a paramerized test to check if a api spec gets stripped properly. The array contains the preset and the expected stripped spec.
BTW: you got two high findings, that can be easly fixed by upgrading
wait-on
to 7.2.0 😅