Update 2016-04-05-generate-swagger.md

This commit is contained in:
Teodora Onaca 2016-04-05 12:12:42 +02:00
parent c7302ca93c
commit b2ca524cd7

View file

@ -32,7 +32,7 @@ Note: please make sure to set the jar version to the latest one available, so th
In order to hook up swagger-core in the application, there are multiple solutions, the easiest of which is to just use a custom `Application` subclass. In order to hook up swagger-core in the application, there are multiple solutions, the easiest of which is to just use a custom `Application` subclass.
```java ``` java
public class SwaggerTestApplication extends Application { public class SwaggerTestApplication extends Application {
public SwaggerTestApplication() { public SwaggerTestApplication() {
@ -67,7 +67,7 @@ In order for a resource to be documented, other than including it in the list of
A special case, that might give you some head aches, is the use of subresources. The REST resource code usually goes something like this: A special case, that might give you some head aches, is the use of subresources. The REST resource code usually goes something like this:
```java ``` java
@Api @Api
@Path("resource") @Path("resource")
public class Resource { public class Resource {
@ -146,7 +146,7 @@ In the Subresource class, you might have a @PathParam for holding the value of t
In order to fix this, use `@ApiParam(hidden=true)` for the subresource `@PathParam` in the `Subsubresource` class. See below. In order to fix this, use `@ApiParam(hidden=true)` for the subresource `@PathParam` in the `Subsubresource` class. See below.
```java ``` java
@Api @Api
public class SubSubResource { public class SubSubResource {