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

Added path parameter parser for Open API spec file imports #115

Merged
merged 5 commits into from
Apr 7, 2024
Merged

Conversation

azvyae
Copy link
Contributor

@azvyae azvyae commented Apr 7, 2024

Just added simple path parameter parser that includes these features:

  • Allow import path parameter automatically to Restfox by reading Open API JSON/YAML spec file.
  • Supports examples, so if the example property does exist inside the parameters.schema property, the parser will automatically includes it as a value in Restfox.

This PR just added js-yaml package to be able read and convert yaml file into js object. The purpose of this feature addition is because it is indeed mentioned in the #51 issue.

Before, the insomnia-importers converts the {...} path parameter into global variable, and doesn't support import path params automatically:
image

After (the Path Parameters automatically imported):
image

Feel free to ask.

Copy link

netlify bot commented Apr 7, 2024

Deploy Preview for chimerical-kitsune-a0bfa0 ready!

Name Link
🔨 Latest commit 2bdeab3
🔍 Latest deploy log https://app.netlify.com/sites/chimerical-kitsune-a0bfa0/deploys/6612828a3120920008cc27bb
😎 Deploy Preview https://deploy-preview-115--chimerical-kitsune-a0bfa0.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@flawiddsouza
Copy link
Owner

Thanks for the PR. Just checked with different openapi v2 and v3 exports and everything seems to be working fine.

Just tiny formatting fixes are required.

image
Please add back the new lines that were removed, as it's not related to the implementation.

image
Please add an empty new line at the end here. I think npm run lint-fix should also do this for you.

@azvyae
Copy link
Contributor Author

azvyae commented Apr 7, 2024

Done, fixed

@flawiddsouza flawiddsouza merged commit a0499e5 into flawiddsouza:main Apr 7, 2024
6 checks passed
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.

None yet

2 participants