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

feat(openapi:reduce): pass opts #684

Merged
merged 8 commits into from
Nov 30, 2022
Merged

feat(openapi:reduce): pass opts #684

merged 8 commits into from
Nov 30, 2022

Conversation

kanadgupta
Copy link
Member

@kanadgupta kanadgupta commented Nov 30, 2022

🚥 Fix #683

🧰 Changes

Adds the ability to pass in opts to the openapi:reduce command.

🧬 QA & Testing

Check out this branch and run the following commands:

# install deps
npm ci

# success state
npm run debug -- openapi:reduce __tests__/__fixtures__/petstore-simple-weird-version.json --tag pet --out test.json

# fail state
npm run debug -- openapi:reduce __tests__/__fixtures__/petstore-simple-weird-version.json --path /unknown-path --out test.json

Does it work?

@@ -140,7 +180,7 @@ export default class OpenAPIReduceCommand extends Command {
Command.debug(
`options being supplied to the reducer: ${JSON.stringify({
tags: promptResults.tags,
paths: promptResults.tags,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops

@kanadgupta kanadgupta added enhancement New feature or request command:openapi Issues pertaining to the `openapi`, `validate`, `reduce`, or `swagger` commands labels Nov 30, 2022
@kanadgupta kanadgupta marked this pull request as ready for review November 30, 2022 19:03
README.md Outdated Show resolved Hide resolved
kanadgupta and others added 2 commits November 30, 2022 13:21
@kanadgupta kanadgupta merged commit 5fc4cee into main Nov 30, 2022
@kanadgupta kanadgupta deleted the openapi-reduce-opts branch November 30, 2022 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
command:openapi Issues pertaining to the `openapi`, `validate`, `reduce`, or `swagger` commands enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] Non-interactive Reduction of an OpenAPI Definition
2 participants