diff --git a/pom.xml b/pom.xml index 0e47c9c..5f5ae24 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ com.github.kongchen swagger-maven-plugin - 3.0.1-SNAPSHOT + 3.1.0 @@ -76,10 +76,10 @@ - com.wordnik + io.swagger swagger-core compile - 1.5.1-M2 + 1.5.4 javax.ws.rs diff --git a/src/main/java/com/github/kongchen/swagger/sample/wordnik/model/Order.java b/src/main/java/com/github/kongchen/swagger/sample/wordnik/model/Order.java index 7cde9da..4a66b2a 100644 --- a/src/main/java/com/github/kongchen/swagger/sample/wordnik/model/Order.java +++ b/src/main/java/com/github/kongchen/swagger/sample/wordnik/model/Order.java @@ -16,7 +16,7 @@ package com.github.kongchen.swagger.sample.wordnik.model; -import com.wordnik.swagger.annotations.*; +import io.swagger.annotations.ApiModelProperty; import java.util.Date; diff --git a/src/main/java/com/github/kongchen/swagger/sample/wordnik/model/Pet.java b/src/main/java/com/github/kongchen/swagger/sample/wordnik/model/Pet.java index 09a2f88..f0deced 100644 --- a/src/main/java/com/github/kongchen/swagger/sample/wordnik/model/Pet.java +++ b/src/main/java/com/github/kongchen/swagger/sample/wordnik/model/Pet.java @@ -16,7 +16,7 @@ package com.github.kongchen.swagger.sample.wordnik.model; -import com.wordnik.swagger.annotations.*; +import io.swagger.annotations.ApiModelProperty; import java.util.List; import java.util.ArrayList; diff --git a/src/main/java/com/github/kongchen/swagger/sample/wordnik/model/User.java b/src/main/java/com/github/kongchen/swagger/sample/wordnik/model/User.java index 4d8c68b..adb01c7 100644 --- a/src/main/java/com/github/kongchen/swagger/sample/wordnik/model/User.java +++ b/src/main/java/com/github/kongchen/swagger/sample/wordnik/model/User.java @@ -16,7 +16,7 @@ package com.github.kongchen.swagger.sample.wordnik.model; -import com.wordnik.swagger.annotations.*; +import io.swagger.annotations.ApiModelProperty; import javax.xml.bind.annotation.*; diff --git a/src/main/java/com/github/kongchen/swagger/sample/wordnik/resource/PetResource.java b/src/main/java/com/github/kongchen/swagger/sample/wordnik/resource/PetResource.java index e71753d..c782914 100644 --- a/src/main/java/com/github/kongchen/swagger/sample/wordnik/resource/PetResource.java +++ b/src/main/java/com/github/kongchen/swagger/sample/wordnik/resource/PetResource.java @@ -17,9 +17,8 @@ package com.github.kongchen.swagger.sample.wordnik.resource; import com.github.kongchen.swagger.sample.wordnik.data.PetData; -import com.wordnik.swagger.annotations.*; import com.github.kongchen.swagger.sample.wordnik.model.Pet; -import com.wordnik.swagger.annotations.ApiResponse; +import io.swagger.annotations.*; import javax.ws.rs.core.Response; import javax.ws.rs.core.MediaType; @@ -27,7 +26,7 @@ @Path("/pet") @Api(value = "/pet", description = "Operations about pets", authorizations = { - @Authorization(value = "petstore_auth", type = "oauth2", + @Authorization(value = "petstore_auth", scopes = { @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), @AuthorizationScope(scope = "read:pets", description = "read your pets") @@ -40,10 +39,10 @@ public class PetResource { @GET @Path("/{petId}") - @ApiOperation(value = "Find pet by ID", + @ApiOperation(value = "Find pet by ID", notes = "Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions", response = Pet.class, - authorizations = @Authorization(value = "api_key", type = "api_key") + authorizations = @Authorization(value = "api_key") ) @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid ID supplied"), @ApiResponse(code = 404, message = "Pet not found") }) diff --git a/src/main/java/com/github/kongchen/swagger/sample/wordnik/resource/PetStoreResource.java b/src/main/java/com/github/kongchen/swagger/sample/wordnik/resource/PetStoreResource.java index 075be05..14be69b 100644 --- a/src/main/java/com/github/kongchen/swagger/sample/wordnik/resource/PetStoreResource.java +++ b/src/main/java/com/github/kongchen/swagger/sample/wordnik/resource/PetStoreResource.java @@ -16,10 +16,10 @@ package com.github.kongchen.swagger.sample.wordnik.resource; -import com.wordnik.swagger.annotations.*; import com.github.kongchen.swagger.sample.wordnik.data.StoreData; import com.github.kongchen.swagger.sample.wordnik.model.Order; import com.github.kongchen.swagger.sample.wordnik.exception.NotFoundException; +import io.swagger.annotations.*; import javax.ws.rs.core.Response; import javax.ws.rs.*; diff --git a/src/main/java/com/github/kongchen/swagger/sample/wordnik/resource/UserResource.java b/src/main/java/com/github/kongchen/swagger/sample/wordnik/resource/UserResource.java index 896fa06..8d2ebe5 100644 --- a/src/main/java/com/github/kongchen/swagger/sample/wordnik/resource/UserResource.java +++ b/src/main/java/com/github/kongchen/swagger/sample/wordnik/resource/UserResource.java @@ -16,10 +16,10 @@ package com.github.kongchen.swagger.sample.wordnik.resource; -import com.wordnik.swagger.annotations.*; import com.github.kongchen.swagger.sample.wordnik.data.UserData; import com.github.kongchen.swagger.sample.wordnik.model.User; import com.github.kongchen.swagger.sample.wordnik.exception.ApiException; +import io.swagger.annotations.*; import javax.ws.rs.core.Response; import javax.ws.rs.*;