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

Line-numbers should be mentioned in the error. #26

Open prasannjeet opened 4 years ago

prasannjeet commented 4 years ago

Hello,

I was working with the validator plugin and as a beginner, it's taking me quite a lot of time just to find out in which line are the following errors:

[ERROR] SemanticError at Enrolment.id: Description missing for property [ERROR] SemanticError at paths./enrolments/{id}.delete.id: Description missing for parameter [ERROR] SemanticError at paths./enrolments/{id}.delete: Summary missing [ERROR] SemanticError at paths./enrolments/{id}.get: Summary missing

I have many "Enrolment", "Enrolments" in my swagger file. I will eventually find out the errors (I hope!) but it would save quite a lot of time, in case the line numbers were mentioned.

Thank you!

giuliopulina commented 4 years ago

Hi @prasannjeet, that's indeed something interesting, but I think that swagger-parser library (used to convert input file into object model) doesn't provide this feature: https://github.com/swagger-api/swagger-parser/issues/377

prasannjeet commented 4 years ago

Hello @giuliopulina, thanks for the information.