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 support for reporting UserErrors when provided definition is invalid. #81

Merged
merged 4 commits into from Feb 14, 2024

Conversation

VShingala
Copy link
Member

@VShingala VShingala commented Jan 31, 2024

Overview

This PR fixes and issue where certain RAML definitions with traits that had description mentioned in them were failing. (Example definition).

This PR also includes support for introducing UserErrors when definition fails to convert and it's invalid definition. For validating the definition, we're using webapi-parser. We've also bumped up some of dependencies version to fix known critical vulnerabilities.

RCA

Issue was happening while assigning some of properties that an endpoint inherits via traits. In traits we can also have properties that are not object but we were using Object.assign in such case which resulted in below error.

ConversionError: TypeError: Cannot assign to read only property '0' of object '[object String]'

@@ -215,6 +216,19 @@ describe('CONVERT FUNCTION TESTS ', function() {
});
});

it('The converter should convert basic raml spec to postman collection ' +
'with proper headers, body, responses and security schemes', function(done) {
Copy link

Choose a reason for hiding this comment

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

The test description should be about the user error.

@VShingala VShingala merged commit 29865ee into develop Feb 14, 2024
3 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