Motivation: When creating a project from scratch i want wo add swagger even before building the first webservice.
Currently if no class is found with @Path or @OpenAPIDefinition the swagger-maven-plugin will produce a NullPointerException
This is because OpenAPISorter will try to create a TreeMap with null.
Stacktrace:
Caused by: java.lang.NullPointerException
at java.util.TreeMap.putAll (TreeMap.java:313)
at java.util.TreeMap.<init> (TreeMap.java:185)
at io.openapitools.swagger.OpenAPISorter.sortPaths (OpenAPISorter.java:50)
at io.openapitools.swagger.OpenAPISorter.sort (OpenAPISorter.java:41)
at io.openapitools.swagger.GenerateMojo.execute (GenerateMojo.java:127)
When at least one webservice is present the build succeeds.
Motivation: When creating a project from scratch i want wo add swagger even before building the first webservice.
Currently if no class is found with @Path or @OpenAPIDefinition the swagger-maven-plugin will produce a NullPointerException
This is because OpenAPISorter will try to create a TreeMap with null.
Stacktrace:
When at least one webservice is present the build succeeds.