Hello Radu, can you look at this sample for guidance?

https://github.com/swagger-api/swagger-samples/tree/master/java/java-jaxrs-subresource
 
<https://github.com/swagger-api/swagger-samples/tree/master/java/java-jaxrs-subresource>

> On Feb 24, 2017, at 5:02 AM, Radu Fabian <radu.fab...@gmail.com> wrote:
> 
> I do not believe it. It is set to hidden to avoid double generation one from 
> main resource and another from sub resource.
> What other solution do you have?
> 
> Thank you,
> Radu
> 
> 
> On Thursday, February 23, 2017 at 4:28:38 PM UTC+1, tony tam wrote:
> I believe that if you set it to hidden, it should… be hidden
> 
>> On Feb 23, 2017, at 3:25 AM, Radu Fabian <radu....@ <>gmail.com 
>> <http://gmail.com/>> wrote:
>> 
>> Hello,
>> 
>> I have main resource ConfigurationResource and the subresource 
>> EnvironmentsResource.
>> I am using swagger-io api version 1.5.9 with artifact id swagger-jaxrs.
>> The swagger is generating tags configuration but without any method inside. 
>> If I remove hidden=true from subresource then is OK. It should work with 
>> hidden=true as EnvironmentsResource is a subresource and I do not want it to 
>> be listed separately. Any idea?
>> 
>> @Path("/config")
>> @Produces(MediaType.APPLICATION_JSON)
>> @Api(value = "Configuration Resource", description = "Configuration: 
>> environments", tags = {"configuration"})
>> public class ConfigurationResource {
>> 
>> @Timed
>> @Path("/environments")
>> @ApiOperation(value = "environment operation", tags = {"configuration"}, 
>> response = EnvironmentsResource.class)
>> public EnvironmentsResource getEnvironmentsResource() {
>>     return environmentsResourceProvider.get();
>> }
>> }
>> 
>> @Api (hidden = true, value="environments", tags = {"configuration"})
>> @Produces(MediaType.APPLICATION_JSON)
>> public class EnvironmentsResource {
>> 
>> @Timed
>> @GET
>> @Path("/{id}")
>> @ApiOperation(
>>         value = "Get environment by id", httpMethod = "GET", response = 
>> JsonWrapper.class,
>>         notes = "The environments provides a method to get the environment 
>> by id")
>> @ApiResponses(value = {
>>         @ApiResponse(code = 200, message = "The content is a descriptor for 
>> each of the matching results.")})
>> public JsonWrapper getEnvironmentById(@ApiParam(value = "The environment 
>> id", required = true, defaultValue = "1")
>>                                         @PathParam("id") BigInteger id) {
>>              return null;                                                    
>>         
>> }
>> }
>> 
>> Thank you, very much,
>> Radu
>> 
>> -- 
>> 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 swagger-swaggersocket+unsubscr...@googlegroups.com <>.
>> For more options, visit https://groups.google.com/d/optout 
>> <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 swagger-swaggersocket+unsubscr...@googlegroups.com 
> <mailto:swagger-swaggersocket+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <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 swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to