openapi-tools / swagger-maven-plugin

Maven plugin to activate the Swagger Core library to generate OpenAPI documentation.
MIT License
72 stars 46 forks source link

Semantic of recursive scanning #21

Closed langecode closed 4 years ago

langecode commented 5 years ago

Your code currently does not check for "package." but rather "package" with a startsWith, so if I have two packages like a.b.cde.SomeWS and a.b.cdefgh.SomeWS

you'll match both classes if I specify a.b.cde as package and recurse flag is specified. That's why my code had a startsWith(package+".") in the check...

Hope you fix it...

Originally posted by @sunnymoon in https://github.com/openapi-tools/swagger-maven-plugin/pull/20#issuecomment-469034178

langecode commented 5 years ago

I see your point!

However the current behaviour is exactly the same as the Swagger JAX-RS module provides in JaxrsAnnotationScanner.java

Furthermore isn't it a rare case where you actually would have two packages with the same prefix both containing JAX-RS endpoints where you would like to exclude one of those?