This PR addresses the issue #23 where a compact json string is incorrectly parsed as Yaml/Raml. To address that bug, I put the logic to identify the syntax in the method guessSyntax and I also unit test that method to make sure that the bug is actually fixed. Along with this, I also restructured the code a bit in ApiDefinitionParser.
Fixes #23
Checklist
[ ] My contributions and commit messages follows the style guidelines of this project
[ ] I have made corresponding changes to the documentation
[ ] New and existing unit tests pass locally with my changes
[ ] The Pull Request has an informative and human-readable title
[ ] Changes are limited to a single goal (avoid scope creep)
[ ] Code can be automatically merged (no conflicts)
[ ] I confirm that I have read any Contribution guidelines (CONTRIBUTING)
[ ] I confirm that I wrote and/or have the right to submit the contents of my PR, by agreeing to the Developer Certificate of Origin, by adding a 'sign-off' to my commits
Refactor ApiDefinitionParser to fix issue #23
Description
This PR addresses the issue #23 where a compact json string is incorrectly parsed as Yaml/Raml. To address that bug, I put the logic to identify the syntax in the method
guessSyntax
and I also unit test that method to make sure that the bug is actually fixed. Along with this, I also restructured the code a bit inApiDefinitionParser
.Fixes #23
Checklist