springfox-javadoc icon indicating copy to clipboard operation
springfox-javadoc copied to clipboard

Corrupted Properties file generated for multivalued Request Mapping

Open gazirahman opened this issue 7 years ago • 1 comments

If there is a request mapping as below: @RequestMapping(value={"/path1", "path2"}) Then in the generaeted properties file entries of this is found as below: /{"/path1",\ "/path2"}.POST.param.operationType= As a result the swagger api can't find the request mapping in the properties file as it searches for entries like: /path1.POST.param.operationType. The fix should be to generate multiple entries in the properties file like: /path1.POST.param.operationType /path2.POST.param.operationType for each of the values of maultivalued request mapping.

gazirahman avatar May 18 '18 20:05 gazirahman

Oof, this is a big one. The code in the doclet currently only expects one value/path. I also noticed that the method param will be ignored if you specify multiple methods, because the code only expects one method as well. This means the whole doclet has to be rewritten with support for multiple paths and methods. It can no longer use one StringBuilder per Annotation and simply use AnnotationValue.toString(). The code has to check if AnnotationValue.value() is an array of AnnotationValue objects and then produce multiple entries in the properties file. This will probably be a big rewrite and take some time.

neumaennl avatar May 31 '18 10:05 neumaennl