sylvainlaurent / swagger-validator-maven-plugin

A maven plugin that validates swagger files in yaml and json formats
Apache License 2.0
11 stars 6 forks source link

Issue-16: Fixing NPE during ComposedModel validation in InheritanceCh… #17

Closed oyeli closed 5 years ago

oyeli commented 5 years ago

@giuliopulina could you please look at this PR? There is some problem on CI with ByteBuddy tool during tests running. It causes build fail. At my local environment all tests passed successfully.

giuliopulina commented 5 years ago

Hi @oyeli, Travis CI build is failing because there are a couple of unit tests classes (specifically, OperationParametersReferenceValidatorTest and UtilTest) that are missing @RunWith(ValidatorJunitRunner.class) annotation. This JUnit runner must be added to all the test classes, otherwise ByteBuddy won't work properly (depending on the order test classes are ran): you can see that, with this change, build is successful. I think that you can apply the same simple change that I made.

Besides that, I think that this PR is missing a unit test that validates the bugfix, please let me know if you need help with that. Anyway, for the approval and merge you need to wait for @sylvainlaurent.

(I was forgetting: thanks for the PR ;) )

oyeli commented 5 years ago

Hi @giuliopulina! Thank you for help with tests. Build is fixed now. I'm going to add a unit test for the bugfix validating today.

oyeli commented 5 years ago

Hi @giuliopulina! I've added the test for InheritanceChainPropertiesValidator. Could you please look at my last commit https://github.com/sylvainlaurent/swagger-validator-maven-plugin/pull/17/commits/13853f7bad92a6e2c4a57cce5b8213dfa9354ff0 and check if everything is correct? Thank you!