Added path parameter parser for Open API spec file imports #115
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.
Just added simple path parameter parser that includes these features:
example
property does exist inside theparameters.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
![image](https://private-user-images.githubusercontent.com/44611397/320263316-10498f30-5398-4545-9e0f-9bb90323b185.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ4NjA1NzcsIm5iZiI6MTcyNDg2MDI3NywicGF0aCI6Ii80NDYxMTM5Ny8zMjAyNjMzMTYtMTA0OThmMzAtNTM5OC00NTQ1LTllMGYtOWJiOTAzMjNiMTg1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI4VDE1NTExN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWVkYjM5ZGNlYTcwNDdmYmE2MmFmMmVlMDViMmI1MDQ5YjBlNjZjNDhjYjhjNzg5YzI5ZmVmZDUxOTRlNzJhOGImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.BRfh4BigKngl2HbM-zVrpVCBvBRpbETkUxzXN42DkTU)
{...}
path parameter into global variable, and doesn't support import path params automatically:After (the Path Parameters automatically imported):
![image](https://private-user-images.githubusercontent.com/44611397/320263335-59ecdde8-c751-419b-a51d-733186cb4246.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ4NjA1NzcsIm5iZiI6MTcyNDg2MDI3NywicGF0aCI6Ii80NDYxMTM5Ny8zMjAyNjMzMzUtNTllY2RkZTgtYzc1MS00MTliLWE1MWQtNzMzMTg2Y2I0MjQ2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI4VDE1NTExN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTY2MTA1Y2E5NzVjMTA3YjliM2UyNTQ1NGZlMTlkMDA0YWVjNzVlYjdkMmNlNDEyZjU0ZDE0MTdlNmU2ZmMwODAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.BvddUWAM2xZkJGgmHtTbOJKXrLZ1n9Ajt43HjakZ3WY)
Feel free to ask.