Thanks Ron. I see a comment about it in the migration process: https://github.com/OAI/OpenAPI-Specification/wiki/Swagger-1.2-to-2.0-Migration-Guide But I would like to avoid placing @Api annotations. Previous behavior worked fine for me. Is there a way to group it using paths?
On Monday, February 20, 2017 at 4:04:27 AM UTC+2, Ron wrote: > > Hi Elad, > > > > That’s because the grouping in 2.0 has changed from being based on paths > to being based on tags. > > Look at the @Api annotation for the value() or tags() to set it on the > operations. > > > > > > > > *From: *<[email protected] <javascript:>> on behalf of Elad > Tabak <[email protected] <javascript:>> > *Reply-To: *"[email protected] <javascript:>" < > [email protected] <javascript:>> > *Date: *Sunday, 19 February 2017 at 5:11 > *To: *Swagger <[email protected] <javascript:>> > *Subject: *All jax-rs resources are listed under "default" > > > > I have 3 JAX-RS resources - meaning 3 different classes, each annotated > with @Path, with different path assigned to them. > > When swagger-ui loads, it shows only a single line - "default". When > clicking on it, I see all the 3 different resources. > > This seems very different than the swagger-ui previous version I used that > showed each class as a different resource. > > > > This is the output of swagger.json. I'm using latest swagger - 1.5.12 and > Jersey 2.x. > > > > {"swagger":"2.0","info":{"version":"1.0.2"},"host":"localhost:8080","basePath":"/training/rest","schemes":["http"],"paths":{"/":{"get":{"operationId":"sayhello","produces":["text/plain"],"parameters":[],"responses":{"200":{"description":"successful > > operation","schema":{"type":"string"},"headers":{}}}}},"/logger/{className}":{"get":{"operationId":"getLogLevel","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"className","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"successful > > operation","schema":{"$ref":"#/definitions/LogSettingDto"},"headers":{}}}},"put":{"operationId":"setLogLevel","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"className","in":"path","required":true,"type":"string"},{"in":"body","name":"body","required":false,"schema":{"$ref":"#/definitions/LogSettingDto"}}],"responses":{"default":{"description":"successful > > operation"}}}},"/trainer":{"get":{"operationId":"list","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful > > operation","schema":{"type":"array","items":{"$ref":"#/definitions/TrainerDto"}},"headers":{}}}}}},"definitions":{"LogSettingDto":{"type":"object","properties":{"className":{"type":"string"},"logLevel":{"type":"string"}}},"TrainerDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"firstName":{"type":"string"},"lastName":{"type":"string"}}}}} > > > > -- > 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.
