springfox / springfox-grails-integration

SpringFox integration with Grails 3.x
Apache License 2.0
19 stars 12 forks source link

automatically add @ApiImplicitParam.dataType class references to models #2

Open zyro23 opened 7 years ago

zyro23 commented 7 years ago

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.

dilipkrish commented 7 years ago

@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).

zyro23 commented 7 years ago

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