forked from loafle/openapi-generator-original
update language jaxrs (Jersey2) and samples
This commit is contained in:
parent
dde24eb9c2
commit
5b532fd10e
@ -15,7 +15,9 @@ import java.io.InputStream;
|
|||||||
|
|
||||||
import javax.ws.rs.core.Response;
|
import javax.ws.rs.core.Response;
|
||||||
import javax.ws.rs.core.SecurityContext;
|
import javax.ws.rs.core.SecurityContext;
|
||||||
|
{{#useBeanValidation}}
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
{{/useBeanValidation}}
|
||||||
{{>generatedAnnotation}}
|
{{>generatedAnnotation}}
|
||||||
{{#operations}}
|
{{#operations}}
|
||||||
public abstract class {{classname}}Service {
|
public abstract class {{classname}}Service {
|
||||||
|
@ -15,7 +15,9 @@ import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
|
|||||||
|
|
||||||
import javax.ws.rs.core.Response;
|
import javax.ws.rs.core.Response;
|
||||||
import javax.ws.rs.core.SecurityContext;
|
import javax.ws.rs.core.SecurityContext;
|
||||||
|
{{#useBeanValidation}}
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
{{/useBeanValidation}}
|
||||||
{{>generatedAnnotation}}
|
{{>generatedAnnotation}}
|
||||||
{{#operations}}
|
{{#operations}}
|
||||||
public class {{classname}}ServiceImpl extends {{classname}}Service {
|
public class {{classname}}ServiceImpl extends {{classname}}Service {
|
||||||
|
@ -23,6 +23,7 @@ import javax.ws.rs.core.Context;
|
|||||||
import javax.ws.rs.core.Response;
|
import javax.ws.rs.core.Response;
|
||||||
import javax.ws.rs.core.SecurityContext;
|
import javax.ws.rs.core.SecurityContext;
|
||||||
import javax.ws.rs.*;
|
import javax.ws.rs.*;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
@Path("/fake")
|
@Path("/fake")
|
||||||
|
|
||||||
@ -36,7 +37,7 @@ public class FakeApi {
|
|||||||
|
|
||||||
@Consumes({ "application/json" })
|
@Consumes({ "application/json" })
|
||||||
@Produces({ "application/json" })
|
@Produces({ "application/json" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "To test \"client\" model", notes = "", response = Client.class, tags={ "fake", })
|
@io.swagger.annotations.ApiOperation(value = "To test \"client\" model", notes = "To test \"client\" model", response = Client.class, tags={ "fake", })
|
||||||
@io.swagger.annotations.ApiResponses(value = {
|
@io.swagger.annotations.ApiResponses(value = {
|
||||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) })
|
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) })
|
||||||
public Response testClientModel(@ApiParam(value = "client model" ,required=true) Client body
|
public Response testClientModel(@ApiParam(value = "client model" ,required=true) Client body
|
||||||
@ -77,7 +78,7 @@ public class FakeApi {
|
|||||||
|
|
||||||
@Consumes({ "*/*" })
|
@Consumes({ "*/*" })
|
||||||
@Produces({ "*/*" })
|
@Produces({ "*/*" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "To test enum parameters", notes = "", response = void.class, tags={ "fake", })
|
@io.swagger.annotations.ApiOperation(value = "To test enum parameters", notes = "To test enum parameters", response = void.class, tags={ "fake", })
|
||||||
@io.swagger.annotations.ApiResponses(value = {
|
@io.swagger.annotations.ApiResponses(value = {
|
||||||
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid request", response = void.class),
|
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid request", response = void.class),
|
||||||
|
|
||||||
@ -88,7 +89,7 @@ public class FakeApi {
|
|||||||
,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg")@HeaderParam("enum_header_string") String enumHeaderString
|
,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg")@HeaderParam("enum_header_string") String enumHeaderString
|
||||||
,@ApiParam(value = "Query parameter enum test (string array)", allowableValues=">, $") @QueryParam("enum_query_string_array") List<String> enumQueryStringArray
|
,@ApiParam(value = "Query parameter enum test (string array)", allowableValues=">, $") @QueryParam("enum_query_string_array") List<String> enumQueryStringArray
|
||||||
,@ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString
|
,@ApiParam(value = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString
|
||||||
,@ApiParam(value = "Query parameter enum test (double)") @QueryParam("enum_query_integer") BigDecimal enumQueryInteger
|
,@ApiParam(value = "Query parameter enum test (double)") @QueryParam("enum_query_integer") Integer enumQueryInteger
|
||||||
,@ApiParam(value = "Query parameter enum test (double)") @FormParam("enum_query_double") Double enumQueryDouble
|
,@ApiParam(value = "Query parameter enum test (double)") @FormParam("enum_query_double") Double enumQueryDouble
|
||||||
,@Context SecurityContext securityContext)
|
,@Context SecurityContext securityContext)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
|
@ -16,10 +16,10 @@ import java.io.InputStream;
|
|||||||
|
|
||||||
import javax.ws.rs.core.Response;
|
import javax.ws.rs.core.Response;
|
||||||
import javax.ws.rs.core.SecurityContext;
|
import javax.ws.rs.core.SecurityContext;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
public abstract class FakeApiService {
|
public abstract class FakeApiService {
|
||||||
public abstract Response testClientModel(Client body,SecurityContext securityContext) throws NotFoundException;
|
public abstract Response testClientModel(Client body,SecurityContext securityContext) throws NotFoundException;
|
||||||
public abstract Response testEndpointParameters(BigDecimal number,Double _double,String patternWithoutDelimiter,byte[] _byte,Integer integer,Integer int32,Long int64,Float _float,String string,byte[] binary,Date date,Date dateTime,String password,String paramCallback,SecurityContext securityContext) throws NotFoundException;
|
public abstract Response testEndpointParameters(BigDecimal number,Double _double,String patternWithoutDelimiter,byte[] _byte,Integer integer,Integer int32,Long int64,Float _float,String string,byte[] binary,Date date,Date dateTime,String password,String paramCallback,SecurityContext securityContext) throws NotFoundException;
|
||||||
public abstract Response testEnumParameters(List<String> enumFormStringArray,String enumFormString,List<String> enumHeaderStringArray,String enumHeaderString,List<String> enumQueryStringArray,String enumQueryString,BigDecimal enumQueryInteger,Double enumQueryDouble,SecurityContext securityContext) throws NotFoundException;
|
public abstract Response testEnumParameters(List<String> enumFormStringArray,String enumFormString,List<String> enumHeaderStringArray,String enumHeaderString, List<String> enumQueryStringArray, String enumQueryString, Integer enumQueryInteger,Double enumQueryDouble,SecurityContext securityContext) throws NotFoundException;
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ import io.swagger.annotations.ApiParam;
|
|||||||
import io.swagger.jaxrs.*;
|
import io.swagger.jaxrs.*;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import io.swagger.model.ModelApiResponse;
|
||||||
import io.swagger.model.Pet;
|
import io.swagger.model.Pet;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -35,7 +36,7 @@ public class PetApi {
|
|||||||
@POST
|
@POST
|
||||||
|
|
||||||
@Consumes({ "application/json", "application/xml" })
|
@Consumes({ "application/json", "application/xml" })
|
||||||
@Produces({ "application/json", "application/xml" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Add a new pet to the store", notes = "", response = void.class, authorizations = {
|
@io.swagger.annotations.ApiOperation(value = "Add a new pet to the store", notes = "", response = void.class, authorizations = {
|
||||||
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
|
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
|
||||||
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||||
@ -44,7 +45,7 @@ public class PetApi {
|
|||||||
}, tags={ "pet", })
|
}, tags={ "pet", })
|
||||||
@io.swagger.annotations.ApiResponses(value = {
|
@io.swagger.annotations.ApiResponses(value = {
|
||||||
@io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = void.class) })
|
@io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = void.class) })
|
||||||
public Response addPet(@ApiParam(value = "Pet object that needs to be added to the store" ) Pet body
|
public Response addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet body
|
||||||
,@Context SecurityContext securityContext)
|
,@Context SecurityContext securityContext)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
return delegate.addPet(body,securityContext);
|
return delegate.addPet(body,securityContext);
|
||||||
@ -52,7 +53,7 @@ public class PetApi {
|
|||||||
@DELETE
|
@DELETE
|
||||||
@Path("/{petId}")
|
@Path("/{petId}")
|
||||||
|
|
||||||
@Produces({ "application/json", "application/xml" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Deletes a pet", notes = "", response = void.class, authorizations = {
|
@io.swagger.annotations.ApiOperation(value = "Deletes a pet", notes = "", response = void.class, authorizations = {
|
||||||
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
|
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
|
||||||
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||||
@ -70,7 +71,7 @@ public class PetApi {
|
|||||||
@GET
|
@GET
|
||||||
@Path("/findByStatus")
|
@Path("/findByStatus")
|
||||||
|
|
||||||
@Produces({ "application/json", "application/xml" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Finds Pets by status", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = {
|
@io.swagger.annotations.ApiOperation(value = "Finds Pets by status", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = {
|
||||||
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
|
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
|
||||||
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||||
@ -81,7 +82,7 @@ public class PetApi {
|
|||||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
|
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
|
||||||
|
|
||||||
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid status value", response = Pet.class, responseContainer = "List") })
|
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid status value", response = Pet.class, responseContainer = "List") })
|
||||||
public Response findPetsByStatus(@ApiParam(value = "Status values that need to be considered for filter", allowableValues="available, pending, sold", defaultValue="available") @DefaultValue("available") @QueryParam("status") List<String> status
|
public Response findPetsByStatus(@ApiParam(value = "Status values that need to be considered for filter",required=true, allowableValues="available, pending, sold") @QueryParam("status") List<String> status
|
||||||
,@Context SecurityContext securityContext)
|
,@Context SecurityContext securityContext)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
return delegate.findPetsByStatus(status,securityContext);
|
return delegate.findPetsByStatus(status,securityContext);
|
||||||
@ -89,7 +90,7 @@ public class PetApi {
|
|||||||
@GET
|
@GET
|
||||||
@Path("/findByTags")
|
@Path("/findByTags")
|
||||||
|
|
||||||
@Produces({ "application/json", "application/xml" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@io.swagger.annotations.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", authorizations = {
|
@io.swagger.annotations.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", authorizations = {
|
||||||
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
|
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
|
||||||
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||||
@ -100,7 +101,7 @@ public class PetApi {
|
|||||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
|
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
|
||||||
|
|
||||||
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid tag value", response = Pet.class, responseContainer = "List") })
|
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid tag value", response = Pet.class, responseContainer = "List") })
|
||||||
public Response findPetsByTags(@ApiParam(value = "Tags to filter by") @QueryParam("tags") List<String> tags
|
public Response findPetsByTags(@ApiParam(value = "Tags to filter by",required=true) @QueryParam("tags") List<String> tags
|
||||||
,@Context SecurityContext securityContext)
|
,@Context SecurityContext securityContext)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
return delegate.findPetsByTags(tags,securityContext);
|
return delegate.findPetsByTags(tags,securityContext);
|
||||||
@ -108,12 +109,8 @@ public class PetApi {
|
|||||||
@GET
|
@GET
|
||||||
@Path("/{petId}")
|
@Path("/{petId}")
|
||||||
|
|
||||||
@Produces({ "application/json", "application/xml" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@io.swagger.annotations.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 = {
|
@io.swagger.annotations.ApiOperation(value = "Find pet by ID", notes = "Returns a single pet", response = Pet.class, authorizations = {
|
||||||
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
|
|
||||||
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
|
||||||
@io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
|
|
||||||
}),
|
|
||||||
@io.swagger.annotations.Authorization(value = "api_key")
|
@io.swagger.annotations.Authorization(value = "api_key")
|
||||||
}, tags={ "pet", })
|
}, tags={ "pet", })
|
||||||
@io.swagger.annotations.ApiResponses(value = {
|
@io.swagger.annotations.ApiResponses(value = {
|
||||||
@ -122,7 +119,7 @@ public class PetApi {
|
|||||||
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Pet.class),
|
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Pet.class),
|
||||||
|
|
||||||
@io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Pet.class) })
|
@io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Pet.class) })
|
||||||
public Response getPetById(@ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("petId") Long petId
|
public Response getPetById(@ApiParam(value = "ID of pet to return",required=true) @PathParam("petId") Long petId
|
||||||
,@Context SecurityContext securityContext)
|
,@Context SecurityContext securityContext)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
return delegate.getPetById(petId,securityContext);
|
return delegate.getPetById(petId,securityContext);
|
||||||
@ -130,7 +127,7 @@ public class PetApi {
|
|||||||
@PUT
|
@PUT
|
||||||
|
|
||||||
@Consumes({ "application/json", "application/xml" })
|
@Consumes({ "application/json", "application/xml" })
|
||||||
@Produces({ "application/json", "application/xml" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Update an existing pet", notes = "", response = void.class, authorizations = {
|
@io.swagger.annotations.ApiOperation(value = "Update an existing pet", notes = "", response = void.class, authorizations = {
|
||||||
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
|
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
|
||||||
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||||
@ -143,7 +140,7 @@ public class PetApi {
|
|||||||
@io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = void.class),
|
@io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = void.class),
|
||||||
|
|
||||||
@io.swagger.annotations.ApiResponse(code = 405, message = "Validation exception", response = void.class) })
|
@io.swagger.annotations.ApiResponse(code = 405, message = "Validation exception", response = void.class) })
|
||||||
public Response updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ) Pet body
|
public Response updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet body
|
||||||
,@Context SecurityContext securityContext)
|
,@Context SecurityContext securityContext)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
return delegate.updatePet(body,securityContext);
|
return delegate.updatePet(body,securityContext);
|
||||||
@ -151,7 +148,7 @@ public class PetApi {
|
|||||||
@POST
|
@POST
|
||||||
@Path("/{petId}")
|
@Path("/{petId}")
|
||||||
@Consumes({ "application/x-www-form-urlencoded" })
|
@Consumes({ "application/x-www-form-urlencoded" })
|
||||||
@Produces({ "application/json", "application/xml" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Updates a pet in the store with form data", notes = "", response = void.class, authorizations = {
|
@io.swagger.annotations.ApiOperation(value = "Updates a pet in the store with form data", notes = "", response = void.class, authorizations = {
|
||||||
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
|
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
|
||||||
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||||
@ -160,7 +157,7 @@ public class PetApi {
|
|||||||
}, tags={ "pet", })
|
}, tags={ "pet", })
|
||||||
@io.swagger.annotations.ApiResponses(value = {
|
@io.swagger.annotations.ApiResponses(value = {
|
||||||
@io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = void.class) })
|
@io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = void.class) })
|
||||||
public Response updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true) @PathParam("petId") String petId
|
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") @FormParam("name") String name
|
,@ApiParam(value = "Updated name of the pet") @FormParam("name") String name
|
||||||
,@ApiParam(value = "Updated status of the pet") @FormParam("status") String status
|
,@ApiParam(value = "Updated status of the pet") @FormParam("status") String status
|
||||||
,@Context SecurityContext securityContext)
|
,@Context SecurityContext securityContext)
|
||||||
@ -170,15 +167,15 @@ public class PetApi {
|
|||||||
@POST
|
@POST
|
||||||
@Path("/{petId}/uploadImage")
|
@Path("/{petId}/uploadImage")
|
||||||
@Consumes({ "multipart/form-data" })
|
@Consumes({ "multipart/form-data" })
|
||||||
@Produces({ "application/json", "application/xml" })
|
@Produces({ "application/json" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = void.class, authorizations = {
|
@io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = {
|
||||||
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
|
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
|
||||||
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||||
@io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
|
@io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||||
})
|
})
|
||||||
}, tags={ "pet", })
|
}, tags={ "pet", })
|
||||||
@io.swagger.annotations.ApiResponses(value = {
|
@io.swagger.annotations.ApiResponses(value = {
|
||||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = void.class) })
|
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
|
||||||
public Response uploadFile(@ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId
|
public Response uploadFile(@ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId
|
||||||
,@ApiParam(value = "Additional data to pass to server")@FormDataParam("additionalMetadata") String additionalMetadata
|
,@ApiParam(value = "Additional data to pass to server")@FormDataParam("additionalMetadata") String additionalMetadata
|
||||||
,
|
,
|
||||||
|
@ -6,6 +6,7 @@ import io.swagger.model.*;
|
|||||||
import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
|
import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import io.swagger.model.ModelApiResponse;
|
||||||
import io.swagger.model.Pet;
|
import io.swagger.model.Pet;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -15,15 +16,15 @@ import java.io.InputStream;
|
|||||||
|
|
||||||
import javax.ws.rs.core.Response;
|
import javax.ws.rs.core.Response;
|
||||||
import javax.ws.rs.core.SecurityContext;
|
import javax.ws.rs.core.SecurityContext;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
public abstract class PetApiService {
|
public abstract class PetApiService {
|
||||||
public abstract Response addPet(Pet body,SecurityContext securityContext) throws NotFoundException;
|
public abstract Response addPet(Pet body,SecurityContext securityContext) throws NotFoundException;
|
||||||
public abstract Response deletePet(Long petId,String apiKey,SecurityContext securityContext) throws NotFoundException;
|
public abstract Response deletePet(Long petId,String apiKey,SecurityContext securityContext) throws NotFoundException;
|
||||||
public abstract Response findPetsByStatus( List<String> status,SecurityContext securityContext) throws NotFoundException;
|
public abstract Response findPetsByStatus( @NotNull List<String> status,SecurityContext securityContext) throws NotFoundException;
|
||||||
public abstract Response findPetsByTags( List<String> tags,SecurityContext securityContext) throws NotFoundException;
|
public abstract Response findPetsByTags( @NotNull List<String> tags,SecurityContext securityContext) throws NotFoundException;
|
||||||
public abstract Response getPetById(Long petId,SecurityContext securityContext) throws NotFoundException;
|
public abstract Response getPetById(Long petId,SecurityContext securityContext) throws NotFoundException;
|
||||||
public abstract Response updatePet(Pet body,SecurityContext securityContext) throws NotFoundException;
|
public abstract Response updatePet(Pet body,SecurityContext securityContext) throws NotFoundException;
|
||||||
public abstract Response updatePetWithForm(String petId,String name,String status,SecurityContext securityContext) throws NotFoundException;
|
public abstract Response updatePetWithForm(Long petId,String name,String status,SecurityContext securityContext) throws NotFoundException;
|
||||||
public abstract Response uploadFile(Long petId,String additionalMetadata,InputStream fileInputStream, FormDataContentDisposition fileDetail,SecurityContext securityContext) throws NotFoundException;
|
public abstract Response uploadFile(Long petId,String additionalMetadata,InputStream fileInputStream, FormDataContentDisposition fileDetail,SecurityContext securityContext) throws NotFoundException;
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,7 @@ public class StoreApi {
|
|||||||
@DELETE
|
@DELETE
|
||||||
@Path("/order/{orderId}")
|
@Path("/order/{orderId}")
|
||||||
|
|
||||||
@Produces({ "application/json", "application/xml" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Delete purchase order by ID", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", response = void.class, tags={ "store", })
|
@io.swagger.annotations.ApiOperation(value = "Delete purchase order by ID", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", response = void.class, tags={ "store", })
|
||||||
@io.swagger.annotations.ApiResponses(value = {
|
@io.swagger.annotations.ApiResponses(value = {
|
||||||
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = void.class),
|
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = void.class),
|
||||||
@ -49,7 +49,7 @@ public class StoreApi {
|
|||||||
@GET
|
@GET
|
||||||
@Path("/inventory")
|
@Path("/inventory")
|
||||||
|
|
||||||
@Produces({ "application/json", "application/xml" })
|
@Produces({ "application/json" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Returns pet inventories by status", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = {
|
@io.swagger.annotations.ApiOperation(value = "Returns pet inventories by status", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = {
|
||||||
@io.swagger.annotations.Authorization(value = "api_key")
|
@io.swagger.annotations.Authorization(value = "api_key")
|
||||||
}, tags={ "store", })
|
}, tags={ "store", })
|
||||||
@ -62,7 +62,7 @@ public class StoreApi {
|
|||||||
@GET
|
@GET
|
||||||
@Path("/order/{orderId}")
|
@Path("/order/{orderId}")
|
||||||
|
|
||||||
@Produces({ "application/json", "application/xml" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", })
|
@io.swagger.annotations.ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", })
|
||||||
@io.swagger.annotations.ApiResponses(value = {
|
@io.swagger.annotations.ApiResponses(value = {
|
||||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class),
|
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class),
|
||||||
@ -70,7 +70,7 @@ public class StoreApi {
|
|||||||
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Order.class),
|
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Order.class),
|
||||||
|
|
||||||
@io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Order.class) })
|
@io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Order.class) })
|
||||||
public Response getOrderById(@ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("orderId") String orderId
|
public Response getOrderById(@ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("orderId") Long orderId
|
||||||
,@Context SecurityContext securityContext)
|
,@Context SecurityContext securityContext)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
return delegate.getOrderById(orderId,securityContext);
|
return delegate.getOrderById(orderId,securityContext);
|
||||||
@ -78,13 +78,13 @@ public class StoreApi {
|
|||||||
@POST
|
@POST
|
||||||
@Path("/order")
|
@Path("/order")
|
||||||
|
|
||||||
@Produces({ "application/json", "application/xml" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Place an order for a pet", notes = "", response = Order.class, tags={ "store", })
|
@io.swagger.annotations.ApiOperation(value = "Place an order for a pet", notes = "", response = Order.class, tags={ "store", })
|
||||||
@io.swagger.annotations.ApiResponses(value = {
|
@io.swagger.annotations.ApiResponses(value = {
|
||||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class),
|
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class),
|
||||||
|
|
||||||
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid Order", response = Order.class) })
|
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid Order", response = Order.class) })
|
||||||
public Response placeOrder(@ApiParam(value = "order placed for purchasing the pet" ) Order body
|
public Response placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true) Order body
|
||||||
,@Context SecurityContext securityContext)
|
,@Context SecurityContext securityContext)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
return delegate.placeOrder(body,securityContext);
|
return delegate.placeOrder(body,securityContext);
|
||||||
|
@ -15,11 +15,11 @@ import java.io.InputStream;
|
|||||||
|
|
||||||
import javax.ws.rs.core.Response;
|
import javax.ws.rs.core.Response;
|
||||||
import javax.ws.rs.core.SecurityContext;
|
import javax.ws.rs.core.SecurityContext;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
public abstract class StoreApiService {
|
public abstract class StoreApiService {
|
||||||
public abstract Response deleteOrder(String orderId,SecurityContext securityContext) throws NotFoundException;
|
public abstract Response deleteOrder( @Min(1)String orderId,SecurityContext securityContext) throws NotFoundException;
|
||||||
public abstract Response getInventory(SecurityContext securityContext) throws NotFoundException;
|
public abstract Response getInventory(SecurityContext securityContext) throws NotFoundException;
|
||||||
public abstract Response getOrderById(String orderId,SecurityContext securityContext) throws NotFoundException;
|
public abstract Response getOrderById( @Min(1) @Max(5)Long orderId,SecurityContext securityContext) throws NotFoundException;
|
||||||
public abstract Response placeOrder(Order body,SecurityContext securityContext) throws NotFoundException;
|
public abstract Response placeOrder(Order body,SecurityContext securityContext) throws NotFoundException;
|
||||||
}
|
}
|
||||||
|
@ -35,11 +35,11 @@ public class UserApi {
|
|||||||
@POST
|
@POST
|
||||||
|
|
||||||
|
|
||||||
@Produces({ "application/json", "application/xml" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", response = void.class, tags={ "user", })
|
@io.swagger.annotations.ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", response = void.class, tags={ "user", })
|
||||||
@io.swagger.annotations.ApiResponses(value = {
|
@io.swagger.annotations.ApiResponses(value = {
|
||||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = void.class) })
|
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = void.class) })
|
||||||
public Response createUser(@ApiParam(value = "Created user object" ) User body
|
public Response createUser(@ApiParam(value = "Created user object" ,required=true) User body
|
||||||
,@Context SecurityContext securityContext)
|
,@Context SecurityContext securityContext)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
return delegate.createUser(body,securityContext);
|
return delegate.createUser(body,securityContext);
|
||||||
@ -47,11 +47,11 @@ public class UserApi {
|
|||||||
@POST
|
@POST
|
||||||
@Path("/createWithArray")
|
@Path("/createWithArray")
|
||||||
|
|
||||||
@Produces({ "application/json", "application/xml" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = void.class, tags={ "user", })
|
@io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = void.class, tags={ "user", })
|
||||||
@io.swagger.annotations.ApiResponses(value = {
|
@io.swagger.annotations.ApiResponses(value = {
|
||||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = void.class) })
|
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = void.class) })
|
||||||
public Response createUsersWithArrayInput(@ApiParam(value = "List of user object" ) List<User> body
|
public Response createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true) List<User> body
|
||||||
,@Context SecurityContext securityContext)
|
,@Context SecurityContext securityContext)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
return delegate.createUsersWithArrayInput(body,securityContext);
|
return delegate.createUsersWithArrayInput(body,securityContext);
|
||||||
@ -59,11 +59,11 @@ public class UserApi {
|
|||||||
@POST
|
@POST
|
||||||
@Path("/createWithList")
|
@Path("/createWithList")
|
||||||
|
|
||||||
@Produces({ "application/json", "application/xml" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = void.class, tags={ "user", })
|
@io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = void.class, tags={ "user", })
|
||||||
@io.swagger.annotations.ApiResponses(value = {
|
@io.swagger.annotations.ApiResponses(value = {
|
||||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = void.class) })
|
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = void.class) })
|
||||||
public Response createUsersWithListInput(@ApiParam(value = "List of user object" ) List<User> body
|
public Response createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true) List<User> body
|
||||||
,@Context SecurityContext securityContext)
|
,@Context SecurityContext securityContext)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
return delegate.createUsersWithListInput(body,securityContext);
|
return delegate.createUsersWithListInput(body,securityContext);
|
||||||
@ -71,7 +71,7 @@ public class UserApi {
|
|||||||
@DELETE
|
@DELETE
|
||||||
@Path("/{username}")
|
@Path("/{username}")
|
||||||
|
|
||||||
@Produces({ "application/json", "application/xml" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Delete user", notes = "This can only be done by the logged in user.", response = void.class, tags={ "user", })
|
@io.swagger.annotations.ApiOperation(value = "Delete user", notes = "This can only be done by the logged in user.", response = void.class, tags={ "user", })
|
||||||
@io.swagger.annotations.ApiResponses(value = {
|
@io.swagger.annotations.ApiResponses(value = {
|
||||||
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = void.class),
|
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = void.class),
|
||||||
@ -85,7 +85,7 @@ public class UserApi {
|
|||||||
@GET
|
@GET
|
||||||
@Path("/{username}")
|
@Path("/{username}")
|
||||||
|
|
||||||
@Produces({ "application/json", "application/xml" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Get user by user name", notes = "", response = User.class, tags={ "user", })
|
@io.swagger.annotations.ApiOperation(value = "Get user by user name", notes = "", response = User.class, tags={ "user", })
|
||||||
@io.swagger.annotations.ApiResponses(value = {
|
@io.swagger.annotations.ApiResponses(value = {
|
||||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = User.class),
|
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = User.class),
|
||||||
@ -101,14 +101,14 @@ public class UserApi {
|
|||||||
@GET
|
@GET
|
||||||
@Path("/login")
|
@Path("/login")
|
||||||
|
|
||||||
@Produces({ "application/json", "application/xml" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Logs user into the system", notes = "", response = String.class, tags={ "user", })
|
@io.swagger.annotations.ApiOperation(value = "Logs user into the system", notes = "", response = String.class, tags={ "user", })
|
||||||
@io.swagger.annotations.ApiResponses(value = {
|
@io.swagger.annotations.ApiResponses(value = {
|
||||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = String.class),
|
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = String.class),
|
||||||
|
|
||||||
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username/password supplied", response = String.class) })
|
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username/password supplied", response = String.class) })
|
||||||
public Response loginUser(@ApiParam(value = "The user name for login") @QueryParam("username") String username
|
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") @QueryParam("password") String password
|
,@ApiParam(value = "The password for login in clear text",required=true) @QueryParam("password") String password
|
||||||
,@Context SecurityContext securityContext)
|
,@Context SecurityContext securityContext)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
return delegate.loginUser(username,password,securityContext);
|
return delegate.loginUser(username,password,securityContext);
|
||||||
@ -116,7 +116,7 @@ public class UserApi {
|
|||||||
@GET
|
@GET
|
||||||
@Path("/logout")
|
@Path("/logout")
|
||||||
|
|
||||||
@Produces({ "application/json", "application/xml" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Logs out current logged in user session", notes = "", response = void.class, tags={ "user", })
|
@io.swagger.annotations.ApiOperation(value = "Logs out current logged in user session", notes = "", response = void.class, tags={ "user", })
|
||||||
@io.swagger.annotations.ApiResponses(value = {
|
@io.swagger.annotations.ApiResponses(value = {
|
||||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = void.class) })
|
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = void.class) })
|
||||||
@ -127,14 +127,14 @@ public class UserApi {
|
|||||||
@PUT
|
@PUT
|
||||||
@Path("/{username}")
|
@Path("/{username}")
|
||||||
|
|
||||||
@Produces({ "application/json", "application/xml" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
@io.swagger.annotations.ApiOperation(value = "Updated user", notes = "This can only be done by the logged in user.", response = void.class, tags={ "user", })
|
@io.swagger.annotations.ApiOperation(value = "Updated user", notes = "This can only be done by the logged in user.", response = void.class, tags={ "user", })
|
||||||
@io.swagger.annotations.ApiResponses(value = {
|
@io.swagger.annotations.ApiResponses(value = {
|
||||||
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid user supplied", response = void.class),
|
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid user supplied", response = void.class),
|
||||||
|
|
||||||
@io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = void.class) })
|
@io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = void.class) })
|
||||||
public Response updateUser(@ApiParam(value = "name that need to be deleted",required=true) @PathParam("username") String username
|
public Response updateUser(@ApiParam(value = "name that need to be deleted",required=true) @PathParam("username") String username
|
||||||
,@ApiParam(value = "Updated user object" ) User body
|
,@ApiParam(value = "Updated user object" ,required=true) User body
|
||||||
,@Context SecurityContext securityContext)
|
,@Context SecurityContext securityContext)
|
||||||
throws NotFoundException {
|
throws NotFoundException {
|
||||||
return delegate.updateUser(username,body,securityContext);
|
return delegate.updateUser(username,body,securityContext);
|
||||||
|
@ -15,7 +15,7 @@ import java.io.InputStream;
|
|||||||
|
|
||||||
import javax.ws.rs.core.Response;
|
import javax.ws.rs.core.Response;
|
||||||
import javax.ws.rs.core.SecurityContext;
|
import javax.ws.rs.core.SecurityContext;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
public abstract class UserApiService {
|
public abstract class UserApiService {
|
||||||
public abstract Response createUser(User body,SecurityContext securityContext) throws NotFoundException;
|
public abstract Response createUser(User body,SecurityContext securityContext) throws NotFoundException;
|
||||||
@ -23,7 +23,7 @@ public abstract class UserApiService {
|
|||||||
public abstract Response createUsersWithListInput(List<User> body,SecurityContext securityContext) throws NotFoundException;
|
public abstract Response createUsersWithListInput(List<User> body,SecurityContext securityContext) throws NotFoundException;
|
||||||
public abstract Response deleteUser(String username,SecurityContext securityContext) throws NotFoundException;
|
public abstract Response deleteUser(String username,SecurityContext securityContext) throws NotFoundException;
|
||||||
public abstract Response getUserByName(String username,SecurityContext securityContext) throws NotFoundException;
|
public abstract Response getUserByName(String username,SecurityContext securityContext) throws NotFoundException;
|
||||||
public abstract Response loginUser( String username, String password,SecurityContext securityContext) throws NotFoundException;
|
public abstract Response loginUser( @NotNull String username, @NotNull String password,SecurityContext securityContext) throws NotFoundException;
|
||||||
public abstract Response logoutUser(SecurityContext securityContext) throws NotFoundException;
|
public abstract Response logoutUser(SecurityContext securityContext) throws NotFoundException;
|
||||||
public abstract Response updateUser(String username,User body,SecurityContext securityContext) throws NotFoundException;
|
public abstract Response updateUser(String username,User body,SecurityContext securityContext) throws NotFoundException;
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,7 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* AdditionalPropertiesClass
|
* AdditionalPropertiesClass
|
||||||
|
@ -16,8 +16,11 @@ package io.swagger.model;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Animal
|
* Animal
|
||||||
@ -40,6 +43,7 @@ public class Animal {
|
|||||||
* @return className
|
* @return className
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(required = true, value = "")
|
@ApiModelProperty(required = true, value = "")
|
||||||
|
@NotNull
|
||||||
public String getClassName() {
|
public String getClassName() {
|
||||||
return className;
|
return className;
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,7 @@ import java.util.Objects;
|
|||||||
import io.swagger.model.Animal;
|
import io.swagger.model.Animal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* AnimalFarm
|
* AnimalFarm
|
||||||
|
@ -21,6 +21,7 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ArrayOfArrayOfNumberOnly
|
* ArrayOfArrayOfNumberOnly
|
||||||
|
@ -21,6 +21,7 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ArrayOfNumberOnly
|
* ArrayOfNumberOnly
|
||||||
|
@ -21,6 +21,7 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import io.swagger.model.ReadOnlyFirst;
|
import io.swagger.model.ReadOnlyFirst;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ArrayTest
|
* ArrayTest
|
||||||
|
@ -19,6 +19,7 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import io.swagger.model.Animal;
|
import io.swagger.model.Animal;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cat
|
* Cat
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Swagger Petstore
|
* Swagger Petstore
|
||||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0
|
||||||
* Contact: apiteam@wordnik.com
|
* Contact: apiteam@swagger.io
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by the swagger code generator program.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
@ -0,0 +1,90 @@
|
|||||||
|
/*
|
||||||
|
* Swagger Petstore
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 1.0.0
|
||||||
|
* Contact: apiteam@swagger.io
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package io.swagger.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model for testing model with \"_class\" property
|
||||||
|
*/
|
||||||
|
@ApiModel(description = "Model for testing model with \"_class\" property")
|
||||||
|
|
||||||
|
public class ClassModel {
|
||||||
|
@JsonProperty("_class")
|
||||||
|
private String propertyClass = null;
|
||||||
|
|
||||||
|
public ClassModel propertyClass(String propertyClass) {
|
||||||
|
this.propertyClass = propertyClass;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get propertyClass
|
||||||
|
* @return propertyClass
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public String getPropertyClass() {
|
||||||
|
return propertyClass;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPropertyClass(String propertyClass) {
|
||||||
|
this.propertyClass = propertyClass;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(java.lang.Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
ClassModel classModel = (ClassModel) o;
|
||||||
|
return Objects.equals(this.propertyClass, classModel.propertyClass);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(propertyClass);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class ClassModel {\n");
|
||||||
|
|
||||||
|
sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(java.lang.Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -18,6 +18,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Client
|
* Client
|
||||||
|
@ -19,6 +19,7 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import io.swagger.model.Animal;
|
import io.swagger.model.Animal;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dog
|
* Dog
|
||||||
|
@ -21,6 +21,7 @@ import io.swagger.annotations.ApiModel;
|
|||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* EnumArrays
|
* EnumArrays
|
||||||
|
@ -15,6 +15,7 @@ package io.swagger.model;
|
|||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import com.fasterxml.jackson.annotation.JsonValue;
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
|
||||||
|
@ -19,6 +19,8 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
|||||||
import com.fasterxml.jackson.annotation.JsonValue;
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import io.swagger.model.OuterEnum;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* EnumTest
|
* EnumTest
|
||||||
@ -127,6 +129,9 @@ public class EnumTest {
|
|||||||
@JsonProperty("enum_number")
|
@JsonProperty("enum_number")
|
||||||
private EnumNumberEnum enumNumber = null;
|
private EnumNumberEnum enumNumber = null;
|
||||||
|
|
||||||
|
@JsonProperty("outerEnum")
|
||||||
|
private OuterEnum outerEnum = null;
|
||||||
|
|
||||||
public EnumTest enumString(EnumStringEnum enumString) {
|
public EnumTest enumString(EnumStringEnum enumString) {
|
||||||
this.enumString = enumString;
|
this.enumString = enumString;
|
||||||
return this;
|
return this;
|
||||||
@ -181,6 +186,24 @@ public class EnumTest {
|
|||||||
this.enumNumber = enumNumber;
|
this.enumNumber = enumNumber;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public EnumTest outerEnum(OuterEnum outerEnum) {
|
||||||
|
this.outerEnum = outerEnum;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get outerEnum
|
||||||
|
* @return outerEnum
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public OuterEnum getOuterEnum() {
|
||||||
|
return outerEnum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOuterEnum(OuterEnum outerEnum) {
|
||||||
|
this.outerEnum = outerEnum;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(java.lang.Object o) {
|
public boolean equals(java.lang.Object o) {
|
||||||
@ -193,12 +216,13 @@ public class EnumTest {
|
|||||||
EnumTest enumTest = (EnumTest) o;
|
EnumTest enumTest = (EnumTest) o;
|
||||||
return Objects.equals(this.enumString, enumTest.enumString) &&
|
return Objects.equals(this.enumString, enumTest.enumString) &&
|
||||||
Objects.equals(this.enumInteger, enumTest.enumInteger) &&
|
Objects.equals(this.enumInteger, enumTest.enumInteger) &&
|
||||||
Objects.equals(this.enumNumber, enumTest.enumNumber);
|
Objects.equals(this.enumNumber, enumTest.enumNumber) &&
|
||||||
|
Objects.equals(this.outerEnum, enumTest.outerEnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(enumString, enumInteger, enumNumber);
|
return Objects.hash(enumString, enumInteger, enumNumber, outerEnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -210,6 +234,7 @@ public class EnumTest {
|
|||||||
sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n");
|
sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n");
|
||||||
sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n");
|
sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n");
|
||||||
sb.append(" enumNumber: ").append(toIndentedString(enumNumber)).append("\n");
|
sb.append(" enumNumber: ").append(toIndentedString(enumNumber)).append("\n");
|
||||||
|
sb.append(" outerEnum: ").append(toIndentedString(outerEnum)).append("\n");
|
||||||
sb.append("}");
|
sb.append("}");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,7 @@ import io.swagger.annotations.ApiModel;
|
|||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* FormatTest
|
* FormatTest
|
||||||
@ -72,11 +73,13 @@ public class FormatTest {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get integer
|
* Get integer
|
||||||
* minimum: 10.0
|
* minimum: 10
|
||||||
* maximum: 100.0
|
* maximum: 100
|
||||||
* @return integer
|
* @return integer
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
// @Min(10)
|
||||||
|
// @Max(100)
|
||||||
public Integer getInteger() {
|
public Integer getInteger() {
|
||||||
return integer;
|
return integer;
|
||||||
}
|
}
|
||||||
@ -92,11 +95,13 @@ public class FormatTest {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get int32
|
* Get int32
|
||||||
* minimum: 20.0
|
* minimum: 20
|
||||||
* maximum: 200.0
|
* maximum: 200
|
||||||
* @return int32
|
* @return int32
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
// @Min(20)
|
||||||
|
// @Max(200)
|
||||||
public Integer getInt32() {
|
public Integer getInt32() {
|
||||||
return int32;
|
return int32;
|
||||||
}
|
}
|
||||||
@ -135,6 +140,9 @@ public class FormatTest {
|
|||||||
* @return number
|
* @return number
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(required = true, value = "")
|
@ApiModelProperty(required = true, value = "")
|
||||||
|
@NotNull
|
||||||
|
// @Min(32.1)
|
||||||
|
// @Max(543.2)
|
||||||
public BigDecimal getNumber() {
|
public BigDecimal getNumber() {
|
||||||
return number;
|
return number;
|
||||||
}
|
}
|
||||||
@ -155,6 +163,8 @@ public class FormatTest {
|
|||||||
* @return _float
|
* @return _float
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
// @Min(54.3)
|
||||||
|
// @Max(987.6)
|
||||||
public Float getFloat() {
|
public Float getFloat() {
|
||||||
return _float;
|
return _float;
|
||||||
}
|
}
|
||||||
@ -175,6 +185,8 @@ public class FormatTest {
|
|||||||
* @return _double
|
* @return _double
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
// @Min(67.8)
|
||||||
|
// @Max(123.4)
|
||||||
public Double getDouble() {
|
public Double getDouble() {
|
||||||
return _double;
|
return _double;
|
||||||
}
|
}
|
||||||
@ -193,6 +205,7 @@ public class FormatTest {
|
|||||||
* @return string
|
* @return string
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
@Pattern(regexp="/[a-z]/i")
|
||||||
public String getString() {
|
public String getString() {
|
||||||
return string;
|
return string;
|
||||||
}
|
}
|
||||||
@ -211,6 +224,7 @@ public class FormatTest {
|
|||||||
* @return _byte
|
* @return _byte
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(required = true, value = "")
|
@ApiModelProperty(required = true, value = "")
|
||||||
|
@NotNull
|
||||||
public byte[] getByte() {
|
public byte[] getByte() {
|
||||||
return _byte;
|
return _byte;
|
||||||
}
|
}
|
||||||
@ -247,6 +261,7 @@ public class FormatTest {
|
|||||||
* @return date
|
* @return date
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(required = true, value = "")
|
@ApiModelProperty(required = true, value = "")
|
||||||
|
@NotNull
|
||||||
public Date getDate() {
|
public Date getDate() {
|
||||||
return date;
|
return date;
|
||||||
}
|
}
|
||||||
@ -301,6 +316,8 @@ public class FormatTest {
|
|||||||
* @return password
|
* @return password
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(required = true, value = "")
|
@ApiModelProperty(required = true, value = "")
|
||||||
|
@NotNull
|
||||||
|
@Size(min=10,max=64)
|
||||||
public String getPassword() {
|
public String getPassword() {
|
||||||
return password;
|
return password;
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* HasOnlyReadOnly
|
* HasOnlyReadOnly
|
||||||
|
@ -22,6 +22,7 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MapTest
|
* MapTest
|
||||||
|
@ -23,6 +23,7 @@ import java.util.Date;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MixedPropertiesAndAdditionalPropertiesClass
|
* MixedPropertiesAndAdditionalPropertiesClass
|
||||||
|
@ -18,6 +18,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Model for testing model name starting with number
|
* Model for testing model name starting with number
|
||||||
|
@ -18,6 +18,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ModelApiResponse
|
* ModelApiResponse
|
||||||
|
@ -18,6 +18,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Model for testing reserved words
|
* Model for testing reserved words
|
||||||
|
@ -18,6 +18,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Model for testing model name same as property name
|
* Model for testing model name same as property name
|
||||||
@ -47,6 +48,7 @@ public class Name {
|
|||||||
* @return name
|
* @return name
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(required = true, value = "")
|
@ApiModelProperty(required = true, value = "")
|
||||||
|
@NotNull
|
||||||
public Integer getName() {
|
public Integer getName() {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
@ -19,6 +19,7 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* NumberOnly
|
* NumberOnly
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Swagger Petstore
|
* Swagger Petstore
|
||||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0
|
||||||
* Contact: apiteam@wordnik.com
|
* Contact: apiteam@swagger.io
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by the swagger code generator program.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
@ -76,7 +76,7 @@ public class Order {
|
|||||||
private StatusEnum status = null;
|
private StatusEnum status = null;
|
||||||
|
|
||||||
@JsonProperty("complete")
|
@JsonProperty("complete")
|
||||||
private Boolean complete = null;
|
private Boolean complete = false;
|
||||||
|
|
||||||
public Order id(Long id) {
|
public Order id(Long id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
|
@ -0,0 +1,54 @@
|
|||||||
|
/*
|
||||||
|
* Swagger Petstore
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 1.0.0
|
||||||
|
* Contact: apiteam@swagger.io
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package io.swagger.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets or Sets OuterEnum
|
||||||
|
*/
|
||||||
|
public enum OuterEnum {
|
||||||
|
|
||||||
|
PLACED("placed"),
|
||||||
|
|
||||||
|
APPROVED("approved"),
|
||||||
|
|
||||||
|
DELIVERED("delivered");
|
||||||
|
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
OuterEnum(String value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return String.valueOf(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonCreator
|
||||||
|
public static OuterEnum fromValue(String text) {
|
||||||
|
for (OuterEnum b : OuterEnum.values()) {
|
||||||
|
if (String.valueOf(b.value).equals(text)) {
|
||||||
|
return b;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Swagger Petstore
|
* Swagger Petstore
|
||||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0
|
||||||
* Contact: apiteam@wordnik.com
|
* Contact: apiteam@swagger.io
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by the swagger code generator program.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
@ -18,6 +18,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ReadOnlyFirst
|
* ReadOnlyFirst
|
||||||
|
@ -18,6 +18,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SpecialModelName
|
* SpecialModelName
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Swagger Petstore
|
* Swagger Petstore
|
||||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0
|
||||||
* Contact: apiteam@wordnik.com
|
* Contact: apiteam@swagger.io
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by the swagger code generator program.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Swagger Petstore
|
* Swagger Petstore
|
||||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0
|
||||||
* Contact: apiteam@wordnik.com
|
* Contact: apiteam@swagger.io
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by the swagger code generator program.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
@ -16,7 +16,7 @@ import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
|
|||||||
|
|
||||||
import javax.ws.rs.core.Response;
|
import javax.ws.rs.core.Response;
|
||||||
import javax.ws.rs.core.SecurityContext;
|
import javax.ws.rs.core.SecurityContext;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
public class FakeApiServiceImpl extends FakeApiService {
|
public class FakeApiServiceImpl extends FakeApiService {
|
||||||
@Override
|
@Override
|
||||||
@ -30,7 +30,7 @@ public class FakeApiServiceImpl extends FakeApiService {
|
|||||||
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public Response testEnumParameters(List<String> enumFormStringArray, String enumFormString, List<String> enumHeaderStringArray, String enumHeaderString, List<String> enumQueryStringArray, String enumQueryString, BigDecimal enumQueryInteger, Double enumQueryDouble, SecurityContext securityContext) throws NotFoundException {
|
public Response testEnumParameters(List<String> enumFormStringArray, String enumFormString, List<String> enumHeaderStringArray, String enumHeaderString, List<String> enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, SecurityContext securityContext) throws NotFoundException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@ import io.swagger.api.*;
|
|||||||
import io.swagger.model.*;
|
import io.swagger.model.*;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import io.swagger.model.ModelApiResponse;
|
||||||
import io.swagger.model.Pet;
|
import io.swagger.model.Pet;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -15,7 +16,7 @@ import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
|
|||||||
|
|
||||||
import javax.ws.rs.core.Response;
|
import javax.ws.rs.core.Response;
|
||||||
import javax.ws.rs.core.SecurityContext;
|
import javax.ws.rs.core.SecurityContext;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
public class PetApiServiceImpl extends PetApiService {
|
public class PetApiServiceImpl extends PetApiService {
|
||||||
@Override
|
@Override
|
||||||
@ -29,12 +30,12 @@ public class PetApiServiceImpl extends PetApiService {
|
|||||||
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public Response findPetsByStatus( List<String> status, SecurityContext securityContext) throws NotFoundException {
|
public Response findPetsByStatus( @NotNull List<String> status, SecurityContext securityContext) throws NotFoundException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public Response findPetsByTags( List<String> tags, SecurityContext securityContext) throws NotFoundException {
|
public Response findPetsByTags( @NotNull List<String> tags, SecurityContext securityContext) throws NotFoundException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
||||||
}
|
}
|
||||||
@ -49,7 +50,7 @@ public class PetApiServiceImpl extends PetApiService {
|
|||||||
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public Response updatePetWithForm(String petId, String name, String status, SecurityContext securityContext) throws NotFoundException {
|
public Response updatePetWithForm(Long petId, String name, String status, SecurityContext securityContext) throws NotFoundException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
||||||
}
|
}
|
||||||
|
@ -15,11 +15,11 @@ import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
|
|||||||
|
|
||||||
import javax.ws.rs.core.Response;
|
import javax.ws.rs.core.Response;
|
||||||
import javax.ws.rs.core.SecurityContext;
|
import javax.ws.rs.core.SecurityContext;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
public class StoreApiServiceImpl extends StoreApiService {
|
public class StoreApiServiceImpl extends StoreApiService {
|
||||||
@Override
|
@Override
|
||||||
public Response deleteOrder(String orderId, SecurityContext securityContext) throws NotFoundException {
|
public Response deleteOrder( @Min(1)String orderId, SecurityContext securityContext) throws NotFoundException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
||||||
}
|
}
|
||||||
@ -29,7 +29,7 @@ public class StoreApiServiceImpl extends StoreApiService {
|
|||||||
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public Response getOrderById(String orderId, SecurityContext securityContext) throws NotFoundException {
|
public Response getOrderById( @Min(1) @Max(5)Long orderId, SecurityContext securityContext) throws NotFoundException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
|
|||||||
|
|
||||||
import javax.ws.rs.core.Response;
|
import javax.ws.rs.core.Response;
|
||||||
import javax.ws.rs.core.SecurityContext;
|
import javax.ws.rs.core.SecurityContext;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
public class UserApiServiceImpl extends UserApiService {
|
public class UserApiServiceImpl extends UserApiService {
|
||||||
@Override
|
@Override
|
||||||
@ -44,7 +44,7 @@ public class UserApiServiceImpl extends UserApiService {
|
|||||||
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public Response loginUser( String username, String password, SecurityContext securityContext) throws NotFoundException {
|
public Response loginUser( @NotNull String username, @NotNull String password, SecurityContext securityContext) throws NotFoundException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user