Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check if response exists bevor assigning to it #52

Merged

Conversation

sebastian-otto-axa
Copy link
Contributor

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 to responses.
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 😅

@anttiviljami anttiviljami merged commit 7694bef into openapistack:main Aug 19, 2024
2 checks passed
@anttiviljami
Copy link
Member

Thanks @sebastian-otto-axa! Merged this, ran npm audit fix and shipped a new version openapicmd@2.4.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants