Perfect! Love Swagger but the documentation falls a bit short.
Code:
@RestController
@RequestMapping("/cyberUnit")
@Api(value = "/cyberUnit", description = "Manage Cyber Units", tags =
"Cyber Unit Tag")
now creates:
Cyber Unit Tag <http://localhost:8080/swagger-ui.html#!/Cyber_Unit_Tag> :
Manage Cyber Units
Thank you Ron!!
On Thursday, February 23, 2017 at 6:01:45 PM UTC-7, Ron wrote:
>
> I don’t know if springfox supports it, but try setting the tags()
> attribute in @Api.
>
>
>
>
>
>
>
> *From: *<[email protected] <javascript:>> on behalf of Chris
> Russell <[email protected] <javascript:>>
> *Reply-To: *"[email protected] <javascript:>" <
> [email protected] <javascript:>>
> *Date: *Thursday, 23 February 2017 at 16:13
> *To: *Swagger <[email protected] <javascript:>>
> *Subject: *Trying to customize the classname
>
>
>
> Hello,
>
>
>
> I'm using springfox (2.6.1) to produce my Swagger output and I have a
> class definition:
>
>
>
> @RestController
>
> @RequestMapping("/cyberUnit")
>
> @Api(value = "/cyberUnit", description = "Manage Cyber Units")
>
> public class CyberUnitDTOSVCControllerRest extends
> AbstractDTOSVCControllerRest {
>
> .....
>
> }
>
>
>
> The output produced looks like this:
>
>
> <https://lh3.googleusercontent.com/-ESu5W8uPCXo/WK95KOVK6SI/AAAAAAAAAIo/hMU0qJr1iNQ50LsuoCGpAsLMw1AmDVdXQCLcB/s1600/Swagger.png>
>
>
>
> CyberUnitDTOSVCControllerRest is getting parsed into
> "cyber-unit-dtosvc-controller-rest". Seems a bit messy/confusing and I'd
> like it to read "Cyber Units" or something like that. If I can't change it,
> is it possible to turn it off?
>
> I've tried changing the value property on @API with no luck.
>
>
>
> Does anyone know how I can change this or at least tell me what that field
> is called? I'm not even sure what to Google for.
>
>
>
> tia,
>
> Chris
>
> --
> You received this message because you are subscribed to the Google Groups
> "Swagger" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected] <javascript:>.
> For more options, visit https://groups.google.com/d/optout.
>
>
--
You received this message because you are subscribed to the Google Groups
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.