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

Verify RAML implementation in 1.0 #138

Closed
shucoshuco opened this issue Mar 28, 2017 · 3 comments
Closed

Verify RAML implementation in 1.0 #138

shucoshuco opened this issue Mar 28, 2017 · 3 comments

Comments

@shucoshuco
Copy link

Hi,

I started using this library to validate my Spring MVC implementation against a RAML definition. It works pretty well, thanks a lot.

I have found a couple of issues I would like to ask if they are some bugs or it is worked as intended for some reason.

RamlVerifier class hardcodes the creation of the factory to use always version 0.8. I changed it to detect the version depending on RAML file header and it worked.

Some methods in class RJP10V2RamlQueryParametere raise an UnsupportedOperationException in case the type of the parameter is different from expected one. But the class that uses this methods expects they return a null value if the validation does not apply. Therefor, I got this exception for any parameter. I tried returning null values instead of throwing the exception and everything works as expected.

This is a very useful libraty. Good job.

Regards,

Félix.

@kurtpa
Copy link
Collaborator

kurtpa commented Mar 29, 2017

The hardcoding of 0.8 was intentional since at present we can only go from RAML -> code with 1.0 support. With the file you tested, did you also include any Raml Types (1.0)?

Changing the QueryParameter to return null instead of throwing an exception makes sense

@shucoshuco
Copy link
Author

Yes, I have some types definition, and it is working.

@kurtpa
Copy link
Collaborator

kurtpa commented Mar 29, 2017

Cool! :) good to know :)

i'll apply these changes to 0.10.3

@kurtpa kurtpa closed this as completed in fdbfb92 Mar 29, 2017
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

No branches or pull requests

2 participants