springfox-grails-integration icon indicating copy to clipboard operation
springfox-grails-integration copied to clipboard

automatically add @ApiImplicitParam.dataType class references to models

Open zyro23 opened this issue 9 years ago • 2 comments

if @ApiImplicitParam.dataType references a non-simple type (i.e. a custom class), you also need to reference that class via Docket.additionalModels. would make sense to do that automatically, i think.

zyro23 avatar Jan 15 '17 11:01 zyro23

@zyro23 thanks for reporting. The only issue with that is that there is no guarantee that that class is in the class path or that there is only one class with that name (different package).

dilipkrish avatar Jan 15 '17 12:01 dilipkrish

what about supporting a fqcn? dataType = "my.package.MyClass" swagger-servlet behavior for reference: ref. https://github.com/swagger-api/swagger-core/blob/v1.5.12/modules/swagger-servlet/src/main/java/io/swagger/servlet/extensions/ServletReaderExtension.java#L419

zyro23 avatar Jan 15 '17 13:01 zyro23