diff --git a/java/inflector-dropwizard-guice/dependency-reduced-pom.xml b/java/inflector-dropwizard-guice/dependency-reduced-pom.xml
new file mode 100644
index 00000000..223b285a
--- /dev/null
+++ b/java/inflector-dropwizard-guice/dependency-reduced-pom.xml
@@ -0,0 +1,50 @@
+
+
+ 4.0.0
+ io.swagger
+ inflector-dropwizard-guice-sample
+ 1.0.0-SNAPSHOT
+
+
+
+ maven-shade-plugin
+ 2.3
+
+
+ package
+
+ shade
+
+
+
+
+
+ io.swagger.samples.inflector.dropwizard.InflectorServer
+
+
+
+
+
+
+ true
+
+
+ *:*
+
+ META-INF/*.SF
+ META-INF/*.DSA
+ META-INF/*.RSA
+
+
+
+
+
+
+
+
+ 0.8.2
+ 1.0.2
+ 2.5.1
+
+
+
diff --git a/java/inflector-dropwizard-guice/src/main/swagger/swagger.yaml b/java/inflector-dropwizard-guice/src/main/swagger/swagger.yaml
index 008ad436..a7f83630 100644
--- a/java/inflector-dropwizard-guice/src/main/swagger/swagger.yaml
+++ b/java/inflector-dropwizard-guice/src/main/swagger/swagger.yaml
@@ -89,7 +89,7 @@ paths:
tags:
- pet
summary: Finds Pets by status
- description: Multiple status values can be provided with comma seperated strings
+ description: Multiple status values can be provided with comma separated strings
operationId: findPetsByStatus
consumes:
- application/xml
@@ -131,7 +131,7 @@ paths:
tags:
- pet
summary: Finds Pets by tags
- description: "Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing."
+ description: "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing."
operationId: findPetsByTags
produces:
- application/xml
diff --git a/java/inflector-dropwizard/dependency-reduced-pom.xml b/java/inflector-dropwizard/dependency-reduced-pom.xml
new file mode 100644
index 00000000..1467bee4
--- /dev/null
+++ b/java/inflector-dropwizard/dependency-reduced-pom.xml
@@ -0,0 +1,50 @@
+
+
+ 4.0.0
+ io.swagger
+ inflector-dropwizard-sample
+ 1.0.0-SNAPSHOT
+
+
+
+ maven-shade-plugin
+ 2.3
+
+
+ package
+
+ shade
+
+
+
+
+
+ io.swagger.samples.inflector.dropwizard.InflectorServer
+
+
+
+
+
+
+ true
+
+
+ *:*
+
+ META-INF/*.SF
+ META-INF/*.DSA
+ META-INF/*.RSA
+
+
+
+
+
+
+
+
+ 0.8.2
+ 1.0.2
+ 2.5.1
+
+
+
diff --git a/java/inflector-dropwizard/src/main/swagger/swagger.yaml b/java/inflector-dropwizard/src/main/swagger/swagger.yaml
index 008ad436..a7f83630 100644
--- a/java/inflector-dropwizard/src/main/swagger/swagger.yaml
+++ b/java/inflector-dropwizard/src/main/swagger/swagger.yaml
@@ -89,7 +89,7 @@ paths:
tags:
- pet
summary: Finds Pets by status
- description: Multiple status values can be provided with comma seperated strings
+ description: Multiple status values can be provided with comma separated strings
operationId: findPetsByStatus
consumes:
- application/xml
@@ -131,7 +131,7 @@ paths:
tags:
- pet
summary: Finds Pets by tags
- description: "Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing."
+ description: "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing."
operationId: findPetsByTags
produces:
- application/xml
diff --git a/java/inflector-jetty-webxml/src/main/swagger/swagger.yaml b/java/inflector-jetty-webxml/src/main/swagger/swagger.yaml
index d8238e18..5245f741 100644
--- a/java/inflector-jetty-webxml/src/main/swagger/swagger.yaml
+++ b/java/inflector-jetty-webxml/src/main/swagger/swagger.yaml
@@ -92,7 +92,7 @@ paths:
tags:
- pet
summary: Finds Pets by status
- description: Multiple status values can be provided with comma seperated strings
+ description: Multiple status values can be provided with comma separated strings
operationId: findPetsByStatus
consumes:
- application/xml
@@ -134,7 +134,7 @@ paths:
tags:
- pet
summary: Finds Pets by tags
- description: "Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing."
+ description: "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing."
operationId: findPetsByTags
produces:
- application/xml
diff --git a/java/inflector-springboot-jersey/src/main/swagger/swagger.yaml b/java/inflector-springboot-jersey/src/main/swagger/swagger.yaml
index 93e3e8db..ae5d85c9 100644
--- a/java/inflector-springboot-jersey/src/main/swagger/swagger.yaml
+++ b/java/inflector-springboot-jersey/src/main/swagger/swagger.yaml
@@ -89,7 +89,7 @@ paths:
tags:
- pet
summary: Finds Pets by status
- description: Multiple status values can be provided with comma seperated strings
+ description: Multiple status values can be provided with comma separated strings
operationId: findPetsByStatus
consumes:
- application/xml
@@ -131,7 +131,7 @@ paths:
tags:
- pet
summary: Finds Pets by tags
- description: "Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing."
+ description: "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing."
operationId: findPetsByTags
produces:
- application/xml
diff --git a/java/java-dropwizard/src/main/java/io/swagger/sample/resource/PetResource.java b/java/java-dropwizard/src/main/java/io/swagger/sample/resource/PetResource.java
index 60ae5073..2077baa2 100644
--- a/java/java-dropwizard/src/main/java/io/swagger/sample/resource/PetResource.java
+++ b/java/java-dropwizard/src/main/java/io/swagger/sample/resource/PetResource.java
@@ -73,7 +73,7 @@ public Response updatePet(
@Path("/findByStatus")
@ApiOperation(
value = "Finds Pets by status",
- notes = "Multiple status values can be provided with comma seperated strings",
+ notes = "Multiple status values can be provided with comma separated strings",
response = Pet.class,
responseContainer = "List")
@ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid status value") })
diff --git a/java/java-grails2/src/java/io/swagger/sample/resource/PetResource.java b/java/java-grails2/src/java/io/swagger/sample/resource/PetResource.java
index 24069013..1e67985c 100644
--- a/java/java-grails2/src/java/io/swagger/sample/resource/PetResource.java
+++ b/java/java-grails2/src/java/io/swagger/sample/resource/PetResource.java
@@ -69,7 +69,7 @@ public Response updatePet(
@GET
@Path("/findByStatus")
- @ApiOperation(value = "Finds Pets by status", notes = "Multiple status values can be provided with comma seperated strings", response = Pet.class, responseContainer = "List")
+ @ApiOperation(value = "Finds Pets by status", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List")
@ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid status value") })
public Response findPetsByStatus(
@ApiParam(value = "Status values that need to be considered for filter", required = true, defaultValue = "available", allowableValues = "available,pending,sold", allowMultiple = true) @QueryParam("status") String status) {
@@ -78,7 +78,7 @@ public Response findPetsByStatus(
@GET
@Path("/findByTags")
- @ApiOperation(value = "Finds Pets by tags", notes = "Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List")
+ @ApiOperation(value = "Finds Pets by tags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List")
@ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid tag value") })
@Deprecated
public Response findPetsByTags(
diff --git a/java/java-jaxrs-cxf/src/main/java/io/swagger/sample/resource/PetResource.java b/java/java-jaxrs-cxf/src/main/java/io/swagger/sample/resource/PetResource.java
index 4c5adeb5..75ceeb63 100644
--- a/java/java-jaxrs-cxf/src/main/java/io/swagger/sample/resource/PetResource.java
+++ b/java/java-jaxrs-cxf/src/main/java/io/swagger/sample/resource/PetResource.java
@@ -71,7 +71,7 @@ public Response updatePet(
@GET
@Path("/findByStatus")
@ApiOperation(value = "Finds Pets by status",
- notes = "Multiple status values can be provided with comma seperated strings",
+ notes = "Multiple status values can be provided with comma separated strings",
response = Pet.class,
responseContainer = "List")
@ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid status value") })
@@ -83,7 +83,7 @@ public Response findPetsByStatus(
@GET
@Path("/findByTags")
@ApiOperation(value = "Finds Pets by tags",
- notes = "Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.",
+ notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.",
response = Pet.class,
responseContainer = "List")
@ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid tag value") })
diff --git a/java/java-jaxrs-wink/src/main/java/io/swagger/sample/resources/PetResource.java b/java/java-jaxrs-wink/src/main/java/io/swagger/sample/resources/PetResource.java
index ff88031f..726917f0 100644
--- a/java/java-jaxrs-wink/src/main/java/io/swagger/sample/resources/PetResource.java
+++ b/java/java-jaxrs-wink/src/main/java/io/swagger/sample/resources/PetResource.java
@@ -82,7 +82,7 @@ public Response updatePet(
@GET
@Path("/findByStatus")
@ApiOperation(value = "Finds Pets by status",
- notes = "Multiple status values can be provided with comma seperated strings",
+ notes = "Multiple status values can be provided with comma separated strings",
response = Pet.class,
responseContainer = "List")
@ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid status value") })
diff --git a/java/java-jaxrs/pom.xml b/java/java-jaxrs/pom.xml
index a32dfda7..4dc795be 100644
--- a/java/java-jaxrs/pom.xml
+++ b/java/java-jaxrs/pom.xml
@@ -119,12 +119,7 @@
-
- io.swagger
- swagger-jaxrs
- ${swagger-version}
- compile
-
+
ch.qos.logback
logback-classic
@@ -163,6 +158,17 @@
com.sun.jersey
jersey-servlet
+
+ vuk
+ vuk
+ 2
+
+
0
diff --git a/java/java-jaxrs/src/main/java/io/swagger/sample/model/Pet.java b/java/java-jaxrs/src/main/java/io/swagger/sample/model/Pet.java
index 57bda02d..871952c1 100644
--- a/java/java-jaxrs/src/main/java/io/swagger/sample/model/Pet.java
+++ b/java/java-jaxrs/src/main/java/io/swagger/sample/model/Pet.java
@@ -1,5 +1,5 @@
/**
- * Copyright 2016 SmartBear Software
+ * Copyright 2015 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,6 +17,7 @@
package io.swagger.sample.model;
import io.swagger.annotations.*;
+import io.swagger.oas.annotations.media.Schema;
import java.util.List;
import java.util.ArrayList;
@@ -24,7 +25,6 @@
import javax.xml.bind.annotation.*;
@XmlRootElement(name = "Pet")
-@ApiModel(value = "Pet", subTypes = {Cat.class}, discriminator = "type")
public class Pet {
private long id;
private Category category;
@@ -82,7 +82,11 @@ public void setTags(List tags) {
}
@XmlElement(name = "status")
- @ApiModelProperty(value = "pet status in the store", allowableValues = "available,pending,sold")
+ @Schema(
+ name = "status",
+ title = "pet status in the store",
+ _enum = {"available", "pending", "sold"}
+ )
public String getStatus() {
return status;
}
@@ -90,16 +94,4 @@ public String getStatus() {
public void setStatus(String status) {
this.status = status;
}
-
- private String type;
-
- @ApiModelProperty(required = true)
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
-}
+}
\ No newline at end of file
diff --git a/java/java-jaxrs/src/main/java/io/swagger/sample/model/User.java b/java/java-jaxrs/src/main/java/io/swagger/sample/model/User.java
index 35f8a5ba..2e35a8c6 100644
--- a/java/java-jaxrs/src/main/java/io/swagger/sample/model/User.java
+++ b/java/java-jaxrs/src/main/java/io/swagger/sample/model/User.java
@@ -1,5 +1,5 @@
/**
- * Copyright 2016 SmartBear Software
+ * Copyright 2015 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,6 +17,7 @@
package io.swagger.sample.model;
import io.swagger.annotations.*;
+import io.swagger.oas.annotations.media.Schema;
import javax.xml.bind.annotation.*;
@@ -95,7 +96,14 @@ public void setPhone(String phone) {
}
@XmlElement(name = "userStatus")
- @ApiModelProperty(value = "User Status", allowableValues = "1-registered,2-active,3-closed")
+ @Schema(
+ name = "userStatus",
+ title = "User Status",
+ _enum = {"1-registered", "2-active", "3-closed"}
+ )
+
+
+
public int getUserStatus() {
return userStatus;
}
diff --git a/java/java-jaxrs/src/main/java/io/swagger/sample/resource/PetResource.java b/java/java-jaxrs/src/main/java/io/swagger/sample/resource/PetResource.java
index 11f84090..85b00245 100644
--- a/java/java-jaxrs/src/main/java/io/swagger/sample/resource/PetResource.java
+++ b/java/java-jaxrs/src/main/java/io/swagger/sample/resource/PetResource.java
@@ -1,5 +1,5 @@
/**
- * Copyright 2016 SmartBear Software
+ * Copyright 2015 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,8 +16,18 @@
package io.swagger.sample.resource;
-import io.swagger.annotations.*;
-import io.swagger.annotations.ApiResponse;
+import io.swagger.oas.annotations.Operation;
+import io.swagger.oas.annotations.Parameter;
+import io.swagger.oas.annotations.callbacks.Callback;
+import io.swagger.oas.annotations.info.Info;
+import io.swagger.oas.annotations.info.License;
+import io.swagger.oas.annotations.info.Contact;
+import io.swagger.oas.annotations.media.Content;
+import io.swagger.oas.annotations.media.Schema;
+import io.swagger.oas.annotations.parameters.RequestBody;
+import io.swagger.oas.annotations.media.ExampleObject;
+import io.swagger.oas.annotations.responses.ApiResponse;
+
import io.swagger.sample.data.PetData;
import io.swagger.sample.model.Pet;
import io.swagger.sample.exception.NotFoundException;
@@ -30,28 +40,58 @@
import javax.ws.rs.*;
@Path("/pet")
-@Api(value = "/pet", description = "Operations about pets", authorizations = {
- @Authorization(value = "petstore_auth",
- scopes = {
- @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
-}, tags = "pet")
+@Schema(
+ name = "/pet",
+ description = "Operations about pets")
@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
+@Info(
+ title = "Pets Operations",
+ version = "1.0",
+ description = "Operations about pets",
+ license = @License(name = "Apache 2.0", url = "http://www.apache.org/licenses/LICENSE-2.0.html"),
+ contact = @Contact(name = "", url = "", email = "")
+)
public class PetResource {
+
static PetData petData = new PetData();
@GET
@Path("/{petId}")
- @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")
+ @Operation(
+ method = "GET",
+ summary = "Find pet by ID",
+ description = "Returns a pet when ID is less than or equal to 10. If ID is greater than 10 or nonintegers, will simulate API error conditions",
+ responses = {
+ @ApiResponse(
+ responseCode = "400",
+ description = "Invalid ID supplied",
+ content = @Content(
+ mediaType = "none")
+ ),
+ @ApiResponse(
+ responseCode = "404",
+ description = "Pet not found",
+ content = @Content(
+ mediaType = "none")
+ ),
+ @ApiResponse(
+ responseCode = "200",
+ content = @Content(
+ mediaType = "application/json",
+ schema = @Schema(type = "array", implementation = Pet.class))
+ )
+ }
)
- @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid ID supplied"),
- @ApiResponse(code = 404, message = "Pet not found") })
- public Response getPetById(
- @ApiParam(value = "ID of pet that needs to be fetched", allowableValues = "range[1,10]", required = true) @PathParam("petId") Long petId)
+ public Response getPetById(
+ @Parameter(
+ name = "petId",
+ description = "ID of pet that needs to be fetched",
+ required = true,
+ schema = @Schema(
+ implementation = Long.class,
+ maximum = "10",
+ minimum = "1"))
+ @PathParam("petId") Long petId)
throws NotFoundException {
Pet pet = petData.getPetById(petId);
if (pet != null) {
@@ -63,15 +103,33 @@ public Response getPetById(
@GET
@Path("/{petId}/download")
- @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")
+ @Operation(
+ method = "GET",
+ summary = "Find pet by ID and download it",
+ description = "Returns a pet when ID is less than or equal to 10. If ID is greater than 10 or nonintegers, will simulate API error conditions",
+ responses = {
+ @ApiResponse(
+ responseCode = "400",
+ description = "Invalid ID supplied",
+ content = @Content(mediaType = "none")
+ ),
+ @ApiResponse(
+ responseCode = "404",
+ description = "Pet not found",
+ content = @Content(mediaType = "none")
+ )
+ }
)
- @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid ID supplied"),
- @ApiResponse(code = 404, message = "Pet not found") })
public Response downloadFile(
- @ApiParam(value = "ID of pet that needs to be fetched", allowableValues = "range[1,10]", required = true) @PathParam("petId") Long petId)
+ @Parameter(
+ name = "petId",
+ description = "ID of pet that needs to be fetched",
+ required = true,
+ schema = @Schema(
+ implementation = Long.class,
+ maximum = "10",
+ minimum = "1")
+ ) @PathParam("petId") Long petId)
throws NotFoundException {
StreamingOutput stream = new StreamingOutput() {
@Override
@@ -92,12 +150,36 @@ public void write(OutputStream output) throws IOException {
@DELETE
@Path("/{petId}")
- @ApiOperation(value = "Deletes a pet")
- @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid ID supplied"),
- @ApiResponse(code = 404, message = "Pet not found")})
+ @Operation(
+ method = "DELETE",
+ summary = "Deletes a pet by ID",
+ description = "Returns a pet when ID is less than or equal to 10. If ID is greater than 10 or nonintegers, will simulate API error conditions",
+ responses = {
+ @ApiResponse(
+ responseCode = "400",
+ description = "Invalid ID supplied"
+ ),
+ @ApiResponse(
+ responseCode = "404",
+ description = "Pet not found"
+ )
+ }
+ )
public Response deletePet(
- @ApiParam() @HeaderParam("api_key") String apiKey,
- @ApiParam(value = "Pet id to delete", required = true)@PathParam("petId") Long petId) {
+ @Parameter(
+ name = "apiKey",
+ description = "authentication key to access this method",
+ schema = @Schema(type = "String", implementation = String.class))
+ @HeaderParam("api_key") String apiKey,
+ @Parameter(
+ name = "petId",
+ description = "ID of pet that needs to be fetched",
+ required = true,
+ schema = @Schema(
+ implementation = Long.class,
+ maximum = "10",
+ minimum = "1"))
+ @PathParam("petId") Long petId) {
if (petData.deletePet(petId)) {
return Response.ok().build();
} else {
@@ -107,63 +189,179 @@ public Response deletePet(
@POST
@Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
- @ApiOperation(value = "Add a new pet to the store")
- @ApiResponses(value = { @ApiResponse(code = 405, message = "Invalid input", response = io.swagger.sample.model.ApiResponse.class) })
+ @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
+ @Operation(
+ method = "POST",
+ summary = "Add pet to store",
+ description = "Add a new pet to the store",
+ responses = {
+ @ApiResponse(
+ responseCode = "400",
+ description = "Invalid input",
+ content = @Content(
+ mediaType = "application/json",
+ schema = @Schema(implementation = ApiResponse.class))
+ )
+ },
+ requestBody = @RequestBody(
+ content = @Content(
+ mediaType = "application/json",
+ schema = @Schema(implementation = Pet.class)),
+ required = true,
+ description = "example of a new pet to add"
+ )
+ )
public Response addPet(
- @ApiParam(value = "Pet object that needs to be added to the store", required = true) Pet pet) {
+ @Parameter(
+ name ="addPet",
+ description = "Pet to add",
+ required = true,
+ schema = @Schema(implementation = Pet.class)) Pet pet) {
Pet updatedPet = petData.addPet(pet);
return Response.ok().entity(updatedPet).build();
}
@PUT
@Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
- @ApiOperation(value = "Update an existing pet")
- @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid ID supplied"),
- @ApiResponse(code = 404, message = "Pet not found"),
- @ApiResponse(code = 405, message = "Validation exception") })
- public Response updatePet(
- @ApiParam(value = "Pet object that needs to be added to the store", required = true) Pet pet) {
+ @Operation(
+ method = "PUT",
+ summary = "Update an existing pet",
+ description = "Update an existing pet with the given new attributes",
+ responses = {
+ @ApiResponse(
+ responseCode = "400",
+ description = "Invalid ID supplied",
+ content = @Content(mediaType = "application/json")
+ ),
+ @ApiResponse(
+ responseCode = "404",
+ description = "Pet not found",
+ content = @Content(mediaType = "application/json")
+ ),
+ @ApiResponse(
+ responseCode = "405",
+ description = "Validation exception",
+ content = @Content(mediaType = "application/json")
+ )
+ })
+ public Response updatePet(
+ @Parameter(
+ name ="petAttribute",
+ description = "Attribute to update existing pet record",
+ required = true,
+ schema = @Schema(implementation = Pet.class)) Pet pet) {
Pet updatedPet = petData.addPet(pet);
return Response.ok().entity(updatedPet).build();
}
@GET
@Path("/findByStatus")
- @ApiOperation(value = "Finds Pets by status",
- notes = "Multiple status values can be provided with comma seperated strings",
- response = Pet.class,
- responseContainer = "List")
- @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid status value") })
+ @Operation(
+
+ method = "GET",
+ summary = "Finds Pets by status",
+ description = "Find all the Pets with the given status; Multiple status values can be provided with comma seperated strings",
+ responses = {
+ @ApiResponse(
+ responseCode = "400",
+ description = "Invalid status value",
+ content = @Content(mediaType = "none")
+ ),
+ @ApiResponse(
+ responseCode = "200",
+ content = @Content(
+ mediaType = "application/json",
+ schema = @Schema(type = "list", implementation = Pet.class))
+ )
+ })
public Response findPetsByStatus(
- @ApiParam(value = "Status values that need to be considered for filter", required = true, defaultValue = "available", allowableValues = "available,pending,sold", allowMultiple = true) @QueryParam("status") String status) {
+ @Parameter(
+ name = "status",
+ description = "Status values that need to be considered for filter",
+ required = true,
+ schema = @Schema(implementation = String.class),
+ content = {
+ @Content(
+ examples = {
+ @ExampleObject(
+ name = "Available",
+ value = "available",
+ summary = "Retrieves all the pets that are available"),
+ @ExampleObject(
+ name = "Pending",
+ value = "pending",
+ summary = "Retrieves all the pets that are pending to be sold"),
+ @ExampleObject(
+ name = "Sold",
+ value = "sold",
+ summary = "Retrieves all the pets that are sold"),
+ }
+ )
+ },
+ allowEmptyValue = true) String status) {
return Response.ok(petData.findPetByStatus(status)).build();
}
@GET
@Path("/findByTags")
- @ApiOperation(value = "Finds Pets by tags",
- notes = "Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.",
- response = Pet.class,
- responseContainer = "List")
- @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid tag value") })
+ @Callback(operation =
+ @Operation(
+ method = "GET",
+ summary = "Finds Pets by tags",
+ deprecated = true,
+ description = "Find Pets by tags; Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.",
+ responses = {
+ @ApiResponse(
+ responseCode = "400",
+ description = "Invalid tag value",
+ content = @Content(mediaType = "none")
+ ),
+ @ApiResponse(
+ responseCode = "200",
+ content = @Content(
+ mediaType = "application/json",
+ schema = @Schema(type = "list", implementation = Pet.class))
+ )
+ }))
@Deprecated
public Response findPetsByTags(
@HeaderParam("api_key") String api_key,
- @ApiParam(value = "Tags to filter by", required = true, allowMultiple = true) @QueryParam("tags") String tags) {
+ @Parameter(
+ name = "tags",
+ description = "Tags to filter by",
+ required = true,
+ deprecated = true)
+ @QueryParam("tags") String tags) {
return Response.ok(petData.findPetByTags(tags)).build();
}
@POST
@Path("/{petId}")
@Consumes({MediaType.APPLICATION_FORM_URLENCODED})
- @ApiOperation(value = "Updates a pet in the store with form data",
- consumes = MediaType.APPLICATION_FORM_URLENCODED)
- @ApiResponses(value = {
- @ApiResponse(code = 405, message = "Invalid input")})
+ @Operation(
+ method = "POST",
+ summary = "Updates a pet in the store with form data",
+ responses = {
+ @ApiResponse(
+ responseCode = "405",
+ description = "Validation exception",
+ content = @Content(mediaType = "none")
+ )
+ })
public Response updatePetWithForm (
- @ApiParam(value = "ID of pet that needs to be updated", required = true)@PathParam("petId") Long petId,
- @ApiParam(value = "Updated name of the pet", required = false)@FormParam("name") String name,
- @ApiParam(value = "Updated status of the pet", required = false)@FormParam("status") String status) {
+ @Parameter(
+ name = "petId",
+ description = "ID of pet that needs to be updated",
+ required = true)
+ @PathParam("petId") Long petId,
+ @Parameter(
+ name = "name",
+ description = "Updated name of the pet")
+ @FormParam("name") String name,
+ @Parameter(
+ name = "status",
+ description = "Updated status of the pet")
+ @FormParam("status") String status) {
Pet pet = petData.getPetById(petId);
if(pet != null) {
if(name != null && !"".equals(name))
diff --git a/java/java-jaxrs/src/main/java/io/swagger/sample/resource/PetStoreResource.java b/java/java-jaxrs/src/main/java/io/swagger/sample/resource/PetStoreResource.java
index 7f9c1022..ae580ba2 100644
--- a/java/java-jaxrs/src/main/java/io/swagger/sample/resource/PetStoreResource.java
+++ b/java/java-jaxrs/src/main/java/io/swagger/sample/resource/PetStoreResource.java
@@ -1,5 +1,5 @@
/**
- * Copyright 2016 SmartBear Software
+ * Copyright 2015 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,7 +16,10 @@
package io.swagger.sample.resource;
-import io.swagger.annotations.*;
+import io.swagger.oas.annotations.*;
+import io.swagger.oas.annotations.media.Content;
+import io.swagger.oas.annotations.media.Schema;
+import io.swagger.oas.annotations.responses.ApiResponse;
import io.swagger.sample.data.StoreData;
import io.swagger.sample.model.Order;
import io.swagger.sample.exception.NotFoundException;
@@ -27,7 +30,7 @@
import javax.ws.rs.*;
@Path("/store")
-@Api(value="/store" , description = "Operations about store")
+@Schema(name="/store")
@Produces({"application/json", "application/xml"})
public class PetStoreResource {
static StoreData storeData = new StoreData();
@@ -36,25 +39,57 @@ public class PetStoreResource {
@GET
@Path("/inventory")
@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
- @ApiOperation(value = "Returns pet inventories by status",
- notes = "Returns a map of status codes to quantities",
- response = Integer.class,
- responseContainer = "map",
- authorizations = @Authorization(value = "api_key")
- )
+ @Operation(
+ method = "get",
+ summary = "Returns pet inventories by status",
+ description = "Returns a map of status codes to quantities",
+ responses = {
+ @ApiResponse(
+ responseCode = "200",
+ description = "successful operation"
+ )
+ }
+ )
public java.util.Map getInventory() {
return petData.getInventoryByStatus();
}
@GET
@Path("/order/{orderId}")
- @ApiOperation(value = "Find purchase order by ID",
- notes = "For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions",
- response = Order.class)
- @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid ID supplied"),
- @ApiResponse(code = 404, message = "Order not found") })
+ @Operation(
+ method = "get",
+ summary = "Find purchase order by ID",
+ description = "For valid response try integer IDs with value between the integers of 1 and 10. Other values will generated exceptions",
+ responses = {
+ @ApiResponse(
+ responseCode = "200",
+ description = "successful operation",
+ content = @Content(
+ schema = @Schema(implementation = Order.class)
+ )),
+ @ApiResponse(
+ responseCode = "400",
+ description = "Invalid ID supplied",
+ content = @Content(
+ schema = @Schema(implementation = Order.class)
+ )),
+ @ApiResponse(
+ responseCode = "404",
+ description = "Order not found",
+ content = @Content(
+ schema = @Schema(implementation = Order.class)
+ ))
+ })
public Response getOrderById(
- @ApiParam(value = "ID of pet that needs to be fetched", allowableValues = "range[1,10]", required = true)
+ @Parameter(
+ name = "orderId",
+ description = "ID of pet that needs to be fetched",
+ schema = @Schema(
+ type = "long",
+ minimum = "1",
+ maximum = "10"),
+ required = true
+ )
@PathParam("orderId") Long orderId)
throws NotFoundException {
Order order = storeData.findOrderById(orderId);
@@ -67,23 +102,55 @@ public Response getOrderById(
@POST
@Path("/order")
- @ApiOperation(value = "Place an order for a pet")
- @ApiResponses({ @ApiResponse(code = 400, message = "Invalid Order") })
+ @Operation(
+ method = "post",
+ summary = "Place an order for a pet",
+ responses = {
+ @ApiResponse(
+ responseCode = "200",
+ description = "successful operation"
+ ),
+ @ApiResponse(
+ responseCode = "400",
+ description = "Invalid Order"
+ )
+ })
public Order placeOrder(
- @ApiParam(value = "order placed for purchasing the pet",
- required = true) Order order) {
+ @Parameter(
+ description = "order placed for purchasing the pet",
+ required = true
+ )
+ Order order) {
storeData.placeOrder(order);
return storeData.placeOrder(order);
}
@DELETE
@Path("/order/{orderId}")
- @ApiOperation(value = "Delete purchase order by ID",
- notes = "For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors")
- @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid ID supplied"),
- @ApiResponse(code = 404, message = "Order not found") })
+ @Operation(
+ method = "delete",
+ summary = "Delete purchase order by ID",
+ description = "For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors",
+ responses = {
+ @ApiResponse(
+ responseCode = "400",
+ description = "Invalid ID supplied"
+ ),
+ @ApiResponse(
+ responseCode = "404",
+ description = "Order not found"
+ )
+ })
public Response deleteOrder(
- @ApiParam(value = "ID of the order that needs to be deleted", allowableValues = "range[1,infinity]", required = true)
+ @Parameter(
+ name = "orderId",
+ description = "ID of the order that needs to be deleted",
+ schema = @Schema(
+ type = "long",
+ minimum = "1"
+ ),
+ required = true
+ )
@PathParam("orderId") Long orderId) {
if (storeData.deleteOrder(orderId)) {
return Response.ok().entity("").build();
diff --git a/java/java-jaxrs/src/main/java/io/swagger/sample/resource/UserResource.java b/java/java-jaxrs/src/main/java/io/swagger/sample/resource/UserResource.java
index 84e7e894..84d12e4f 100644
--- a/java/java-jaxrs/src/main/java/io/swagger/sample/resource/UserResource.java
+++ b/java/java-jaxrs/src/main/java/io/swagger/sample/resource/UserResource.java
@@ -1,5 +1,5 @@
/**
- * Copyright 2016 SmartBear Software
+ * Copyright 2015 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,7 +16,10 @@
package io.swagger.sample.resource;
-import io.swagger.annotations.*;
+import io.swagger.oas.annotations.*;
+import io.swagger.oas.annotations.media.Schema;
+import io.swagger.oas.annotations.responses.ApiResponse;
+import io.swagger.oas.annotations.media.Content;
import io.swagger.sample.data.UserData;
import io.swagger.sample.model.User;
import io.swagger.sample.exception.ApiException;
@@ -26,26 +29,49 @@
import javax.ws.rs.*;
@Path("/user")
-@Api(value="/user", description = "Operations about user")
+@Schema(name = "/user")
@Produces({"application/json", "application/xml"})
public class UserResource {
static UserData userData = new UserData();
@POST
- @ApiOperation(value = "Create user",
- notes = "This can only be done by the logged in user.",
- position = 1)
+ @Operation(
+ method = "post",
+ summary = "Create user",
+ description = "This can only be done by the logged in user.",
+ responses = {
+ @ApiResponse(
+ description = "successful operation"
+ )
+ })
public Response createUser(
- @ApiParam(value = "Created user object", required = true) User user) {
+ @Parameter(
+ name = "user",
+ description = "Created user object",
+ schema = @Schema(implementation = User.class),
+ required = true
+ )
+ User user) {
userData.addUser(user);
return Response.ok().entity("").build();
}
@POST
@Path("/createWithArray")
- @ApiOperation(value = "Creates list of users with given input array",
- position = 2)
- public Response createUsersWithArrayInput(@ApiParam(value = "List of user object", required = true) User[] users) {
+ @Operation(
+ method = "post",
+ summary = "Creates list of users with given input array",
+ responses = {
+ @ApiResponse(
+ responseCode = "200",
+ description = "successful operation"
+ )
+ })
+ public Response createUsersWithArrayInput(
+ @Parameter(
+ description = "List of user object",
+ required = true
+ ) User[] users) {
for (User user : users) {
userData.addUser(user);
}
@@ -54,9 +80,19 @@ public Response createUsersWithArrayInput(@ApiParam(value = "List of user object
@POST
@Path("/createWithList")
- @ApiOperation(value = "Creates list of users with given input array",
- position = 3)
- public Response createUsersWithListInput(@ApiParam(value = "List of user object", required = true) java.util.List users) {
+ @Operation(
+ method = "post",
+ summary = "Creates list of users with given input array",
+ responses = {
+ @ApiResponse(
+ responseCode = "200",
+ description = "successful operation"
+ )
+ })
+ public Response createUsersWithListInput(
+ @Parameter(
+ description = "List of user object",
+ required = true) java.util.List users) {
for (User user : users) {
userData.addUser(user);
}
@@ -65,29 +101,59 @@ public Response createUsersWithListInput(@ApiParam(value = "List of user object"
@PUT
@Path("/{username}")
- @ApiOperation(value = "Updated user",
- notes = "This can only be done by the logged in user.",
- position = 4)
- @ApiResponses(value = {
- @ApiResponse(code = 400, message = "Invalid user supplied"),
- @ApiResponse(code = 404, message = "User not found") })
+ @Operation(
+ method = "put",
+ summary = "Updated user",
+ description = "This can only be done by the logged in user.",
+ responses = {
+ @ApiResponse(
+ responseCode = "400",
+ description = "Invalid user supplied"
+ ),
+ @ApiResponse(
+ responseCode = "404",
+ description = "User not found"
+ )
+ })
public Response updateUser(
- @ApiParam(value = "name that need to be deleted", required = true) @PathParam("username") String username,
- @ApiParam(value = "Updated user object", required = true) User user) {
+ @Parameter(
+ name = "username",
+ description = "name that need to be deleted",
+ schema = @Schema(type = "string"),
+ required = true
+ )
+ @PathParam("username") String username,
+ @Parameter(
+ description = "Updated user object",
+ required = true) User user) {
userData.addUser(user);
return Response.ok().entity("").build();
}
@DELETE
@Path("/{username}")
- @ApiOperation(value = "Delete user",
- notes = "This can only be done by the logged in user.",
- position = 5)
- @ApiResponses(value = {
- @ApiResponse(code = 400, message = "Invalid username supplied"),
- @ApiResponse(code = 404, message = "User not found") })
+ @Operation(
+ method = "delete",
+ summary = "Delete user",
+ description = "This can only be done by the logged in user.",
+ responses = {
+ @ApiResponse(
+ responseCode = "400",
+ description = "Invalid username supplied"
+ ),
+ @ApiResponse(
+ responseCode = "404",
+ description = "User not found"
+ )
+ })
public Response deleteUser(
- @ApiParam(value = "The name that needs to be deleted", required = true) @PathParam("username") String username) {
+ @Parameter(
+ name = "username",
+ description = "The name that needs to be deleted",
+ schema = @Schema(type = "string"),
+ required = true
+ )
+ @PathParam("username") String username) {
if (userData.removeUser(username)) {
return Response.ok().entity("").build();
} else {
@@ -97,15 +163,38 @@ public Response deleteUser(
@GET
@Path("/{username}")
- @ApiOperation(value = "Get user by user name",
- response = User.class,
- position = 0)
- @ApiResponses(value = {
- @ApiResponse(code = 400, message = "Invalid username supplied"),
- @ApiResponse(code = 404, message = "User not found") })
+ @Operation(
+ method = "get",
+ summary = "Get user by user name",
+ responses = {
+ @ApiResponse(
+ responseCode = "200",
+ description = "successful operation",
+ content = @Content(
+ schema = @Schema(implementation = User.class)
+ )),
+ @ApiResponse(
+ responseCode = "400",
+ description = "Invalid username supplied",
+ content = @Content(
+ schema = @Schema(implementation = User.class)
+ )),
+ @ApiResponse(
+ responseCode = "404",
+ description = "User not found",
+ content = @Content(
+ schema = @Schema(implementation = User.class)
+ )
+ )
+ })
public Response getUserByName(
- @ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ", required = true) @PathParam("username") String username)
- throws ApiException {
+ @Parameter(
+ name = "username",
+ description = "The name that needs to be fetched. Use user1 for testing.",
+ schema = @Schema(type = "string"),
+ required = true
+ )
+ @PathParam("username") String username) throws ApiException {
User user = userData.findUserByName(username);
if (null != user) {
return Response.ok().entity(user).build();
@@ -116,13 +205,32 @@ public Response getUserByName(
@GET
@Path("/login")
- @ApiOperation(value = "Logs user into the system",
- response = String.class,
- position = 6)
- @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid username/password supplied") })
+ @Operation(
+ method = "get",
+ summary = "Logs user into the system",
+ responses = {
+
+ @ApiResponse(
+ responseCode = "200",
+ description = "successful operation"),
+ @ApiResponse(
+ responseCode = "400",
+ description = "Invalid username/password supplied")
+ })
public Response loginUser(
- @ApiParam(value = "The user name for login", required = true) @QueryParam("username") String username,
- @ApiParam(value = "The password for login in clear text", required = true) @QueryParam("password") String password) {
+ @Parameter(
+ name = "username",
+ description = "The user name for login",
+ schema = @Schema(type = "string"),
+ required = true
+ )
+ @QueryParam("username") String username,
+ @Parameter(
+ name = "password",
+ description = "The password for login in clear text",
+ schema = @Schema(type = "string"),
+ required = true)
+ @QueryParam("password") String password) {
return Response.ok()
.entity("logged in user session:" + System.currentTimeMillis())
.build();
@@ -130,8 +238,14 @@ public Response loginUser(
@GET
@Path("/logout")
- @ApiOperation(value = "Logs out current logged in user session",
- position = 7)
+ @Operation(
+ method = "get",
+ summary = "Logs out current logged in user session",
+ responses = {
+ @ApiResponse(
+ description = "successful operation"
+ )
+ })
public Response logoutUser() {
return Response.ok().entity("").build();
}
diff --git a/java/java-jaxrs/src/main/java/io/swagger/sample/resource/VehicleResource.java b/java/java-jaxrs/src/main/java/io/swagger/sample/resource/VehicleResource.java
index 6898d7a2..6964fb2d 100644
--- a/java/java-jaxrs/src/main/java/io/swagger/sample/resource/VehicleResource.java
+++ b/java/java-jaxrs/src/main/java/io/swagger/sample/resource/VehicleResource.java
@@ -16,14 +16,14 @@
package io.swagger.sample.resource;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import io.swagger.annotations.ApiResponse;
-import io.swagger.annotations.ApiResponses;
-import io.swagger.annotations.Authorization;
-import io.swagger.annotations.AuthorizationScope;
-import io.swagger.sample.data.VehicleData;
+// import io.swagger.annotations.Api;
+import io.swagger.oas.annotations.Operation;
+import io.swagger.oas.annotations.Parameter;
+import io.swagger.oas.annotations.media.Content;
+import io.swagger.oas.annotations.media.Schema;
+import io.swagger.oas.annotations.responses.ApiResponse;
+//import io.swagger.annotations.Authorization;
+//import io.swagger.annotations.AuthorizationScope;
import io.swagger.sample.data.VehicleData;
import io.swagger.sample.exception.NotFoundException;
import io.swagger.sample.model.Vehicle;
@@ -38,7 +38,6 @@
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.StreamingOutput;
@@ -46,28 +45,52 @@
import java.io.OutputStream;
@Path("/vehicle")
-@Api(value = "/vehicle", description = "Operations about vehicles", authorizations = {
- @Authorization(value = "vehiclestore_auth",
- scopes = {
- @AuthorizationScope(scope = "write:vehicle", description = "modify vehicles in your account"),
- @AuthorizationScope(scope = "read:vehicle", description = "read your vehicles")
- })
-}, tags = "vehicle")
+// @Api(value = "/vehicle", description = "Operations about vehicles", authorizations = {
+// @Authorization(value = "vehiclestore_auth",
+// scopes = {
+// @AuthorizationScope(scope = "write:vehicle", description = "modify vehicles in your account"),
+// @AuthorizationScope(scope = "read:vehicle", description = "read your vehicles")
+// })
+// }, tags = "vehicle")
@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
public class VehicleResource {
static VehicleData vehicleData = new VehicleData();
@GET
@Path("/{vehicleId}")
- @ApiOperation(value = "Find vehicle by ID",
- notes = "Returns a vehicle when ID <= 10. ID > 10 or nonintegers will simulate API error conditions",
- response = Vehicle.class,
- authorizations = @Authorization(value = "api_key")
+ @Operation(
+ method = "GET",
+ summary = "Find vehicle by ID",
+ description = "Returns a vehicle when ID <= 10. ID > 10 or nonintegers will simulate API error conditions",
+ responses = {
+ @ApiResponse(
+ responseCode = "400",
+ description = "Invalid ID supplied"
+ ),
+ @ApiResponse(
+ responseCode = "404",
+ description = "Vehicle not found"
+ ),
+ @ApiResponse(
+ responseCode = "200",
+ description = "Vehicle found",
+ content = @Content(
+ mediaType = "application/json",
+ schema = @Schema(type = "array", implementation = Vehicle.class))
+ )
+
+ }
+
+//authorizations = @Authorization(value = "api_key")
)
- @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid ID supplied"),
- @ApiResponse(code = 404, message = "Vehicle not found") })
+
public Response getVehicleById(
- @ApiParam(value = "ID of vehicle that needs to be fetched", allowableValues = "range[1,10]", required = true) @PathParam("vehicleId") Long vehicleId)
+ @Parameter(
+ name = "vehicleId",
+ description = "ID of vehicle that needs to be fetched",
+ required = true,
+ schema = @Schema(implementation = Long.class, type = "integer", minimum = "1", maximum = "10")
+ ) @PathParam("vehicleId") Long vehicleId )
throws NotFoundException {
Vehicle vehicle = vehicleData.getVehicleById(vehicleId);
if (vehicle != null) {
@@ -79,15 +102,29 @@ public Response getVehicleById(
@GET
@Path("/{vehicleId}/download")
- @ApiOperation(value = "Find vehicle by ID",
- notes = "Returns a vehicle when ID <= 10. ID > 10 or nonintegers will simulate API error conditions",
- response = Vehicle.class,
- authorizations = @Authorization(value = "api_key")
+ @Operation(
+ method = "GET",
+ summary = "Find vehicle by ID",
+ description = "Returns a vehicle when ID <= 10. ID > 10 or nonintegers will simulate API error conditions",
+ responses = {
+ @ApiResponse(
+ responseCode = "400",
+ description = "Invalid ID supplied"
+ ),
+ @ApiResponse(
+ responseCode = "404",
+ description = "Vehicle not found"
+ )
+ }
+// authorizations = @Authorization(value = "api_key")
)
- @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid ID supplied"),
- @ApiResponse(code = 404, message = "Vehicle not found") })
public Response downloadFile(
- @ApiParam(value = "ID of vehicle that needs to be fetched", allowableValues = "range[1,10]", required = true) @PathParam("vehicleId") Long vehicleId)
+ @Parameter(
+ name = "vehicleId",
+ description = "ID of vehicle that needs to be fetched",
+ required = true,
+ schema = @Schema(implementation = Long.class, type = "integer", minimum = "1", maximum = "10")
+ ) @PathParam("vehicleId") Long vehicleId)
throws NotFoundException {
StreamingOutput stream = new StreamingOutput() {
@Override
@@ -108,12 +145,24 @@ public void write(OutputStream output) throws IOException {
@DELETE
@Path("/{vehicleId}")
- @ApiOperation(value = "Deletes a vehicle")
- @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid ID supplied"),
- @ApiResponse(code = 404, message = "Vehicle not found")})
+ @Operation(
+ method = "DELETE",
+ summary = "Deletes a vehicle",
+ description = "Deletes a vehicle when ID <= 10. ID > 10 or nonintegers will simulate API error conditions",
+ responses = {
+ @ApiResponse(
+ responseCode = "400",
+ description = "Invalid ID supplied"
+ ),
+ @ApiResponse(
+ responseCode = "404",
+ description = "Vehicle not found"
+ )
+ }
+ )
public Response deleteVehicle(
- @ApiParam() @HeaderParam("api_key") String apiKey,
- @ApiParam(value = "Vehicle id to delete", required = true)@PathParam("vehicleId") Long vehicleId) {
+ @Parameter(name ="apiKey", schema = @Schema(implementation = String.class, type = "string")) @HeaderParam("api_key") String apiKey,
+ @Parameter(name = "vehicleId", description = "Vehicle id to delete", required = true) @PathParam("vehicleId") Long vehicleId) {
if (vehicleData.deleteVehicle(vehicleId)) {
return Response.ok().build();
} else {
@@ -123,22 +172,47 @@ public Response deleteVehicle(
@POST
@Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
- @ApiOperation(value = "Add a new vehicle to the store")
- @ApiResponses(value = { @ApiResponse(code = 405, message = "Invalid input", response = io.swagger.sample.model.ApiResponse.class) })
+ @Operation(
+ method= "POST",
+ summary = "Add a new vehicle to the store",
+ responses = {
+ @ApiResponse(
+ responseCode = "400",
+ description = "Invalid input",
+ content = @Content(
+ mediaType = "application/json",
+ schema = @Schema(implementation = ApiResponse.class))
+ )
+ })
public Response addVehicle(
- @ApiParam(value = "Vehicle object that needs to be added to the store", required = true) Vehicle vehicle) {
+ @Parameter(name = "vehicle",
+ description = "Vehicle object that needs to be added to the store",
+ required = true) Vehicle vehicle) {
Vehicle updatedVehicle = vehicleData.addVehicle(vehicle);
return Response.ok().entity(updatedVehicle).build();
}
@PUT
@Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
- @ApiOperation(value = "Update an existing vehicle")
- @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid ID supplied"),
- @ApiResponse(code = 404, message = "Vehicle not found"),
- @ApiResponse(code = 405, message = "Validation exception") })
+ @Operation(
+ method = "PUT",
+ summary = "Update an existing vehicle",
+ responses = {
+ @ApiResponse(
+ responseCode = "400",
+ description = "Invalid ID supplied"
+ ),
+ @ApiResponse(
+ responseCode = "404",
+ description = "Vehicle not found"
+ ),
+ @ApiResponse(
+ responseCode = "405",
+ description = "Validation exception"
+ )
+ })
public Response updateVehicle(
- @ApiParam(value = "Vehicle object that needs to be added to the store", required = true) Vehicle vehicle) {
+ @Parameter(name = "vehicle", description = "Vehicle object that needs to be added to the store", required = true) Vehicle vehicle) {
Vehicle updatedVehicle = vehicleData.addVehicle(vehicle);
return Response.ok().entity(updatedVehicle).build();
}
@@ -146,14 +220,29 @@ public Response updateVehicle(
@POST
@Path("/{vehicleId}")
@Consumes({MediaType.APPLICATION_FORM_URLENCODED})
- @ApiOperation(value = "Updates a vehicle in the store with form data",
- consumes = MediaType.APPLICATION_FORM_URLENCODED)
- @ApiResponses(value = {
- @ApiResponse(code = 405, message = "Invalid input")})
+ @Operation(
+ method = "POST",
+ summary = "Updates a vehicle in the store with form data",
+ responses = {
+ @ApiResponse(
+ responseCode = "400",
+ description = "Invalid input"
+ )
+ })
public Response updateVehicleWithForm (
- @ApiParam(value = "ID of vehicle that needs to be updated", required = true)@PathParam("vehicleId") Long vehicleId,
- @ApiParam(value = "Updated name of the vehicle", required = false)@FormParam("name") String name,
- @ApiParam(value = "Updated status of the vehicle", required = false)@FormParam("status") String status) {
+ @Parameter(
+ name = "vehicleId",
+ description = "ID of vehicle that needs to be updated",
+ required = true,
+ schema = @Schema(implementation = Long.class)) @PathParam("vehicleId") Long vehicleId,
+ @Parameter(
+ name = "name",
+ description = "Updates name of the vehicle",
+ schema = @Schema(implementation = String.class)) @FormParam("name") String name,
+ @Parameter(
+ name = "status",
+ description = "Updates status of the vehicle",
+ schema = @Schema(implementation = String.class)) @FormParam("status") String status) {
Vehicle vehicle = vehicleData.getVehicleById(vehicleId);
if(vehicle != null) {
if(name != null && !"".equals(name))
diff --git a/java/java-jersey-jaxrs-multi-use-basepath/pom.xml b/java/java-jersey-jaxrs-multi-use-basepath/pom.xml
index 334291a4..137de674 100644
--- a/java/java-jersey-jaxrs-multi-use-basepath/pom.xml
+++ b/java/java-jersey-jaxrs-multi-use-basepath/pom.xml
@@ -7,9 +7,9 @@
4.0.0
io.swagger
- swagger-java-jersey-multi-sample-app
+ swagger-java-jersey-multi-use-basepath-sample-app
war
- swagger-java-jersey-jaxrs-multi-app
+ swagger-java-jersey-jaxrs-multi-use-basepath-app
1.0.0
src/main/java
diff --git a/java/java-jersey-jaxrs-multi-use-basepath/src/main/java/io/swagger/sample/resource/PetResource.java b/java/java-jersey-jaxrs-multi-use-basepath/src/main/java/io/swagger/sample/resource/PetResource.java
index 47b1fef4..af2827f2 100644
--- a/java/java-jersey-jaxrs-multi-use-basepath/src/main/java/io/swagger/sample/resource/PetResource.java
+++ b/java/java-jersey-jaxrs-multi-use-basepath/src/main/java/io/swagger/sample/resource/PetResource.java
@@ -149,7 +149,7 @@ public Response findPetsByStatus(
@GET
@Path("/findByTags")
@ApiOperation(value = "Finds Pets by tags",
- notes = "Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.",
+ notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.",
response = Pet.class,
responseContainer = "List")
@ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid tag value") })
diff --git a/java/java-jersey-jaxrs-multi/src/main/java/io/swagger/sample/resource/PetResource.java b/java/java-jersey-jaxrs-multi/src/main/java/io/swagger/sample/resource/PetResource.java
index 47b1fef4..af2827f2 100644
--- a/java/java-jersey-jaxrs-multi/src/main/java/io/swagger/sample/resource/PetResource.java
+++ b/java/java-jersey-jaxrs-multi/src/main/java/io/swagger/sample/resource/PetResource.java
@@ -149,7 +149,7 @@ public Response findPetsByStatus(
@GET
@Path("/findByTags")
@ApiOperation(value = "Finds Pets by tags",
- notes = "Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.",
+ notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.",
response = Pet.class,
responseContainer = "List")
@ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid tag value") })
diff --git a/java/java-jersey-jaxrs/src/main/java/io/swagger/sample/resource/PetResource.java b/java/java-jersey-jaxrs/src/main/java/io/swagger/sample/resource/PetResource.java
index 47b1fef4..af2827f2 100644
--- a/java/java-jersey-jaxrs/src/main/java/io/swagger/sample/resource/PetResource.java
+++ b/java/java-jersey-jaxrs/src/main/java/io/swagger/sample/resource/PetResource.java
@@ -149,7 +149,7 @@ public Response findPetsByStatus(
@GET
@Path("/findByTags")
@ApiOperation(value = "Finds Pets by tags",
- notes = "Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.",
+ notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.",
response = Pet.class,
responseContainer = "List")
@ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid tag value") })
diff --git a/java/java-jersey-spring/src/main/java/io/swagger/sample/resource/PetResource.java b/java/java-jersey-spring/src/main/java/io/swagger/sample/resource/PetResource.java
index 2a0b4faa..4997506f 100644
--- a/java/java-jersey-spring/src/main/java/io/swagger/sample/resource/PetResource.java
+++ b/java/java-jersey-spring/src/main/java/io/swagger/sample/resource/PetResource.java
@@ -49,7 +49,7 @@ Response updatePet(
@GET
@Path("/findByStatus")
@ApiOperation(value = "Finds Pets by status",
- notes = "Multiple status values can be provided with comma seperated strings",
+ notes = "Multiple status values can be provided with comma separated strings",
response = Pet.class,
responseContainer = "List")
@ApiResponses(value = {@ApiResponse(code = 400, message = "Invalid status value")})
@@ -59,7 +59,7 @@ Response findPetsByStatus(
@GET
@Path("/findByTags")
@ApiOperation(value = "Finds Pets by tags",
- notes = "Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.",
+ notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.",
response = Pet.class,
responseContainer = "List")
@ApiResponses(value = {@ApiResponse(code = 400, message = "Invalid tag value")})
diff --git a/java/java-jersey2-guice/src/main/java/io/swagger/sample/resource/PetResource.java b/java/java-jersey2-guice/src/main/java/io/swagger/sample/resource/PetResource.java
index 10a97048..a90e7a65 100644
--- a/java/java-jersey2-guice/src/main/java/io/swagger/sample/resource/PetResource.java
+++ b/java/java-jersey2-guice/src/main/java/io/swagger/sample/resource/PetResource.java
@@ -84,7 +84,7 @@ public Response findPetsByStatus(
@GET
@Path("/findByTags")
@ApiOperation(value = "Finds Pets by tags",
- notes = "Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.",
+ notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.",
response = Pet.class,
responseContainer = "List")
@ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid tag value") })
diff --git a/java/java-jersey2/src/main/java/io/swagger/sample/resource/PetResource.java b/java/java-jersey2/src/main/java/io/swagger/sample/resource/PetResource.java
index 46d16bb8..6374b4f3 100644
--- a/java/java-jersey2/src/main/java/io/swagger/sample/resource/PetResource.java
+++ b/java/java-jersey2/src/main/java/io/swagger/sample/resource/PetResource.java
@@ -88,6 +88,13 @@ public Response updatePet(
@GET
@Path("/findByStatus")
+<<<<<<< HEAD
+ @ApiOperation(value = "Finds Pets by status",
+ notes = "Multiple status values can be provided with comma separated strings",
+ response = Pet.class,
+ responseContainer = "List")
+ @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid status value") })
+=======
@Operation(summary = "Finds Pets by status",
description = "Multiple status values can be provided with comma seperated strings",
responses = {
@@ -98,6 +105,7 @@ public Response updatePet(
responseCode = "400", description = "Invalid status value"
)}
)
+>>>>>>> e22cf1d12d8fa88fd74cdc20cea9456f960a2aee
public Response findPetsByStatus(
@Parameter(description = "Status values that need to be considered for filter", required = true/*, defaultValue = "available", allowableValues = "available,pending,sold", allowMultiple = true*/) @QueryParam("status") String status,
@BeanParam QueryResultBean qr
@@ -107,6 +115,13 @@ public Response findPetsByStatus(
@GET
@Path("/findByTags")
+<<<<<<< HEAD
+ @ApiOperation(value = "Finds Pets by tags",
+ notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.",
+ response = Pet.class,
+ responseContainer = "List")
+ @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid tag value") })
+=======
@Operation(summary = "Finds Pets by tags",
description = "Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.",
responses = {
@@ -116,6 +131,7 @@ public Response findPetsByStatus(
),
@ApiResponse(description = "Invalid tag value", responseCode = "400")
})
+>>>>>>> e22cf1d12d8fa88fd74cdc20cea9456f960a2aee
@Deprecated
public Response findPetsByTags(
@Parameter(description = "Tags to filter by", required = true/*, allowMultiple = true*/) @QueryParam("tags") String tags) {
diff --git a/java/java-mule/src/main/java/io/swagger/sample/resource/PetResource.java b/java/java-mule/src/main/java/io/swagger/sample/resource/PetResource.java
index 82936a03..346cfa75 100644
--- a/java/java-mule/src/main/java/io/swagger/sample/resource/PetResource.java
+++ b/java/java-mule/src/main/java/io/swagger/sample/resource/PetResource.java
@@ -99,7 +99,7 @@ public Response updatePet(
@GET
@Path("/findByStatus")
@ApiOperation(value = "Finds Pets by status",
- notes = "Multiple status values can be provided with comma seperated strings",
+ notes = "Multiple status values can be provided with comma separated strings",
response = Pet.class,
responseContainer = "List")
@ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid status value") })
@@ -111,7 +111,7 @@ public Response findPetsByStatus(
@GET
@Path("/findByTags")
@ApiOperation(value = "Finds Pets by tags",
- notes = "Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.",
+ notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.",
response = Pet.class,
responseContainer = "List")
@ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid tag value") })
diff --git a/java/java-servlet/src/main/java/io/swagger/sample/servlet/SampleServlet.java b/java/java-servlet/src/main/java/io/swagger/sample/servlet/SampleServlet.java
index 1e3a63a1..822dae5d 100644
--- a/java/java-servlet/src/main/java/io/swagger/sample/servlet/SampleServlet.java
+++ b/java/java-servlet/src/main/java/io/swagger/sample/servlet/SampleServlet.java
@@ -1,67 +1,75 @@
package io.swagger.sample.servlet;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiResponse;
-import io.swagger.annotations.ApiResponses;
-import io.swagger.annotations.Contact;
-import io.swagger.annotations.Info;
-import io.swagger.annotations.License;
-import io.swagger.annotations.SwaggerDefinition;
-import io.swagger.annotations.Tag;
import io.swagger.sample.model.SampleData;
import io.swagger.util.Json;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.text.SimpleDateFormat;
+import java.util.ArrayList;
import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-@SwaggerDefinition(
- info = @Info(
- description = "This is a sample server",
- version = "1.0.0",
- title = "Swagger Sample Servlet",
- termsOfService = "http://swagger.io/terms/",
- contact = @Contact(name = "Sponge-Bob", email = "apiteam@swagger.io", url = "http://swagger.io"),
- license = @License(name = "Apache 2.0", url = "http://www.apache.org/licenses/LICENSE-2.0.html")
- ),
- consumes = {"application/json", "application/xml"},
- produces = {"application/json", "application/xml"},
- schemes = {SwaggerDefinition.Scheme.HTTP, SwaggerDefinition.Scheme.HTTPS},
- tags = {@Tag(name = "users", description = "Operations about user")}
-)
-@Api(value = "/sample/users", description = "gets some data from a servlet")
-public class SampleServlet extends HttpServlet {
-
- @ApiOperation(httpMethod = "GET", value = "Resource to get a user", response = SampleData.class, nickname = "getUser")
- @ApiResponses({@ApiResponse(code = 400, message = "Invalid input", response = io.swagger.sample.model.ApiResponse
- .class)})
- @ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "User ID", required = true, dataType = "integer", paramType =
- "query"),
- @ApiImplicitParam(name = "name", value = "User's name", required = true, dataType = "string", paramType =
- "query"),
- @ApiImplicitParam(name = "email", value = "User's email", required = true, dataType = "string", paramType
- = "query"),
- @ApiImplicitParam(name = "age", value = "User's age", required = true, dataType = "integer", paramType =
- "query"),
- @ApiImplicitParam(name = "dateOfBirth", value = "User's date of birth, in dd-MM-yyyy format", required =
- true, dataType = "java.util.Date", paramType = "query")})
+import io.swagger.oas.models.Components;
+import io.swagger.oas.models.OpenAPI;
+import io.swagger.oas.models.Operation;
+import io.swagger.oas.models.PathItem;
+import io.swagger.oas.models.Paths;
+import io.swagger.oas.models.info.Info;
+import io.swagger.oas.models.media.Content;
+import io.swagger.oas.models.media.MediaType;
+import io.swagger.oas.models.media.Schema;
+import io.swagger.oas.models.responses.ApiResponse;
+import io.swagger.oas.models.responses.ApiResponses;
+import io.swagger.oas.web.OpenAPIConfig;
+//import io.swagger.oas.web.OpenAPIConfig;
+import io.swagger.oas.web.OpenAPIConfigBuilder;
+//@SwaggerDefinition(
+// info = @Info(
+// description = "This is a sample server",
+// version = "1.0.0",
+// title = "Swagger Sample Servlet",
+// termsOfService = "http://swagger.io/terms/",
+// contact = @Contact(name = "Sponge-Bob", email = "apiteam@swagger.io", url = "http://swagger.io"),
+// license = @License(name = "Apache 2.0", url = "http://www.apache.org/licenses/LICENSE-2.0.html")
+// ),
+// consumes = {"application/json", "application/xml"},
+// produces = {"application/json", "application/xml"},
+// schemes = {SwaggerDefinition.Scheme.HTTP, SwaggerDefinition.Scheme.HTTPS},
+// tags = {@Tag(name = "users", description = "Operations about user")}
+//)
+//@Api(value = "/sample/users", description = "gets some data from a servlet")
+public class SampleServlet extends HttpServlet implements OpenAPIConfigBuilder {
+
+// @ApiOperation(httpMethod = "GET", value = "Resource to get a user", response = SampleData.class, nickname = "getUser")
+// @ApiResponses({@ApiResponse(code = 400, message = "Invalid input", response = io.swagger.sample.model.ApiResponse
+// .class)})
+// @ApiImplicitParams({
+// @ApiImplicitParam(name = "id", value = "User ID", required = true, dataType = "integer", paramType =
+// "query"),
+// @ApiImplicitParam(name = "name", value = "User's name", required = true, dataType = "string", paramType =
+// "query"),
+// @ApiImplicitParam(name = "email", value = "User's email", required = true, dataType = "string", paramType
+// = "query"),
+// @ApiImplicitParam(name = "age", value = "User's age", required = true, dataType = "integer", paramType =
+// "query"),
+// @ApiImplicitParam(name = "dateOfBirth", value = "User's date of birth, in dd-MM-yyyy format", required =
+// true, dataType = "java.util.Date", paramType = "query")})
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String result;
try {
final Integer id = Integer.parseInt(request.getParameter("id"));
final String name = request.getParameter("name");
final String email = request.getParameter("email");
- final Integer age = Integer.parseInt(request.getParameter("age"));
+ final int age = Integer.parseInt(request.getParameter("age"));
final Date dateOfBirth = new SimpleDateFormat("dd-MM-yyyy").parse(request.getParameter("dateOfBirth"));
result = Json.pretty(new SampleData(id, name, email, age, dateOfBirth));
} catch (Exception ex) {
@@ -70,4 +78,150 @@ public void doGet(HttpServletRequest request, HttpServletResponse response) thro
response.getOutputStream().write(result.getBytes(StandardCharsets.UTF_8));
}
+
+ @Override
+ public OpenAPIConfig build(Map arg0) {
+ OpenAPI oai = new OpenAPI();
+
+ Info info = new Info();
+ info.setTitle("Swagger Sample Servlet");
+ info.setVersion("1.0.0");
+ oai.setInfo(info);
+
+ Components components = new Components();
+ Map schemas = new HashMap();
+ List required = new ArrayList();
+ required.add("name");
+ required.add("id");
+ required.add("email");
+ required.add("age");
+
+ Map properties = new HashMap();
+ properties.put("name", new Schema()
+ .type("string"));
+ properties.put("id", new Schema()
+ .type("integer")
+ .format("int32"));
+ properties.put("email", new Schema()
+ .type("string"));
+ properties.put("age", new Schema()
+ .type("integer")
+ .format("int32"));
+
+ schemas.put("User", new Schema()
+ .type("object")
+ .required(required)
+ .properties(properties));
+
+ components.setSchemas(schemas);
+ Paths paths = new Paths();
+ PathItem pathItem = new PathItem();
+
+ Operation operation = new Operation();
+ operation.setDescription("Resource to get a user");
+
+ ApiResponses responses = new ApiResponses();
+
+ ApiResponse item = new ApiResponse();
+ item.setDescription("Successful");
+
+ Content content = new Content();
+ MediaType mediaType = new MediaType();
+
+ Schema schema = new Schema();
+ schema.set$ref("#/components/schemas/User");
+
+ mediaType.setSchema(schema);
+ content.addMediaType("application/json", mediaType);
+
+ item.setContent(content);
+
+ operation.setResponses(responses);
+
+ List parameters = new ArrayList();
+ parameters.add(new Parameter()
+ .name("name")
+ .required(true)
+ .in("query")
+ .description("Name of the user")
+ .schema(new Schema()
+ .type("string")));
+ parameters.add(new Parameter()
+ .name("id")
+ .required(true)
+ .in("query")
+ .description("Id of the user")
+ .schema(new Schema()
+ .type("integer")
+ .format("int32")));
+ parameters.add(new Parameter()
+ .name("email")
+ .required(true)
+ .in("query")
+ .description("Email of the user")
+ .schema(new Schema()
+ .type("string")));
+ parameters.add(new Parameter()
+ .name("age")
+ .required(true)
+ .in("query")
+ .description("Age of the user")
+ .schema(new Schema()
+ .type("integer")
+ .format("int32")));
+ operation.setParameters(parameters);
+
+ pathItem.get(operation);
+ paths.addPathItem("/sample/users", pathItem);
+ oai.setPaths(paths);
+
+ OpenAPIConfig openAPIConfig = new OpenAPIConfig () {
+
+ @Override
+ public String getFilterClass() {
+ return null;
+ }
+
+ @Override
+ public Set getIgnoredClasses() {
+ return null;
+ }
+
+ @Override
+ public OpenAPI getOpenAPI() {
+ return oai;
+ }
+
+ @Override
+ public Map getOptions() {
+ return null;
+ }
+
+ @Override
+ public String getReaderClass() {
+ return null;
+ }
+
+ @Override
+ public Set getResourceClasses() {
+ return null;
+ }
+
+ @Override
+ public Set getResourcePackages() {
+ return null;
+ }
+
+ @Override
+ public String getScannerClass() {
+ return null;
+ }
+
+ @Override
+ public boolean isScanDisabled() {
+ return false;
+ }
+ };
+ return openAPIConfig;
+ }
}
diff --git a/scala/scala-play2.4/app/controllers/PetApiController.scala b/scala/scala-play2.4/app/controllers/PetApiController.scala
index b45d5c9d..4e653e15 100644
--- a/scala/scala-play2.4/app/controllers/PetApiController.scala
+++ b/scala/scala-play2.4/app/controllers/PetApiController.scala
@@ -89,7 +89,7 @@ class PetApiController extends BaseApiController {
@ApiOperation(nickname = "findPetByStatus",
value = "Finds Pets by status",
- notes = "Multiple status values can be provided with comma seperated strings",
+ notes = "Multiple status values can be provided with comma separated strings",
response = classOf[models.Pet], responseContainer = "List", httpMethod = "GET")
@ApiResponses(Array(
new ApiResponse(code = 400, message = "Invalid status value")))
@@ -103,7 +103,7 @@ class PetApiController extends BaseApiController {
@ApiOperation(nickname = "findPetsByTags",
value = "Finds Pets by tags",
- notes = "Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.",
+ notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.",
response = classOf[models.Pet], responseContainer = "List", httpMethod = "GET")
@ApiResponses(Array(
new ApiResponse(code = 400, message = "Invalid tag value")))