[Jaxrs-spec] fix usage of Jersey templates in shellscript (#4722)

* remove jersey templates #4720

* regenerate sample with jaxrs-spec templates #4720
This commit is contained in:
jfiala
2017-02-07 17:41:36 +01:00
committed by wing328
parent 73cfc8459f
commit e9823a81a5
37 changed files with 984 additions and 1925 deletions

View File

@@ -26,7 +26,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="$@ generate -t modules/swagger-codegen/src/main/resources/JavaJaxRS -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l jaxrs-spec -o samples/server/petstore/jaxrs-spec
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l jaxrs-spec -o samples/server/petstore/jaxrs-spec
-DhideGenerationTimestamp=true"
java $JAVA_OPTS -jar $executable $ags

View File

@@ -1,98 +1,61 @@
package io.swagger.api;
import io.swagger.model.*;
import io.swagger.api.FakeApiService;
import io.swagger.api.factories.FakeApiServiceFactory;
import io.swagger.annotations.ApiParam;
import io.swagger.jaxrs.*;
import java.math.BigDecimal;
import io.swagger.model.Client;
import org.joda.time.LocalDate;
import java.util.List;
import io.swagger.api.NotFoundException;
import java.io.InputStream;
import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
import org.glassfish.jersey.media.multipart.FormDataParam;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext;
import javax.ws.rs.*;
import javax.ws.rs.core.Response;
import io.swagger.annotations.*;
import java.util.List;
import javax.validation.constraints.*;
@Path("/fake")
@Api(description = "the fake API")
@io.swagger.annotations.Api(description = "the fake API")
public class FakeApi {
private final FakeApiService delegate = FakeApiServiceFactory.getFakeApi();
@PATCH
@Consumes({ "application/json" })
@Produces({ "application/json" })
@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.ApiResponse(code = 200, message = "successful operation", response = Client.class) })
public Response testClientModel(@ApiParam(value = "client model" ,required=true) Client body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.testClientModel(body,securityContext);
@ApiOperation(value = "To test \"client\" model", notes = "To test \"client\" model", response = Client.class, tags={ "fake", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Client.class) })
public Response testClientModel(Client body) {
return Response.ok().entity("magic!").build();
}
@POST
@Consumes({ "application/xml; charset=utf-8", "application/json; charset=utf-8" })
@Produces({ "application/xml; charset=utf-8", "application/json; charset=utf-8" })
@io.swagger.annotations.ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", response = void.class, authorizations = {
@io.swagger.annotations.Authorization(value = "http_basic_test")
}, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = void.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = void.class) })
public Response testEndpointParameters(@ApiParam(value = "None", required=true) @FormParam("number") BigDecimal number
,@ApiParam(value = "None", required=true) @FormParam("double") Double _double
,@ApiParam(value = "None", required=true) @FormParam("pattern_without_delimiter") String patternWithoutDelimiter
,@ApiParam(value = "None", required=true) @FormParam("byte") byte[] _byte
,@ApiParam(value = "None") @FormParam("integer") Integer integer
,@ApiParam(value = "None") @FormParam("int32") Integer int32
,@ApiParam(value = "None") @FormParam("int64") Long int64
,@ApiParam(value = "None") @FormParam("float") Float _float
,@ApiParam(value = "None") @FormParam("string") String string
,@ApiParam(value = "None") @FormParam("binary") byte[] binary
,@ApiParam(value = "None") @FormParam("date") LocalDate date
,@ApiParam(value = "None") @FormParam("dateTime") javax.xml.datatype.XMLGregorianCalendar dateTime
,@ApiParam(value = "None") @FormParam("password") String password
,@ApiParam(value = "None") @FormParam("callback") String paramCallback
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.testEndpointParameters(number,_double,patternWithoutDelimiter,_byte,integer,int32,int64,_float,string,binary,date,dateTime,password,paramCallback,securityContext);
@Consumes({ "application/xml; charset=utf-8", "application/json; charset=utf-8" })
@Produces({ "application/xml; charset=utf-8", "application/json; charset=utf-8" })
@ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", response = void.class, authorizations = {
@Authorization(value = "http_basic_test")
}, tags={ "fake", })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid username supplied", response = void.class),
@ApiResponse(code = 404, message = "User not found", response = void.class) })
public Response testEndpointParameters(@FormParam(value = "number") BigDecimal number,@FormParam(value = "_double") Double _double,@FormParam(value = "patternWithoutDelimiter") String patternWithoutDelimiter,@FormParam(value = "_byte") byte[] _byte,@FormParam(value = "integer") Integer integer,@FormParam(value = "int32") Integer int32,@FormParam(value = "int64") Long int64,@FormParam(value = "_float") Float _float,@FormParam(value = "string") String string,@FormParam(value = "binary") byte[] binary,@FormParam(value = "date") LocalDate date,@FormParam(value = "dateTime") javax.xml.datatype.XMLGregorianCalendar dateTime,@FormParam(value = "password") String password,@FormParam(value = "paramCallback") String paramCallback) {
return Response.ok().entity("magic!").build();
}
@GET
@Consumes({ "*/*" })
@Produces({ "*/*" })
@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.ApiResponse(code = 400, message = "Invalid request", response = void.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "Not found", response = void.class) })
public Response testEnumParameters(@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $") @FormParam("enum_form_string_array") List<String> enumFormStringArray
,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString
,@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $")@HeaderParam("enum_header_string_array") List<String> enumHeaderStringArray
,@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)", 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") Integer enumQueryInteger
,@ApiParam(value = "Query parameter enum test (double)") @FormParam("enum_query_double") Double enumQueryDouble
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.testEnumParameters(enumFormStringArray,enumFormString,enumHeaderStringArray,enumHeaderString,enumQueryStringArray,enumQueryString,enumQueryInteger,enumQueryDouble,securityContext);
@ApiOperation(value = "To test enum parameters", notes = "To test enum parameters", response = void.class, tags={ "fake" })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid request", response = void.class),
@ApiResponse(code = 404, message = "Not found", response = void.class) })
public Response testEnumParameters(@FormParam(value = "enumFormStringArray") List<String> enumFormStringArray,@FormParam(value = "enumFormString") String enumFormString,@HeaderParam("enum_header_string_array") List<String> enumHeaderStringArray,@HeaderParam("enum_header_string") String enumHeaderString,@QueryParam("enum_query_string_array") List<String> enumQueryStringArray,@QueryParam("enum_query_string") String enumQueryString,@QueryParam("enum_query_integer") Integer enumQueryInteger,@FormParam(value = "enumQueryDouble") Double enumQueryDouble) {
return Response.ok().entity("magic!").build();
}
}

View File

@@ -1,188 +1,156 @@
package io.swagger.api;
import io.swagger.model.*;
import io.swagger.api.PetApiService;
import io.swagger.api.factories.PetApiServiceFactory;
import io.swagger.annotations.ApiParam;
import io.swagger.jaxrs.*;
import java.io.File;
import io.swagger.model.ModelApiResponse;
import io.swagger.model.Pet;
import java.util.List;
import io.swagger.api.NotFoundException;
import java.io.InputStream;
import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
import org.glassfish.jersey.media.multipart.FormDataParam;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext;
import javax.ws.rs.*;
import javax.ws.rs.core.Response;
import io.swagger.annotations.*;
import java.util.List;
import javax.validation.constraints.*;
@Path("/pet")
@Api(description = "the pet API")
@io.swagger.annotations.Api(description = "the pet API")
public class PetApi {
private final PetApiService delegate = PetApiServiceFactory.getPetApi();
@POST
@Consumes({ "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.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")
@ApiOperation(value = "Add a new pet to the store", notes = "", response = void.class, 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", })
@io.swagger.annotations.ApiResponses(value = {
@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" ,required=true) Pet body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.addPet(body,securityContext);
}, tags={ "pet", })
@ApiResponses(value = {
@ApiResponse(code = 405, message = "Invalid input", response = void.class) })
public Response addPet(Pet body) {
return Response.ok().entity("magic!").build();
}
@DELETE
@Path("/{petId}")
@Produces({ "application/xml", "application/json" })
@io.swagger.annotations.ApiOperation(value = "Deletes a pet", notes = "", response = void.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")
@ApiOperation(value = "Deletes a pet", notes = "", response = void.class, 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", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid pet value", response = void.class) })
public Response deletePet(@ApiParam(value = "Pet id to delete",required=true) @PathParam("petId") Long petId
,@ApiParam(value = "" )@HeaderParam("api_key") String apiKey
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.deletePet(petId,apiKey,securityContext);
}, tags={ "pet", })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid pet value", response = void.class) })
public Response deletePet(@PathParam("petId") @ApiParam("Pet id to delete") Long petId,@HeaderParam("api_key") String apiKey) {
return Response.ok().entity("magic!").build();
}
@GET
@Path("/findByStatus")
@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.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")
@ApiOperation(value = "Finds Pets by status", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", 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", })
@io.swagger.annotations.ApiResponses(value = {
@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") })
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)
throws NotFoundException {
return delegate.findPetsByStatus(status,securityContext);
}, tags={ "pet", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
@ApiResponse(code = 400, message = "Invalid status value", response = Pet.class, responseContainer = "List") })
public Response findPetsByStatus(@QueryParam("status") @NotNull List<String> status) {
return Response.ok().entity("magic!").build();
}
@GET
@Path("/findByTags")
@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.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")
@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 = {
@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", })
@io.swagger.annotations.ApiResponses(value = {
@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") })
public Response findPetsByTags(@ApiParam(value = "Tags to filter by",required=true) @QueryParam("tags") List<String> tags
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.findPetsByTags(tags,securityContext);
}, tags={ "pet", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
@ApiResponse(code = 400, message = "Invalid tag value", response = Pet.class, responseContainer = "List") })
public Response findPetsByTags(@QueryParam("tags") @NotNull List<String> tags) {
return Response.ok().entity("magic!").build();
}
@GET
@Path("/{petId}")
@Produces({ "application/xml", "application/json" })
@io.swagger.annotations.ApiOperation(value = "Find pet by ID", notes = "Returns a single pet", response = Pet.class, authorizations = {
@io.swagger.annotations.Authorization(value = "api_key")
}, tags={ "pet", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", 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) })
public Response getPetById(@ApiParam(value = "ID of pet to return",required=true) @PathParam("petId") Long petId
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.getPetById(petId,securityContext);
@ApiOperation(value = "Find pet by ID", notes = "Returns a single pet", response = Pet.class, authorizations = {
@Authorization(value = "api_key")
}, tags={ "pet", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Pet.class),
@ApiResponse(code = 400, message = "Invalid ID supplied", response = Pet.class),
@ApiResponse(code = 404, message = "Pet not found", response = Pet.class) })
public Response getPetById(@PathParam("petId") @ApiParam("ID of pet to return") Long petId) {
return Response.ok().entity("magic!").build();
}
@PUT
@Consumes({ "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.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")
@ApiOperation(value = "Update an existing pet", notes = "", response = void.class, 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", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", 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) })
public Response updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.updatePet(body,securityContext);
}, tags={ "pet", })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid ID supplied", response = void.class),
@ApiResponse(code = 404, message = "Pet not found", response = void.class),
@ApiResponse(code = 405, message = "Validation exception", response = void.class) })
public Response updatePet(Pet body) {
return Response.ok().entity("magic!").build();
}
@POST
@Path("/{petId}")
@Consumes({ "application/x-www-form-urlencoded" })
@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.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")
@ApiOperation(value = "Updates a pet in the store with form data", notes = "", response = void.class, 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", })
@io.swagger.annotations.ApiResponses(value = {
@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") Long petId
,@ApiParam(value = "Updated name of the pet") @FormParam("name") String name
,@ApiParam(value = "Updated status of the pet") @FormParam("status") String status
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.updatePetWithForm(petId,name,status,securityContext);
}, tags={ "pet", })
@ApiResponses(value = {
@ApiResponse(code = 405, message = "Invalid input", response = void.class) })
public Response updatePetWithForm(@PathParam("petId") @ApiParam("ID of pet that needs to be updated") Long petId,@FormParam(value = "name") String name,@FormParam(value = "status") String status) {
return Response.ok().entity("magic!").build();
}
@POST
@Path("/{petId}/uploadImage")
@Consumes({ "multipart/form-data" })
@Produces({ "application/json" })
@io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.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")
@ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, 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", })
@io.swagger.annotations.ApiResponses(value = {
@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
,@ApiParam(value = "Additional data to pass to server")@FormDataParam("additionalMetadata") String additionalMetadata
,
@FormDataParam("file") InputStream fileInputStream,
@FormDataParam("file") FormDataContentDisposition fileDetail
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.uploadFile(petId,additionalMetadata,fileInputStream, fileDetail,securityContext);
}, tags={ "pet" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
public Response uploadFile(@PathParam("petId") @ApiParam("ID of pet to update") Long petId,@FormParam(value = "additionalMetadata") String additionalMetadata, @FormParam(value = "file") InputStream fileInputStream,
@FormParam(value = "file") Attachment fileDetail) {
return Response.ok().entity("magic!").build();
}
}

View File

@@ -1,92 +1,73 @@
package io.swagger.api;
import io.swagger.model.*;
import io.swagger.api.StoreApiService;
import io.swagger.api.factories.StoreApiServiceFactory;
import io.swagger.annotations.ApiParam;
import io.swagger.jaxrs.*;
import java.util.Map;
import io.swagger.model.Order;
import java.util.List;
import io.swagger.api.NotFoundException;
import java.io.InputStream;
import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
import org.glassfish.jersey.media.multipart.FormDataParam;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext;
import javax.ws.rs.*;
import javax.ws.rs.core.Response;
import io.swagger.annotations.*;
import java.util.List;
import javax.validation.constraints.*;
@Path("/store")
@Api(description = "the store API")
@io.swagger.annotations.Api(description = "the store API")
public class StoreApi {
private final StoreApiService delegate = StoreApiServiceFactory.getStoreApi();
@DELETE
@Path("/order/{orderId}")
@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.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = void.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = void.class) })
public Response deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true) @PathParam("orderId") String orderId
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.deleteOrder(orderId,securityContext);
@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", })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid ID supplied", response = void.class),
@ApiResponse(code = 404, message = "Order not found", response = void.class) })
public Response deleteOrder(@PathParam("orderId") @ApiParam("ID of the order that needs to be deleted") String orderId) {
return Response.ok().entity("magic!").build();
}
@GET
@Path("/inventory")
@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.Authorization(value = "api_key")
}, tags={ "store", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Integer.class, responseContainer = "Map") })
public Response getInventory(@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.getInventory(securityContext);
@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")
}, tags={ "store", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Integer.class, responseContainer = "Map") })
public Response getInventory() {
return Response.ok().entity("magic!").build();
}
@GET
@Path("/order/{orderId}")
@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.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", 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) })
public Response getOrderById(@ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("orderId") Long orderId
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.getOrderById(orderId,securityContext);
@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", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
@ApiResponse(code = 400, message = "Invalid ID supplied", response = Order.class),
@ApiResponse(code = 404, message = "Order not found", response = Order.class) })
public Response getOrderById(@PathParam("orderId") @Min(1) @Max(5) @ApiParam("ID of pet that needs to be fetched") Long orderId) {
return Response.ok().entity("magic!").build();
}
@POST
@Path("/order")
@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.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", 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" ,required=true) Order body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.placeOrder(body,securityContext);
@ApiOperation(value = "Place an order for a pet", notes = "", response = Order.class, tags={ "store" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
@ApiResponse(code = 400, message = "Invalid Order", response = Order.class) })
public Response placeOrder(Order body) {
return Response.ok().entity("magic!").build();
}
}

View File

@@ -1,142 +1,116 @@
package io.swagger.api;
import io.swagger.model.*;
import io.swagger.api.UserApiService;
import io.swagger.api.factories.UserApiServiceFactory;
import io.swagger.annotations.ApiParam;
import io.swagger.jaxrs.*;
import java.util.List;
import io.swagger.model.User;
import java.util.List;
import io.swagger.api.NotFoundException;
import java.io.InputStream;
import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
import org.glassfish.jersey.media.multipart.FormDataParam;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext;
import javax.ws.rs.*;
import javax.ws.rs.core.Response;
import io.swagger.annotations.*;
import java.util.List;
import javax.validation.constraints.*;
@Path("/user")
@Api(description = "the user API")
@io.swagger.annotations.Api(description = "the user API")
public class UserApi {
private final UserApiService delegate = UserApiServiceFactory.getUserApi();
@POST
@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.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = void.class) })
public Response createUser(@ApiParam(value = "Created user object" ,required=true) User body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.createUser(body,securityContext);
@ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", response = void.class, tags={ "user", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = void.class) })
public Response createUser(User body) {
return Response.ok().entity("magic!").build();
}
@POST
@Path("/createWithArray")
@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.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = void.class) })
public Response createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true) List<User> body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.createUsersWithArrayInput(body,securityContext);
@ApiOperation(value = "Creates list of users with given input array", notes = "", response = void.class, tags={ "user", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = void.class) })
public Response createUsersWithArrayInput(List<User> body) {
return Response.ok().entity("magic!").build();
}
@POST
@Path("/createWithList")
@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.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = void.class) })
public Response createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true) List<User> body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.createUsersWithListInput(body,securityContext);
@ApiOperation(value = "Creates list of users with given input array", notes = "", response = void.class, tags={ "user", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = void.class) })
public Response createUsersWithListInput(List<User> body) {
return Response.ok().entity("magic!").build();
}
@DELETE
@Path("/{username}")
@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.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = void.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = void.class) })
public Response deleteUser(@ApiParam(value = "The name that needs to be deleted",required=true) @PathParam("username") String username
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.deleteUser(username,securityContext);
@ApiOperation(value = "Delete user", notes = "This can only be done by the logged in user.", response = void.class, tags={ "user", })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid username supplied", response = void.class),
@ApiResponse(code = 404, message = "User not found", response = void.class) })
public Response deleteUser(@PathParam("username") @ApiParam("The name that needs to be deleted") String username) {
return Response.ok().entity("magic!").build();
}
@GET
@Path("/{username}")
@Produces({ "application/xml", "application/json" })
@io.swagger.annotations.ApiOperation(value = "Get user by user name", notes = "", response = User.class, tags={ "user", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = User.class),
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = User.class),
@io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = User.class) })
public Response getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true) @PathParam("username") String username
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.getUserByName(username,securityContext);
@ApiOperation(value = "Get user by user name", notes = "", response = User.class, tags={ "user", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = User.class),
@ApiResponse(code = 400, message = "Invalid username supplied", response = User.class),
@ApiResponse(code = 404, message = "User not found", response = User.class) })
public Response getUserByName(@PathParam("username") @ApiParam("The name that needs to be fetched. Use user1 for testing. ") String username) {
return Response.ok().entity("magic!").build();
}
@GET
@Path("/login")
@Produces({ "application/xml", "application/json" })
@io.swagger.annotations.ApiOperation(value = "Logs user into the system", notes = "", response = String.class, tags={ "user", })
@io.swagger.annotations.ApiResponses(value = {
@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) })
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
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.loginUser(username,password,securityContext);
@ApiOperation(value = "Logs user into the system", notes = "", response = String.class, tags={ "user", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = String.class),
@ApiResponse(code = 400, message = "Invalid username/password supplied", response = String.class) })
public Response loginUser(@QueryParam("username") @NotNull String username,@QueryParam("password") @NotNull String password) {
return Response.ok().entity("magic!").build();
}
@GET
@Path("/logout")
@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.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = void.class) })
public Response logoutUser(@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.logoutUser(securityContext);
@ApiOperation(value = "Logs out current logged in user session", notes = "", response = void.class, tags={ "user", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = void.class) })
public Response logoutUser() {
return Response.ok().entity("magic!").build();
}
@PUT
@Path("/{username}")
@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.ApiResponses(value = {
@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) })
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 body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.updateUser(username,body,securityContext);
@ApiOperation(value = "Updated user", notes = "This can only be done by the logged in user.", response = void.class, tags={ "user" })
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid user supplied", response = void.class),
@ApiResponse(code = 404, message = "User not found", response = void.class) })
public Response updateUser(@PathParam("username") @ApiParam("name that need to be deleted") String username,User body) {
return Response.ok().entity("magic!").build();
}
}

View File

@@ -1,86 +1,55 @@
/*
* 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 java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.validation.constraints.*;
/**
* AdditionalPropertiesClass
*/
import io.swagger.annotations.*;
import java.util.Objects;
public class AdditionalPropertiesClass {
@JsonProperty("map_property")
private Map<String, String> mapProperty = new HashMap<String, String>();
@JsonProperty("map_of_map_property")
private Map<String, Map<String, String>> mapOfMapProperty = new HashMap<String, Map<String, String>>();
/**
**/
public AdditionalPropertiesClass mapProperty(Map<String, String> mapProperty) {
this.mapProperty = mapProperty;
return this;
}
public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) {
this.mapProperty.put(key, mapPropertyItem);
return this;
}
/**
* Get mapProperty
* @return mapProperty
**/
@JsonProperty("map_property")
@ApiModelProperty(example = "null", value = "")
public Map<String, String> getMapProperty() {
return mapProperty;
}
public void setMapProperty(Map<String, String> mapProperty) {
this.mapProperty = mapProperty;
}
/**
**/
public AdditionalPropertiesClass mapOfMapProperty(Map<String, Map<String, String>> mapOfMapProperty) {
this.mapOfMapProperty = mapOfMapProperty;
return this;
}
public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map<String, String> mapOfMapPropertyItem) {
this.mapOfMapProperty.put(key, mapOfMapPropertyItem);
return this;
}
/**
* Get mapOfMapProperty
* @return mapOfMapProperty
**/
@JsonProperty("map_of_map_property")
@ApiModelProperty(example = "null", value = "")
public Map<String, Map<String, String>> getMapOfMapProperty() {
return mapOfMapProperty;
}
public void setMapOfMapProperty(Map<String, Map<String, String>> mapOfMapProperty) {
this.mapOfMapProperty = mapOfMapProperty;
}
@Override
public boolean equals(java.lang.Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
@@ -88,8 +57,8 @@ public class AdditionalPropertiesClass {
return false;
}
AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o;
return Objects.equals(this.mapProperty, additionalPropertiesClass.mapProperty) &&
Objects.equals(this.mapOfMapProperty, additionalPropertiesClass.mapOfMapProperty);
return Objects.equals(mapProperty, additionalPropertiesClass.mapProperty) &&
Objects.equals(mapOfMapProperty, additionalPropertiesClass.mapOfMapProperty);
}
@Override
@@ -97,7 +66,6 @@ public class AdditionalPropertiesClass {
return Objects.hash(mapProperty, mapOfMapProperty);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -113,11 +81,10 @@ public class AdditionalPropertiesClass {
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,76 +1,55 @@
/*
* 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.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import javax.validation.constraints.*;
/**
* Animal
*/
import io.swagger.annotations.*;
import java.util.Objects;
public class Animal {
@JsonProperty("className")
private String className = null;
@JsonProperty("color")
private String color = "red";
/**
**/
public Animal className(String className) {
this.className = className;
return this;
}
/**
* Get className
* @return className
**/
@JsonProperty("className")
@ApiModelProperty(example = "null", required = true, value = "")
@NotNull
public String getClassName() {
return className;
}
public void setClassName(String className) {
this.className = className;
}
/**
**/
public Animal color(String color) {
this.color = color;
return this;
}
/**
* Get color
* @return color
**/
@JsonProperty("color")
@ApiModelProperty(example = "null", value = "")
public String getColor() {
return color;
}
public void setColor(String color) {
this.color = color;
}
@Override
public boolean equals(java.lang.Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
@@ -78,8 +57,8 @@ public class Animal {
return false;
}
Animal animal = (Animal) o;
return Objects.equals(this.className, animal.className) &&
Objects.equals(this.color, animal.color);
return Objects.equals(className, animal.className) &&
Objects.equals(color, animal.color);
}
@Override
@@ -87,7 +66,6 @@ public class Animal {
return Objects.hash(className, color);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -103,11 +81,10 @@ public class Animal {
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,47 +1,36 @@
/*
* 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 io.swagger.model.Animal;
import java.util.ArrayList;
import java.util.List;
import javax.validation.constraints.*;
/**
* AnimalFarm
*/
import io.swagger.annotations.*;
import java.util.Objects;
public class AnimalFarm extends ArrayList<Animal> {
@Override
public boolean equals(java.lang.Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AnimalFarm animalFarm = (AnimalFarm) o;
return true;
}
@Override
public int hashCode() {
return Objects.hash(super.hashCode());
return Objects.hash();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -55,11 +44,10 @@ public class AnimalFarm extends ArrayList<Animal> {
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,59 +1,38 @@
/*
* 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 java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import javax.validation.constraints.*;
/**
* ArrayOfArrayOfNumberOnly
*/
import io.swagger.annotations.*;
import java.util.Objects;
public class ArrayOfArrayOfNumberOnly {
@JsonProperty("ArrayArrayNumber")
private List<List<BigDecimal>> arrayArrayNumber = new ArrayList<List<BigDecimal>>();
/**
**/
public ArrayOfArrayOfNumberOnly arrayArrayNumber(List<List<BigDecimal>> arrayArrayNumber) {
this.arrayArrayNumber = arrayArrayNumber;
return this;
}
public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List<BigDecimal> arrayArrayNumberItem) {
this.arrayArrayNumber.add(arrayArrayNumberItem);
return this;
}
/**
* Get arrayArrayNumber
* @return arrayArrayNumber
**/
@JsonProperty("ArrayArrayNumber")
@ApiModelProperty(example = "null", value = "")
public List<List<BigDecimal>> getArrayArrayNumber() {
return arrayArrayNumber;
}
public void setArrayArrayNumber(List<List<BigDecimal>> arrayArrayNumber) {
this.arrayArrayNumber = arrayArrayNumber;
}
@Override
public boolean equals(java.lang.Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
@@ -61,7 +40,7 @@ public class ArrayOfArrayOfNumberOnly {
return false;
}
ArrayOfArrayOfNumberOnly arrayOfArrayOfNumberOnly = (ArrayOfArrayOfNumberOnly) o;
return Objects.equals(this.arrayArrayNumber, arrayOfArrayOfNumberOnly.arrayArrayNumber);
return Objects.equals(arrayArrayNumber, arrayOfArrayOfNumberOnly.arrayArrayNumber);
}
@Override
@@ -69,7 +48,6 @@ public class ArrayOfArrayOfNumberOnly {
return Objects.hash(arrayArrayNumber);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -84,11 +62,10 @@ public class ArrayOfArrayOfNumberOnly {
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,59 +1,38 @@
/*
* 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 java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import javax.validation.constraints.*;
/**
* ArrayOfNumberOnly
*/
import io.swagger.annotations.*;
import java.util.Objects;
public class ArrayOfNumberOnly {
@JsonProperty("ArrayNumber")
private List<BigDecimal> arrayNumber = new ArrayList<BigDecimal>();
/**
**/
public ArrayOfNumberOnly arrayNumber(List<BigDecimal> arrayNumber) {
this.arrayNumber = arrayNumber;
return this;
}
public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) {
this.arrayNumber.add(arrayNumberItem);
return this;
}
/**
* Get arrayNumber
* @return arrayNumber
**/
@JsonProperty("ArrayNumber")
@ApiModelProperty(example = "null", value = "")
public List<BigDecimal> getArrayNumber() {
return arrayNumber;
}
public void setArrayNumber(List<BigDecimal> arrayNumber) {
this.arrayNumber = arrayNumber;
}
@Override
public boolean equals(java.lang.Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
@@ -61,7 +40,7 @@ public class ArrayOfNumberOnly {
return false;
}
ArrayOfNumberOnly arrayOfNumberOnly = (ArrayOfNumberOnly) o;
return Objects.equals(this.arrayNumber, arrayOfNumberOnly.arrayNumber);
return Objects.equals(arrayNumber, arrayOfNumberOnly.arrayNumber);
}
@Override
@@ -69,7 +48,6 @@ public class ArrayOfNumberOnly {
return Objects.hash(arrayNumber);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -84,11 +62,10 @@ public class ArrayOfNumberOnly {
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,113 +1,72 @@
/*
* 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 io.swagger.model.ReadOnlyFirst;
import java.util.ArrayList;
import java.util.List;
import javax.validation.constraints.*;
/**
* ArrayTest
*/
import io.swagger.annotations.*;
import java.util.Objects;
public class ArrayTest {
@JsonProperty("array_of_string")
private List<String> arrayOfString = new ArrayList<String>();
@JsonProperty("array_array_of_integer")
private List<List<Long>> arrayArrayOfInteger = new ArrayList<List<Long>>();
@JsonProperty("array_array_of_model")
private List<List<ReadOnlyFirst>> arrayArrayOfModel = new ArrayList<List<ReadOnlyFirst>>();
/**
**/
public ArrayTest arrayOfString(List<String> arrayOfString) {
this.arrayOfString = arrayOfString;
return this;
}
public ArrayTest addArrayOfStringItem(String arrayOfStringItem) {
this.arrayOfString.add(arrayOfStringItem);
return this;
}
/**
* Get arrayOfString
* @return arrayOfString
**/
@JsonProperty("array_of_string")
@ApiModelProperty(example = "null", value = "")
public List<String> getArrayOfString() {
return arrayOfString;
}
public void setArrayOfString(List<String> arrayOfString) {
this.arrayOfString = arrayOfString;
}
/**
**/
public ArrayTest arrayArrayOfInteger(List<List<Long>> arrayArrayOfInteger) {
this.arrayArrayOfInteger = arrayArrayOfInteger;
return this;
}
public ArrayTest addArrayArrayOfIntegerItem(List<Long> arrayArrayOfIntegerItem) {
this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem);
return this;
}
/**
* Get arrayArrayOfInteger
* @return arrayArrayOfInteger
**/
@JsonProperty("array_array_of_integer")
@ApiModelProperty(example = "null", value = "")
public List<List<Long>> getArrayArrayOfInteger() {
return arrayArrayOfInteger;
}
public void setArrayArrayOfInteger(List<List<Long>> arrayArrayOfInteger) {
this.arrayArrayOfInteger = arrayArrayOfInteger;
}
/**
**/
public ArrayTest arrayArrayOfModel(List<List<ReadOnlyFirst>> arrayArrayOfModel) {
this.arrayArrayOfModel = arrayArrayOfModel;
return this;
}
public ArrayTest addArrayArrayOfModelItem(List<ReadOnlyFirst> arrayArrayOfModelItem) {
this.arrayArrayOfModel.add(arrayArrayOfModelItem);
return this;
}
/**
* Get arrayArrayOfModel
* @return arrayArrayOfModel
**/
@JsonProperty("array_array_of_model")
@ApiModelProperty(example = "null", value = "")
public List<List<ReadOnlyFirst>> getArrayArrayOfModel() {
return arrayArrayOfModel;
}
public void setArrayArrayOfModel(List<List<ReadOnlyFirst>> arrayArrayOfModel) {
this.arrayArrayOfModel = arrayArrayOfModel;
}
@Override
public boolean equals(java.lang.Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
@@ -115,9 +74,9 @@ public class ArrayTest {
return false;
}
ArrayTest arrayTest = (ArrayTest) o;
return Objects.equals(this.arrayOfString, arrayTest.arrayOfString) &&
Objects.equals(this.arrayArrayOfInteger, arrayTest.arrayArrayOfInteger) &&
Objects.equals(this.arrayArrayOfModel, arrayTest.arrayArrayOfModel);
return Objects.equals(arrayOfString, arrayTest.arrayOfString) &&
Objects.equals(arrayArrayOfInteger, arrayTest.arrayArrayOfInteger) &&
Objects.equals(arrayArrayOfModel, arrayTest.arrayArrayOfModel);
}
@Override
@@ -125,7 +84,6 @@ public class ArrayTest {
return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -142,11 +100,10 @@ public class ArrayTest {
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,161 +1,121 @@
/*
* 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 javax.validation.constraints.*;
/**
* Capitalization
*/
import io.swagger.annotations.*;
import java.util.Objects;
public class Capitalization {
@JsonProperty("smallCamel")
private String smallCamel = null;
@JsonProperty("CapitalCamel")
private String capitalCamel = null;
@JsonProperty("small_Snake")
private String smallSnake = null;
@JsonProperty("Capital_Snake")
private String capitalSnake = null;
@JsonProperty("SCA_ETH_Flow_Points")
private String scAETHFlowPoints = null;
@JsonProperty("ATT_NAME")
private String ATT_NAME = null;
/**
**/
public Capitalization smallCamel(String smallCamel) {
this.smallCamel = smallCamel;
return this;
}
/**
* Get smallCamel
* @return smallCamel
**/
@JsonProperty("smallCamel")
@ApiModelProperty(example = "null", value = "")
public String getSmallCamel() {
return smallCamel;
}
public void setSmallCamel(String smallCamel) {
this.smallCamel = smallCamel;
}
/**
**/
public Capitalization capitalCamel(String capitalCamel) {
this.capitalCamel = capitalCamel;
return this;
}
/**
* Get capitalCamel
* @return capitalCamel
**/
@JsonProperty("CapitalCamel")
@ApiModelProperty(example = "null", value = "")
public String getCapitalCamel() {
return capitalCamel;
}
public void setCapitalCamel(String capitalCamel) {
this.capitalCamel = capitalCamel;
}
/**
**/
public Capitalization smallSnake(String smallSnake) {
this.smallSnake = smallSnake;
return this;
}
/**
* Get smallSnake
* @return smallSnake
**/
@JsonProperty("small_Snake")
@ApiModelProperty(example = "null", value = "")
public String getSmallSnake() {
return smallSnake;
}
public void setSmallSnake(String smallSnake) {
this.smallSnake = smallSnake;
}
/**
**/
public Capitalization capitalSnake(String capitalSnake) {
this.capitalSnake = capitalSnake;
return this;
}
/**
* Get capitalSnake
* @return capitalSnake
**/
@JsonProperty("Capital_Snake")
@ApiModelProperty(example = "null", value = "")
public String getCapitalSnake() {
return capitalSnake;
}
public void setCapitalSnake(String capitalSnake) {
this.capitalSnake = capitalSnake;
}
/**
**/
public Capitalization scAETHFlowPoints(String scAETHFlowPoints) {
this.scAETHFlowPoints = scAETHFlowPoints;
return this;
}
/**
* Get scAETHFlowPoints
* @return scAETHFlowPoints
**/
@JsonProperty("SCA_ETH_Flow_Points")
@ApiModelProperty(example = "null", value = "")
public String getScAETHFlowPoints() {
return scAETHFlowPoints;
}
public void setScAETHFlowPoints(String scAETHFlowPoints) {
this.scAETHFlowPoints = scAETHFlowPoints;
}
/**
* Name of the pet
**/
public Capitalization ATT_NAME(String ATT_NAME) {
this.ATT_NAME = ATT_NAME;
return this;
}
/**
* Name of the pet
* @return ATT_NAME
**/
@JsonProperty("ATT_NAME")
@ApiModelProperty(example = "null", value = "Name of the pet ")
public String getATTNAME() {
return ATT_NAME;
}
public void setATTNAME(String ATT_NAME) {
this.ATT_NAME = ATT_NAME;
}
@Override
public boolean equals(java.lang.Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
@@ -163,12 +123,12 @@ public class Capitalization {
return false;
}
Capitalization capitalization = (Capitalization) o;
return Objects.equals(this.smallCamel, capitalization.smallCamel) &&
Objects.equals(this.capitalCamel, capitalization.capitalCamel) &&
Objects.equals(this.smallSnake, capitalization.smallSnake) &&
Objects.equals(this.capitalSnake, capitalization.capitalSnake) &&
Objects.equals(this.scAETHFlowPoints, capitalization.scAETHFlowPoints) &&
Objects.equals(this.ATT_NAME, capitalization.ATT_NAME);
return Objects.equals(smallCamel, capitalization.smallCamel) &&
Objects.equals(capitalCamel, capitalization.capitalCamel) &&
Objects.equals(smallSnake, capitalization.smallSnake) &&
Objects.equals(capitalSnake, capitalization.capitalSnake) &&
Objects.equals(scAETHFlowPoints, capitalization.scAETHFlowPoints) &&
Objects.equals(ATT_NAME, capitalization.ATT_NAME);
}
@Override
@@ -176,7 +136,6 @@ public class Capitalization {
return Objects.hash(smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -196,11 +155,10 @@ public class Capitalization {
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,52 +1,36 @@
/*
* 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 io.swagger.model.Animal;
import javax.validation.constraints.*;
/**
* Cat
*/
import io.swagger.annotations.*;
import java.util.Objects;
public class Cat extends Animal {
@JsonProperty("declawed")
private Boolean declawed = null;
/**
**/
public Cat declawed(Boolean declawed) {
this.declawed = declawed;
return this;
}
/**
* Get declawed
* @return declawed
**/
@JsonProperty("declawed")
@ApiModelProperty(example = "null", value = "")
public Boolean getDeclawed() {
return declawed;
}
public void setDeclawed(Boolean declawed) {
this.declawed = declawed;
}
@Override
public boolean equals(java.lang.Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
@@ -54,16 +38,14 @@ public class Cat extends Animal {
return false;
}
Cat cat = (Cat) o;
return Objects.equals(this.declawed, cat.declawed) &&
super.equals(o);
return Objects.equals(declawed, cat.declawed);
}
@Override
public int hashCode() {
return Objects.hash(declawed, super.hashCode());
return Objects.hash(declawed);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -78,11 +60,10 @@ public class Cat extends Animal {
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,73 +1,52 @@
/*
* 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 javax.validation.constraints.*;
/**
* Category
*/
import io.swagger.annotations.*;
import java.util.Objects;
public class Category {
@JsonProperty("id")
private Long id = null;
@JsonProperty("name")
private String name = null;
/**
**/
public Category id(Long id) {
this.id = id;
return this;
}
/**
* Get id
* @return id
**/
@JsonProperty("id")
@ApiModelProperty(example = "null", value = "")
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
/**
**/
public Category name(String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
@JsonProperty("name")
@ApiModelProperty(example = "null", value = "")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public boolean equals(java.lang.Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
@@ -75,8 +54,8 @@ public class Category {
return false;
}
Category category = (Category) o;
return Objects.equals(this.id, category.id) &&
Objects.equals(this.name, category.name);
return Objects.equals(id, category.id) &&
Objects.equals(name, category.name);
}
@Override
@@ -84,7 +63,6 @@ public class Category {
return Objects.hash(id, name);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -100,11 +78,10 @@ public class Category {
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,53 +1,39 @@
/*
* 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 io.swagger.annotations.ApiModel;
import javax.validation.constraints.*;
/**
* Model for testing model with \&quot;_class\&quot; property
*/
**/
import io.swagger.annotations.*;
import java.util.Objects;
@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
**/
@JsonProperty("_class")
@ApiModelProperty(example = "null", value = "")
public String getPropertyClass() {
return propertyClass;
}
public void setPropertyClass(String propertyClass) {
this.propertyClass = propertyClass;
}
@Override
public boolean equals(java.lang.Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
@@ -55,7 +41,7 @@ public class ClassModel {
return false;
}
ClassModel classModel = (ClassModel) o;
return Objects.equals(this.propertyClass, classModel.propertyClass);
return Objects.equals(propertyClass, classModel.propertyClass);
}
@Override
@@ -63,7 +49,6 @@ public class ClassModel {
return Objects.hash(propertyClass);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -78,11 +63,10 @@ public class ClassModel {
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,51 +1,35 @@
/*
* 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 javax.validation.constraints.*;
/**
* Client
*/
import io.swagger.annotations.*;
import java.util.Objects;
public class Client {
@JsonProperty("client")
private String client = null;
/**
**/
public Client client(String client) {
this.client = client;
return this;
}
/**
* Get client
* @return client
**/
@JsonProperty("client")
@ApiModelProperty(example = "null", value = "")
public String getClient() {
return client;
}
public void setClient(String client) {
this.client = client;
}
@Override
public boolean equals(java.lang.Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
@@ -53,7 +37,7 @@ public class Client {
return false;
}
Client client = (Client) o;
return Objects.equals(this.client, client.client);
return Objects.equals(client, client.client);
}
@Override
@@ -61,7 +45,6 @@ public class Client {
return Objects.hash(client);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -76,11 +59,10 @@ public class Client {
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,52 +1,36 @@
/*
* 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 io.swagger.model.Animal;
import javax.validation.constraints.*;
/**
* Dog
*/
import io.swagger.annotations.*;
import java.util.Objects;
public class Dog extends Animal {
@JsonProperty("breed")
private String breed = null;
/**
**/
public Dog breed(String breed) {
this.breed = breed;
return this;
}
/**
* Get breed
* @return breed
**/
@JsonProperty("breed")
@ApiModelProperty(example = "null", value = "")
public String getBreed() {
return breed;
}
public void setBreed(String breed) {
this.breed = breed;
}
@Override
public boolean equals(java.lang.Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
@@ -54,16 +38,14 @@ public class Dog extends Animal {
return false;
}
Dog dog = (Dog) o;
return Objects.equals(this.breed, dog.breed) &&
super.equals(o);
return Objects.equals(breed, dog.breed);
}
@Override
public int hashCode() {
return Objects.hash(breed, super.hashCode());
return Objects.hash(breed);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -78,11 +60,10 @@ public class Dog extends Animal {
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,142 +1,116 @@
/*
* 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 java.util.ArrayList;
import java.util.List;
import javax.validation.constraints.*;
/**
* EnumArrays
*/
import io.swagger.annotations.*;
import java.util.Objects;
public class EnumArrays {
/**
* Gets or Sets justSymbol
*/
public enum JustSymbolEnum {
GREATER_THAN_OR_EQUAL_TO(">="),
DOLLAR("$");
public enum JustSymbolEnum {
GREATER_THAN_OR_EQUAL_TO(String.valueOf(">=")), DOLLAR(String.valueOf("$"));
private String value;
JustSymbolEnum(String value) {
this.value = value;
JustSymbolEnum (String v) {
value = v;
}
public String value() {
return value;
}
@Override
@JsonValue
public String toString() {
return String.valueOf(value);
return String.valueOf(value);
}
@JsonCreator
public static JustSymbolEnum fromValue(String text) {
for (JustSymbolEnum b : JustSymbolEnum.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
public static JustSymbolEnum fromValue(String v) {
for (JustSymbolEnum b : JustSymbolEnum.values()) {
if (String.valueOf(b.value).equals(v)) {
return b;
}
}
}
return null;
return null;
}
}
}
@JsonProperty("just_symbol")
private JustSymbolEnum justSymbol = null;
/**
* Gets or Sets arrayEnum
*/
public enum ArrayEnumEnum {
FISH("fish"),
CRAB("crab");
public enum ArrayEnumEnum {
FISH(String.valueOf("fish")), CRAB(String.valueOf("crab"));
private String value;
ArrayEnumEnum(String value) {
this.value = value;
ArrayEnumEnum (String v) {
value = v;
}
public String value() {
return value;
}
@Override
@JsonValue
public String toString() {
return String.valueOf(value);
return String.valueOf(value);
}
@JsonCreator
public static ArrayEnumEnum fromValue(String text) {
for (ArrayEnumEnum b : ArrayEnumEnum.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
public static ArrayEnumEnum fromValue(String v) {
for (ArrayEnumEnum b : ArrayEnumEnum.values()) {
if (String.valueOf(b.value).equals(v)) {
return b;
}
}
}
return null;
return null;
}
}
}
@JsonProperty("array_enum")
private List<ArrayEnumEnum> arrayEnum = new ArrayList<ArrayEnumEnum>();
/**
**/
public EnumArrays justSymbol(JustSymbolEnum justSymbol) {
this.justSymbol = justSymbol;
return this;
}
/**
* Get justSymbol
* @return justSymbol
**/
@JsonProperty("just_symbol")
@ApiModelProperty(example = "null", value = "")
public JustSymbolEnum getJustSymbol() {
return justSymbol;
}
public void setJustSymbol(JustSymbolEnum justSymbol) {
this.justSymbol = justSymbol;
}
/**
**/
public EnumArrays arrayEnum(List<ArrayEnumEnum> arrayEnum) {
this.arrayEnum = arrayEnum;
return this;
}
public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) {
this.arrayEnum.add(arrayEnumItem);
return this;
}
/**
* Get arrayEnum
* @return arrayEnum
**/
@JsonProperty("array_enum")
@ApiModelProperty(example = "null", value = "")
public List<ArrayEnumEnum> getArrayEnum() {
return arrayEnum;
}
public void setArrayEnum(List<ArrayEnumEnum> arrayEnum) {
this.arrayEnum = arrayEnum;
}
@Override
public boolean equals(java.lang.Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
@@ -144,8 +118,8 @@ public class EnumArrays {
return false;
}
EnumArrays enumArrays = (EnumArrays) o;
return Objects.equals(this.justSymbol, enumArrays.justSymbol) &&
Objects.equals(this.arrayEnum, enumArrays.arrayEnum);
return Objects.equals(justSymbol, enumArrays.justSymbol) &&
Objects.equals(arrayEnum, enumArrays.arrayEnum);
}
@Override
@@ -153,7 +127,6 @@ public class EnumArrays {
return Objects.hash(justSymbol, arrayEnum);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -169,11 +142,10 @@ public class EnumArrays {
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,22 +1,10 @@
/*
* 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 javax.validation.constraints.*;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
/**
* Gets or Sets EnumClass
@@ -36,6 +24,7 @@ public enum EnumClass {
}
@Override
@JsonValue
public String toString() {
return String.valueOf(value);
}
@@ -51,3 +40,4 @@ public enum EnumClass {
}
}

View File

@@ -1,213 +1,180 @@
/*
* 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 io.swagger.model.OuterEnum;
import javax.validation.constraints.*;
/**
* EnumTest
*/
import io.swagger.annotations.*;
import java.util.Objects;
public class EnumTest {
/**
* Gets or Sets enumString
*/
public enum EnumStringEnum {
UPPER("UPPER"),
LOWER("lower"),
EMPTY("");
public enum EnumStringEnum {
UPPER(String.valueOf("UPPER")), LOWER(String.valueOf("lower")), EMPTY(String.valueOf(""));
private String value;
EnumStringEnum(String value) {
this.value = value;
EnumStringEnum (String v) {
value = v;
}
public String value() {
return value;
}
@Override
@JsonValue
public String toString() {
return String.valueOf(value);
return String.valueOf(value);
}
@JsonCreator
public static EnumStringEnum fromValue(String text) {
for (EnumStringEnum b : EnumStringEnum.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
public static EnumStringEnum fromValue(String v) {
for (EnumStringEnum b : EnumStringEnum.values()) {
if (String.valueOf(b.value).equals(v)) {
return b;
}
}
}
return null;
return null;
}
}
}
@JsonProperty("enum_string")
private EnumStringEnum enumString = null;
/**
* Gets or Sets enumInteger
*/
public enum EnumIntegerEnum {
NUMBER_1(1),
NUMBER_MINUS_1(-1);
public enum EnumIntegerEnum {
NUMBER_1(Integer.valueOf(1)), NUMBER_MINUS_1(Integer.valueOf(-1));
private Integer value;
EnumIntegerEnum(Integer value) {
this.value = value;
EnumIntegerEnum (Integer v) {
value = v;
}
public String value() {
return value;
}
@Override
@JsonValue
public String toString() {
return String.valueOf(value);
return String.valueOf(value);
}
@JsonCreator
public static EnumIntegerEnum fromValue(String text) {
for (EnumIntegerEnum b : EnumIntegerEnum.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
public static EnumIntegerEnum fromValue(String v) {
for (EnumIntegerEnum b : EnumIntegerEnum.values()) {
if (String.valueOf(b.value).equals(v)) {
return b;
}
}
}
return null;
return null;
}
}
}
@JsonProperty("enum_integer")
private EnumIntegerEnum enumInteger = null;
/**
* Gets or Sets enumNumber
*/
public enum EnumNumberEnum {
NUMBER_1_DOT_1(1.1),
NUMBER_MINUS_1_DOT_2(-1.2);
public enum EnumNumberEnum {
NUMBER_1_DOT_1(Double.valueOf(1.1)), NUMBER_MINUS_1_DOT_2(Double.valueOf(-1.2));
private Double value;
EnumNumberEnum(Double value) {
this.value = value;
EnumNumberEnum (Double v) {
value = v;
}
public String value() {
return value;
}
@Override
@JsonValue
public String toString() {
return String.valueOf(value);
return String.valueOf(value);
}
@JsonCreator
public static EnumNumberEnum fromValue(String text) {
for (EnumNumberEnum b : EnumNumberEnum.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
public static EnumNumberEnum fromValue(String v) {
for (EnumNumberEnum b : EnumNumberEnum.values()) {
if (String.valueOf(b.value).equals(v)) {
return b;
}
}
}
return null;
return null;
}
}
}
@JsonProperty("enum_number")
private EnumNumberEnum enumNumber = null;
@JsonProperty("outerEnum")
private OuterEnum outerEnum = null;
/**
**/
public EnumTest enumString(EnumStringEnum enumString) {
this.enumString = enumString;
return this;
}
/**
* Get enumString
* @return enumString
**/
@JsonProperty("enum_string")
@ApiModelProperty(example = "null", value = "")
public EnumStringEnum getEnumString() {
return enumString;
}
public void setEnumString(EnumStringEnum enumString) {
this.enumString = enumString;
}
/**
**/
public EnumTest enumInteger(EnumIntegerEnum enumInteger) {
this.enumInteger = enumInteger;
return this;
}
/**
* Get enumInteger
* @return enumInteger
**/
@JsonProperty("enum_integer")
@ApiModelProperty(example = "null", value = "")
public EnumIntegerEnum getEnumInteger() {
return enumInteger;
}
public void setEnumInteger(EnumIntegerEnum enumInteger) {
this.enumInteger = enumInteger;
}
/**
**/
public EnumTest enumNumber(EnumNumberEnum enumNumber) {
this.enumNumber = enumNumber;
return this;
}
/**
* Get enumNumber
* @return enumNumber
**/
@JsonProperty("enum_number")
@ApiModelProperty(example = "null", value = "")
public EnumNumberEnum getEnumNumber() {
return enumNumber;
}
public void setEnumNumber(EnumNumberEnum enumNumber) {
this.enumNumber = enumNumber;
}
/**
**/
public EnumTest outerEnum(OuterEnum outerEnum) {
this.outerEnum = outerEnum;
return this;
}
/**
* Get outerEnum
* @return outerEnum
**/
@JsonProperty("outerEnum")
@ApiModelProperty(example = "null", value = "")
public OuterEnum getOuterEnum() {
return outerEnum;
}
public void setOuterEnum(OuterEnum outerEnum) {
this.outerEnum = outerEnum;
}
@Override
public boolean equals(java.lang.Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
@@ -215,10 +182,10 @@ public class EnumTest {
return false;
}
EnumTest enumTest = (EnumTest) o;
return Objects.equals(this.enumString, enumTest.enumString) &&
Objects.equals(this.enumInteger, enumTest.enumInteger) &&
Objects.equals(this.enumNumber, enumTest.enumNumber) &&
Objects.equals(this.outerEnum, enumTest.outerEnum);
return Objects.equals(enumString, enumTest.enumString) &&
Objects.equals(enumInteger, enumTest.enumInteger) &&
Objects.equals(enumNumber, enumTest.enumNumber) &&
Objects.equals(outerEnum, enumTest.outerEnum);
}
@Override
@@ -226,7 +193,6 @@ public class EnumTest {
return Objects.hash(enumString, enumInteger, enumNumber, outerEnum);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -244,11 +210,10 @@ public class EnumTest {
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,144 +1,96 @@
/*
* 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 java.math.BigDecimal;
import org.joda.time.LocalDate;
import javax.validation.constraints.*;
/**
* FormatTest
*/
import io.swagger.annotations.*;
import java.util.Objects;
public class FormatTest {
@JsonProperty("integer")
private Integer integer = null;
@JsonProperty("int32")
private Integer int32 = null;
@JsonProperty("int64")
private Long int64 = null;
@JsonProperty("number")
private BigDecimal number = null;
@JsonProperty("float")
private Float _float = null;
@JsonProperty("double")
private Double _double = null;
@JsonProperty("string")
private String string = null;
@JsonProperty("byte")
private byte[] _byte = null;
@JsonProperty("binary")
private byte[] binary = null;
@JsonProperty("date")
private LocalDate date = null;
@JsonProperty("dateTime")
private javax.xml.datatype.XMLGregorianCalendar dateTime = null;
@JsonProperty("uuid")
private String uuid = null;
@JsonProperty("password")
private String password = null;
/**
* minimum: 10
* maximum: 100
**/
public FormatTest integer(Integer integer) {
this.integer = integer;
return this;
}
/**
* Get integer
* minimum: 10
* maximum: 100
* @return integer
**/
@JsonProperty("integer")
@ApiModelProperty(example = "null", value = "")
@Min(10)
@Max(100)
public Integer getInteger() {
return integer;
}
public void setInteger(Integer integer) {
this.integer = integer;
}
/**
* minimum: 20
* maximum: 200
**/
public FormatTest int32(Integer int32) {
this.int32 = int32;
return this;
}
/**
* Get int32
* minimum: 20
* maximum: 200
* @return int32
**/
@JsonProperty("int32")
@ApiModelProperty(example = "null", value = "")
@Min(20)
@Max(200)
public Integer getInt32() {
return int32;
}
public void setInt32(Integer int32) {
this.int32 = int32;
}
/**
**/
public FormatTest int64(Long int64) {
this.int64 = int64;
return this;
}
/**
* Get int64
* @return int64
**/
@JsonProperty("int64")
@ApiModelProperty(example = "null", value = "")
public Long getInt64() {
return int64;
}
public void setInt64(Long int64) {
this.int64 = int64;
}
/**
* minimum: 32.1
* maximum: 543.2
**/
public FormatTest number(BigDecimal number) {
this.number = number;
return this;
}
/**
* Get number
* minimum: 32.1
* maximum: 543.2
* @return number
**/
@JsonProperty("number")
@ApiModelProperty(example = "null", required = true, value = "")
@NotNull
@DecimalMin("32.1")
@@ -146,198 +98,170 @@ public class FormatTest {
public BigDecimal getNumber() {
return number;
}
public void setNumber(BigDecimal number) {
this.number = number;
}
/**
* minimum: 54.3
* maximum: 987.6
**/
public FormatTest _float(Float _float) {
this._float = _float;
return this;
}
/**
* Get _float
* minimum: 54.3
* maximum: 987.6
* @return _float
**/
@JsonProperty("float")
@ApiModelProperty(example = "null", value = "")
@DecimalMin("54.3")
@DecimalMax("987.6")
public Float getFloat() {
return _float;
}
public void setFloat(Float _float) {
this._float = _float;
}
/**
* minimum: 67.8
* maximum: 123.4
**/
public FormatTest _double(Double _double) {
this._double = _double;
return this;
}
/**
* Get _double
* minimum: 67.8
* maximum: 123.4
* @return _double
**/
@JsonProperty("double")
@ApiModelProperty(example = "null", value = "")
@DecimalMin("67.8")
@DecimalMax("123.4")
public Double getDouble() {
return _double;
}
public void setDouble(Double _double) {
this._double = _double;
}
/**
**/
public FormatTest string(String string) {
this.string = string;
return this;
}
/**
* Get string
* @return string
**/
@JsonProperty("string")
@ApiModelProperty(example = "null", value = "")
@Pattern(regexp="/[a-z]/i")
public String getString() {
return string;
}
public void setString(String string) {
this.string = string;
}
/**
**/
public FormatTest _byte(byte[] _byte) {
this._byte = _byte;
return this;
}
/**
* Get _byte
* @return _byte
**/
@JsonProperty("byte")
@ApiModelProperty(example = "null", required = true, value = "")
@NotNull
public byte[] getByte() {
return _byte;
}
public void setByte(byte[] _byte) {
this._byte = _byte;
}
/**
**/
public FormatTest binary(byte[] binary) {
this.binary = binary;
return this;
}
/**
* Get binary
* @return binary
**/
@JsonProperty("binary")
@ApiModelProperty(example = "null", value = "")
public byte[] getBinary() {
return binary;
}
public void setBinary(byte[] binary) {
this.binary = binary;
}
/**
**/
public FormatTest date(LocalDate date) {
this.date = date;
return this;
}
/**
* Get date
* @return date
**/
@JsonProperty("date")
@ApiModelProperty(example = "null", required = true, value = "")
@NotNull
public LocalDate getDate() {
return date;
}
public void setDate(LocalDate date) {
this.date = date;
}
/**
**/
public FormatTest dateTime(javax.xml.datatype.XMLGregorianCalendar dateTime) {
this.dateTime = dateTime;
return this;
}
/**
* Get dateTime
* @return dateTime
**/
@JsonProperty("dateTime")
@ApiModelProperty(example = "null", value = "")
public javax.xml.datatype.XMLGregorianCalendar getDateTime() {
return dateTime;
}
public void setDateTime(javax.xml.datatype.XMLGregorianCalendar dateTime) {
this.dateTime = dateTime;
}
/**
**/
public FormatTest uuid(String uuid) {
this.uuid = uuid;
return this;
}
/**
* Get uuid
* @return uuid
**/
@JsonProperty("uuid")
@ApiModelProperty(example = "null", value = "")
public String getUuid() {
return uuid;
}
public void setUuid(String uuid) {
this.uuid = uuid;
}
/**
**/
public FormatTest password(String password) {
this.password = password;
return this;
}
/**
* Get password
* @return password
**/
@JsonProperty("password")
@ApiModelProperty(example = "null", required = true, value = "")
@NotNull
@Size(min=10,max=64)
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
@Override
public boolean equals(java.lang.Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
@@ -345,19 +269,19 @@ public class FormatTest {
return false;
}
FormatTest formatTest = (FormatTest) o;
return Objects.equals(this.integer, formatTest.integer) &&
Objects.equals(this.int32, formatTest.int32) &&
Objects.equals(this.int64, formatTest.int64) &&
Objects.equals(this.number, formatTest.number) &&
Objects.equals(this._float, formatTest._float) &&
Objects.equals(this._double, formatTest._double) &&
Objects.equals(this.string, formatTest.string) &&
Objects.equals(this._byte, formatTest._byte) &&
Objects.equals(this.binary, formatTest.binary) &&
Objects.equals(this.date, formatTest.date) &&
Objects.equals(this.dateTime, formatTest.dateTime) &&
Objects.equals(this.uuid, formatTest.uuid) &&
Objects.equals(this.password, formatTest.password);
return Objects.equals(integer, formatTest.integer) &&
Objects.equals(int32, formatTest.int32) &&
Objects.equals(int64, formatTest.int64) &&
Objects.equals(number, formatTest.number) &&
Objects.equals(_float, formatTest._float) &&
Objects.equals(_double, formatTest._double) &&
Objects.equals(string, formatTest.string) &&
Objects.equals(_byte, formatTest._byte) &&
Objects.equals(binary, formatTest.binary) &&
Objects.equals(date, formatTest.date) &&
Objects.equals(dateTime, formatTest.dateTime) &&
Objects.equals(uuid, formatTest.uuid) &&
Objects.equals(password, formatTest.password);
}
@Override
@@ -365,7 +289,6 @@ public class FormatTest {
return Objects.hash(integer, int32, int64, number, _float, _double, string, _byte, binary, date, dateTime, uuid, password);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -392,11 +315,10 @@ public class FormatTest {
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,55 +1,52 @@
/*
* 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 javax.validation.constraints.*;
/**
* HasOnlyReadOnly
*/
import io.swagger.annotations.*;
import java.util.Objects;
public class HasOnlyReadOnly {
@JsonProperty("bar")
private String bar = null;
@JsonProperty("foo")
private String foo = null;
/**
* Get bar
* @return bar
**/
@JsonProperty("bar")
/**
**/
public HasOnlyReadOnly bar(String bar) {
this.bar = bar;
return this;
}
@ApiModelProperty(example = "null", value = "")
public String getBar() {
return bar;
}
public void setBar(String bar) {
this.bar = bar;
}
/**
* Get foo
* @return foo
**/
@JsonProperty("foo")
/**
**/
public HasOnlyReadOnly foo(String foo) {
this.foo = foo;
return this;
}
@ApiModelProperty(example = "null", value = "")
public String getFoo() {
return foo;
}
public void setFoo(String foo) {
this.foo = foo;
}
@Override
public boolean equals(java.lang.Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
@@ -57,8 +54,8 @@ public class HasOnlyReadOnly {
return false;
}
HasOnlyReadOnly hasOnlyReadOnly = (HasOnlyReadOnly) o;
return Objects.equals(this.bar, hasOnlyReadOnly.bar) &&
Objects.equals(this.foo, hasOnlyReadOnly.foo);
return Objects.equals(bar, hasOnlyReadOnly.bar) &&
Objects.equals(foo, hasOnlyReadOnly.foo);
}
@Override
@@ -66,7 +63,6 @@ public class HasOnlyReadOnly {
return Objects.hash(bar, foo);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -82,11 +78,10 @@ public class HasOnlyReadOnly {
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,117 +1,86 @@
/*
* 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 java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.validation.constraints.*;
/**
* MapTest
*/
import io.swagger.annotations.*;
import java.util.Objects;
public class MapTest {
@JsonProperty("map_map_of_string")
private Map<String, Map<String, String>> mapMapOfString = new HashMap<String, Map<String, String>>();
/**
* Gets or Sets inner
*/
public enum InnerEnum {
UPPER("UPPER"),
LOWER("lower");
public enum InnerEnum {
UPPER(String.valueOf("UPPER")), LOWER(String.valueOf("lower"));
private String value;
InnerEnum(String value) {
this.value = value;
InnerEnum (String v) {
value = v;
}
public String value() {
return value;
}
@Override
@JsonValue
public String toString() {
return String.valueOf(value);
return String.valueOf(value);
}
@JsonCreator
public static InnerEnum fromValue(String text) {
for (InnerEnum b : InnerEnum.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
public static InnerEnum fromValue(String v) {
for (InnerEnum b : InnerEnum.values()) {
if (String.valueOf(b.value).equals(v)) {
return b;
}
}
}
return null;
return null;
}
}
}
@JsonProperty("map_of_enum_string")
private Map<String, InnerEnum> mapOfEnumString = new HashMap<String, InnerEnum>();
/**
**/
public MapTest mapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
this.mapMapOfString = mapMapOfString;
return this;
}
public MapTest putMapMapOfStringItem(String key, Map<String, String> mapMapOfStringItem) {
this.mapMapOfString.put(key, mapMapOfStringItem);
return this;
}
/**
* Get mapMapOfString
* @return mapMapOfString
**/
@JsonProperty("map_map_of_string")
@ApiModelProperty(example = "null", value = "")
public Map<String, Map<String, String>> getMapMapOfString() {
return mapMapOfString;
}
public void setMapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
this.mapMapOfString = mapMapOfString;
}
/**
**/
public MapTest mapOfEnumString(Map<String, InnerEnum> mapOfEnumString) {
this.mapOfEnumString = mapOfEnumString;
return this;
}
public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) {
this.mapOfEnumString.put(key, mapOfEnumStringItem);
return this;
}
/**
* Get mapOfEnumString
* @return mapOfEnumString
**/
@JsonProperty("map_of_enum_string")
@ApiModelProperty(example = "null", value = "")
public Map<String, InnerEnum> getMapOfEnumString() {
return mapOfEnumString;
}
public void setMapOfEnumString(Map<String, InnerEnum> mapOfEnumString) {
this.mapOfEnumString = mapOfEnumString;
}
@Override
public boolean equals(java.lang.Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
@@ -119,8 +88,8 @@ public class MapTest {
return false;
}
MapTest mapTest = (MapTest) o;
return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) &&
Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString);
return Objects.equals(mapMapOfString, mapTest.mapMapOfString) &&
Objects.equals(mapOfEnumString, mapTest.mapOfEnumString);
}
@Override
@@ -128,7 +97,6 @@ public class MapTest {
return Objects.hash(mapMapOfString, mapOfEnumString);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -144,11 +112,10 @@ public class MapTest {
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,104 +1,73 @@
/*
* 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 io.swagger.model.Animal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.validation.constraints.*;
/**
* MixedPropertiesAndAdditionalPropertiesClass
*/
import io.swagger.annotations.*;
import java.util.Objects;
public class MixedPropertiesAndAdditionalPropertiesClass {
@JsonProperty("uuid")
private String uuid = null;
@JsonProperty("dateTime")
private javax.xml.datatype.XMLGregorianCalendar dateTime = null;
@JsonProperty("map")
private Map<String, Animal> map = new HashMap<String, Animal>();
/**
**/
public MixedPropertiesAndAdditionalPropertiesClass uuid(String uuid) {
this.uuid = uuid;
return this;
}
/**
* Get uuid
* @return uuid
**/
@JsonProperty("uuid")
@ApiModelProperty(example = "null", value = "")
public String getUuid() {
return uuid;
}
public void setUuid(String uuid) {
this.uuid = uuid;
}
/**
**/
public MixedPropertiesAndAdditionalPropertiesClass dateTime(javax.xml.datatype.XMLGregorianCalendar dateTime) {
this.dateTime = dateTime;
return this;
}
/**
* Get dateTime
* @return dateTime
**/
@JsonProperty("dateTime")
@ApiModelProperty(example = "null", value = "")
public javax.xml.datatype.XMLGregorianCalendar getDateTime() {
return dateTime;
}
public void setDateTime(javax.xml.datatype.XMLGregorianCalendar dateTime) {
this.dateTime = dateTime;
}
/**
**/
public MixedPropertiesAndAdditionalPropertiesClass map(Map<String, Animal> map) {
this.map = map;
return this;
}
public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) {
this.map.put(key, mapItem);
return this;
}
/**
* Get map
* @return map
**/
@JsonProperty("map")
@ApiModelProperty(example = "null", value = "")
public Map<String, Animal> getMap() {
return map;
}
public void setMap(Map<String, Animal> map) {
this.map = map;
}
@Override
public boolean equals(java.lang.Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
@@ -106,9 +75,9 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
return false;
}
MixedPropertiesAndAdditionalPropertiesClass mixedPropertiesAndAdditionalPropertiesClass = (MixedPropertiesAndAdditionalPropertiesClass) o;
return Objects.equals(this.uuid, mixedPropertiesAndAdditionalPropertiesClass.uuid) &&
Objects.equals(this.dateTime, mixedPropertiesAndAdditionalPropertiesClass.dateTime) &&
Objects.equals(this.map, mixedPropertiesAndAdditionalPropertiesClass.map);
return Objects.equals(uuid, mixedPropertiesAndAdditionalPropertiesClass.uuid) &&
Objects.equals(dateTime, mixedPropertiesAndAdditionalPropertiesClass.dateTime) &&
Objects.equals(map, mixedPropertiesAndAdditionalPropertiesClass.map);
}
@Override
@@ -116,7 +85,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
return Objects.hash(uuid, dateTime, map);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -133,11 +101,10 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,75 +1,56 @@
/*
* 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 io.swagger.annotations.ApiModel;
import javax.validation.constraints.*;
/**
* Model for testing model name starting with number
*/
**/
import io.swagger.annotations.*;
import java.util.Objects;
@ApiModel(description = "Model for testing model name starting with number")
public class Model200Response {
@JsonProperty("name")
private Integer name = null;
@JsonProperty("class")
private String propertyClass = null;
/**
**/
public Model200Response name(Integer name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
@JsonProperty("name")
@ApiModelProperty(example = "null", value = "")
public Integer getName() {
return name;
}
public void setName(Integer name) {
this.name = name;
}
/**
**/
public Model200Response propertyClass(String propertyClass) {
this.propertyClass = propertyClass;
return this;
}
/**
* Get propertyClass
* @return propertyClass
**/
@JsonProperty("class")
@ApiModelProperty(example = "null", value = "")
public String getPropertyClass() {
return propertyClass;
}
public void setPropertyClass(String propertyClass) {
this.propertyClass = propertyClass;
}
@Override
public boolean equals(java.lang.Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
@@ -77,8 +58,8 @@ public class Model200Response {
return false;
}
Model200Response _200Response = (Model200Response) o;
return Objects.equals(this.name, _200Response.name) &&
Objects.equals(this.propertyClass, _200Response.propertyClass);
return Objects.equals(name, _200Response.name) &&
Objects.equals(propertyClass, _200Response.propertyClass);
}
@Override
@@ -86,7 +67,6 @@ public class Model200Response {
return Objects.hash(name, propertyClass);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -102,11 +82,10 @@ public class Model200Response {
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,95 +1,69 @@
/*
* 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 javax.validation.constraints.*;
/**
* ModelApiResponse
*/
import io.swagger.annotations.*;
import java.util.Objects;
public class ModelApiResponse {
@JsonProperty("code")
private Integer code = null;
@JsonProperty("type")
private String type = null;
@JsonProperty("message")
private String message = null;
/**
**/
public ModelApiResponse code(Integer code) {
this.code = code;
return this;
}
/**
* Get code
* @return code
**/
@JsonProperty("code")
@ApiModelProperty(example = "null", value = "")
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
/**
**/
public ModelApiResponse type(String type) {
this.type = type;
return this;
}
/**
* Get type
* @return type
**/
@JsonProperty("type")
@ApiModelProperty(example = "null", value = "")
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
/**
**/
public ModelApiResponse message(String message) {
this.message = message;
return this;
}
/**
* Get message
* @return message
**/
@JsonProperty("message")
@ApiModelProperty(example = "null", value = "")
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
@Override
public boolean equals(java.lang.Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
@@ -97,9 +71,9 @@ public class ModelApiResponse {
return false;
}
ModelApiResponse _apiResponse = (ModelApiResponse) o;
return Objects.equals(this.code, _apiResponse.code) &&
Objects.equals(this.type, _apiResponse.type) &&
Objects.equals(this.message, _apiResponse.message);
return Objects.equals(code, _apiResponse.code) &&
Objects.equals(type, _apiResponse.type) &&
Objects.equals(message, _apiResponse.message);
}
@Override
@@ -107,7 +81,6 @@ public class ModelApiResponse {
return Objects.hash(code, type, message);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -124,11 +97,10 @@ public class ModelApiResponse {
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,53 +1,39 @@
/*
* 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 io.swagger.annotations.ApiModel;
import javax.validation.constraints.*;
/**
* Model for testing reserved words
*/
**/
import io.swagger.annotations.*;
import java.util.Objects;
@ApiModel(description = "Model for testing reserved words")
public class ModelReturn {
@JsonProperty("return")
private Integer _return = null;
/**
**/
public ModelReturn _return(Integer _return) {
this._return = _return;
return this;
}
/**
* Get _return
* @return _return
**/
@JsonProperty("return")
@ApiModelProperty(example = "null", value = "")
public Integer getReturn() {
return _return;
}
public void setReturn(Integer _return) {
this._return = _return;
}
@Override
public boolean equals(java.lang.Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
@@ -55,7 +41,7 @@ public class ModelReturn {
return false;
}
ModelReturn _return = (ModelReturn) o;
return Objects.equals(this._return, _return._return);
return Objects.equals(_return, _return._return);
}
@Override
@@ -63,7 +49,6 @@ public class ModelReturn {
return Objects.hash(_return);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -78,11 +63,10 @@ public class ModelReturn {
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,102 +1,91 @@
/*
* 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 io.swagger.annotations.ApiModel;
import javax.validation.constraints.*;
/**
* Model for testing model name same as property name
*/
**/
import io.swagger.annotations.*;
import java.util.Objects;
@ApiModel(description = "Model for testing model name same as property name")
public class Name {
@JsonProperty("name")
private Integer name = null;
@JsonProperty("snake_case")
private Integer snakeCase = null;
@JsonProperty("property")
private String property = null;
@JsonProperty("123Number")
private Integer _123Number = null;
/**
**/
public Name name(Integer name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
@JsonProperty("name")
@ApiModelProperty(example = "null", required = true, value = "")
@NotNull
public Integer getName() {
return name;
}
public void setName(Integer name) {
this.name = name;
}
/**
* Get snakeCase
* @return snakeCase
**/
@JsonProperty("snake_case")
/**
**/
public Name snakeCase(Integer snakeCase) {
this.snakeCase = snakeCase;
return this;
}
@ApiModelProperty(example = "null", value = "")
public Integer getSnakeCase() {
return snakeCase;
}
public void setSnakeCase(Integer snakeCase) {
this.snakeCase = snakeCase;
}
/**
**/
public Name property(String property) {
this.property = property;
return this;
}
/**
* Get property
* @return property
**/
@JsonProperty("property")
@ApiModelProperty(example = "null", value = "")
public String getProperty() {
return property;
}
public void setProperty(String property) {
this.property = property;
}
/**
* Get _123Number
* @return _123Number
**/
@JsonProperty("123Number")
/**
**/
public Name _123Number(Integer _123Number) {
this._123Number = _123Number;
return this;
}
@ApiModelProperty(example = "null", value = "")
public Integer get123Number() {
return _123Number;
}
public void set123Number(Integer _123Number) {
this._123Number = _123Number;
}
@Override
public boolean equals(java.lang.Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
@@ -104,10 +93,10 @@ public class Name {
return false;
}
Name name = (Name) o;
return Objects.equals(this.name, name.name) &&
Objects.equals(this.snakeCase, name.snakeCase) &&
Objects.equals(this.property, name.property) &&
Objects.equals(this._123Number, name._123Number);
return Objects.equals(name, name.name) &&
Objects.equals(snakeCase, name.snakeCase) &&
Objects.equals(property, name.property) &&
Objects.equals(_123Number, name._123Number);
}
@Override
@@ -115,7 +104,6 @@ public class Name {
return Objects.hash(name, snakeCase, property, _123Number);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -133,11 +121,10 @@ public class Name {
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,52 +1,36 @@
/*
* 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 java.math.BigDecimal;
import javax.validation.constraints.*;
/**
* NumberOnly
*/
import io.swagger.annotations.*;
import java.util.Objects;
public class NumberOnly {
@JsonProperty("JustNumber")
private BigDecimal justNumber = null;
/**
**/
public NumberOnly justNumber(BigDecimal justNumber) {
this.justNumber = justNumber;
return this;
}
/**
* Get justNumber
* @return justNumber
**/
@JsonProperty("JustNumber")
@ApiModelProperty(example = "null", value = "")
public BigDecimal getJustNumber() {
return justNumber;
}
public void setJustNumber(BigDecimal justNumber) {
this.justNumber = justNumber;
}
@Override
public boolean equals(java.lang.Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
@@ -54,7 +38,7 @@ public class NumberOnly {
return false;
}
NumberOnly numberOnly = (NumberOnly) o;
return Objects.equals(this.justNumber, numberOnly.justNumber);
return Objects.equals(justNumber, numberOnly.justNumber);
}
@Override
@@ -62,7 +46,6 @@ public class NumberOnly {
return Objects.hash(justNumber);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -77,11 +60,10 @@ public class NumberOnly {
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,194 +1,152 @@
/*
* 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 javax.validation.constraints.*;
/**
* Order
*/
import io.swagger.annotations.*;
import java.util.Objects;
public class Order {
@JsonProperty("id")
private Long id = null;
@JsonProperty("petId")
private Long petId = null;
@JsonProperty("quantity")
private Integer quantity = null;
@JsonProperty("shipDate")
private javax.xml.datatype.XMLGregorianCalendar shipDate = null;
/**
* Order Status
*/
public enum StatusEnum {
PLACED("placed"),
APPROVED("approved"),
DELIVERED("delivered");
public enum StatusEnum {
PLACED(String.valueOf("placed")), APPROVED(String.valueOf("approved")), DELIVERED(String.valueOf("delivered"));
private String value;
StatusEnum(String value) {
this.value = value;
StatusEnum (String v) {
value = v;
}
public String value() {
return value;
}
@Override
@JsonValue
public String toString() {
return String.valueOf(value);
return String.valueOf(value);
}
@JsonCreator
public static StatusEnum fromValue(String text) {
for (StatusEnum b : StatusEnum.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
public static StatusEnum fromValue(String v) {
for (StatusEnum b : StatusEnum.values()) {
if (String.valueOf(b.value).equals(v)) {
return b;
}
}
}
return null;
return null;
}
}
}
@JsonProperty("status")
private StatusEnum status = null;
@JsonProperty("complete")
private Boolean complete = false;
/**
**/
public Order id(Long id) {
this.id = id;
return this;
}
/**
* Get id
* @return id
**/
@JsonProperty("id")
@ApiModelProperty(example = "null", value = "")
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
/**
**/
public Order petId(Long petId) {
this.petId = petId;
return this;
}
/**
* Get petId
* @return petId
**/
@JsonProperty("petId")
@ApiModelProperty(example = "null", value = "")
public Long getPetId() {
return petId;
}
public void setPetId(Long petId) {
this.petId = petId;
}
/**
**/
public Order quantity(Integer quantity) {
this.quantity = quantity;
return this;
}
/**
* Get quantity
* @return quantity
**/
@JsonProperty("quantity")
@ApiModelProperty(example = "null", value = "")
public Integer getQuantity() {
return quantity;
}
public void setQuantity(Integer quantity) {
this.quantity = quantity;
}
/**
**/
public Order shipDate(javax.xml.datatype.XMLGregorianCalendar shipDate) {
this.shipDate = shipDate;
return this;
}
/**
* Get shipDate
* @return shipDate
**/
@JsonProperty("shipDate")
@ApiModelProperty(example = "null", value = "")
public javax.xml.datatype.XMLGregorianCalendar getShipDate() {
return shipDate;
}
public void setShipDate(javax.xml.datatype.XMLGregorianCalendar shipDate) {
this.shipDate = shipDate;
}
/**
* Order Status
**/
public Order status(StatusEnum status) {
this.status = status;
return this;
}
/**
* Order Status
* @return status
**/
@JsonProperty("status")
@ApiModelProperty(example = "null", value = "Order Status")
public StatusEnum getStatus() {
return status;
}
public void setStatus(StatusEnum status) {
this.status = status;
}
/**
**/
public Order complete(Boolean complete) {
this.complete = complete;
return this;
}
/**
* Get complete
* @return complete
**/
@JsonProperty("complete")
@ApiModelProperty(example = "null", value = "")
public Boolean getComplete() {
return complete;
}
public void setComplete(Boolean complete) {
this.complete = complete;
}
@Override
public boolean equals(java.lang.Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
@@ -196,12 +154,12 @@ public class Order {
return false;
}
Order order = (Order) o;
return Objects.equals(this.id, order.id) &&
Objects.equals(this.petId, order.petId) &&
Objects.equals(this.quantity, order.quantity) &&
Objects.equals(this.shipDate, order.shipDate) &&
Objects.equals(this.status, order.status) &&
Objects.equals(this.complete, order.complete);
return Objects.equals(id, order.id) &&
Objects.equals(petId, order.petId) &&
Objects.equals(quantity, order.quantity) &&
Objects.equals(shipDate, order.shipDate) &&
Objects.equals(status, order.status) &&
Objects.equals(complete, order.complete);
}
@Override
@@ -209,7 +167,6 @@ public class Order {
return Objects.hash(id, petId, quantity, shipDate, status, complete);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -229,11 +186,10 @@ public class Order {
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,22 +1,10 @@
/*
* 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 javax.validation.constraints.*;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
/**
* Gets or Sets OuterEnum
@@ -36,6 +24,7 @@ public enum OuterEnum {
}
@Override
@JsonValue
public String toString() {
return String.valueOf(value);
}
@@ -51,3 +40,4 @@ public enum OuterEnum {
}
}

View File

@@ -1,210 +1,158 @@
/*
* 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 io.swagger.model.Category;
import io.swagger.model.Tag;
import java.util.ArrayList;
import java.util.List;
import javax.validation.constraints.*;
/**
* Pet
*/
import io.swagger.annotations.*;
import java.util.Objects;
public class Pet {
@JsonProperty("id")
private Long id = null;
@JsonProperty("category")
private Category category = null;
@JsonProperty("name")
private String name = null;
@JsonProperty("photoUrls")
private List<String> photoUrls = new ArrayList<String>();
@JsonProperty("tags")
private List<Tag> tags = new ArrayList<Tag>();
/**
* pet status in the store
*/
public enum StatusEnum {
AVAILABLE("available"),
PENDING("pending"),
SOLD("sold");
public enum StatusEnum {
AVAILABLE(String.valueOf("available")), PENDING(String.valueOf("pending")), SOLD(String.valueOf("sold"));
private String value;
StatusEnum(String value) {
this.value = value;
StatusEnum (String v) {
value = v;
}
public String value() {
return value;
}
@Override
@JsonValue
public String toString() {
return String.valueOf(value);
return String.valueOf(value);
}
@JsonCreator
public static StatusEnum fromValue(String text) {
for (StatusEnum b : StatusEnum.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
public static StatusEnum fromValue(String v) {
for (StatusEnum b : StatusEnum.values()) {
if (String.valueOf(b.value).equals(v)) {
return b;
}
}
}
return null;
return null;
}
}
}
@JsonProperty("status")
private StatusEnum status = null;
/**
**/
public Pet id(Long id) {
this.id = id;
return this;
}
/**
* Get id
* @return id
**/
@JsonProperty("id")
@ApiModelProperty(example = "null", value = "")
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
/**
**/
public Pet category(Category category) {
this.category = category;
return this;
}
/**
* Get category
* @return category
**/
@JsonProperty("category")
@ApiModelProperty(example = "null", value = "")
public Category getCategory() {
return category;
}
public void setCategory(Category category) {
this.category = category;
}
/**
**/
public Pet name(String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
@JsonProperty("name")
@ApiModelProperty(example = "doggie", required = true, value = "")
@NotNull
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
/**
**/
public Pet photoUrls(List<String> photoUrls) {
this.photoUrls = photoUrls;
return this;
}
public Pet addPhotoUrlsItem(String photoUrlsItem) {
this.photoUrls.add(photoUrlsItem);
return this;
}
/**
* Get photoUrls
* @return photoUrls
**/
@JsonProperty("photoUrls")
@ApiModelProperty(example = "null", required = true, value = "")
@NotNull
public List<String> getPhotoUrls() {
return photoUrls;
}
public void setPhotoUrls(List<String> photoUrls) {
this.photoUrls = photoUrls;
}
/**
**/
public Pet tags(List<Tag> tags) {
this.tags = tags;
return this;
}
public Pet addTagsItem(Tag tagsItem) {
this.tags.add(tagsItem);
return this;
}
/**
* Get tags
* @return tags
**/
@JsonProperty("tags")
@ApiModelProperty(example = "null", value = "")
public List<Tag> getTags() {
return tags;
}
public void setTags(List<Tag> tags) {
this.tags = tags;
}
/**
* pet status in the store
**/
public Pet status(StatusEnum status) {
this.status = status;
return this;
}
/**
* pet status in the store
* @return status
**/
@JsonProperty("status")
@ApiModelProperty(example = "null", value = "pet status in the store")
public StatusEnum getStatus() {
return status;
}
public void setStatus(StatusEnum status) {
this.status = status;
}
@Override
public boolean equals(java.lang.Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
@@ -212,12 +160,12 @@ public class Pet {
return false;
}
Pet pet = (Pet) o;
return Objects.equals(this.id, pet.id) &&
Objects.equals(this.category, pet.category) &&
Objects.equals(this.name, pet.name) &&
Objects.equals(this.photoUrls, pet.photoUrls) &&
Objects.equals(this.tags, pet.tags) &&
Objects.equals(this.status, pet.status);
return Objects.equals(id, pet.id) &&
Objects.equals(category, pet.category) &&
Objects.equals(name, pet.name) &&
Objects.equals(photoUrls, pet.photoUrls) &&
Objects.equals(tags, pet.tags) &&
Objects.equals(status, pet.status);
}
@Override
@@ -225,7 +173,6 @@ public class Pet {
return Objects.hash(id, category, name, photoUrls, tags, status);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -245,11 +192,10 @@ public class Pet {
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,64 +1,52 @@
/*
* 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 javax.validation.constraints.*;
/**
* ReadOnlyFirst
*/
import io.swagger.annotations.*;
import java.util.Objects;
public class ReadOnlyFirst {
@JsonProperty("bar")
private String bar = null;
@JsonProperty("baz")
private String baz = null;
/**
* Get bar
* @return bar
**/
@JsonProperty("bar")
/**
**/
public ReadOnlyFirst bar(String bar) {
this.bar = bar;
return this;
}
@ApiModelProperty(example = "null", value = "")
public String getBar() {
return bar;
}
public void setBar(String bar) {
this.bar = bar;
}
/**
**/
public ReadOnlyFirst baz(String baz) {
this.baz = baz;
return this;
}
/**
* Get baz
* @return baz
**/
@JsonProperty("baz")
@ApiModelProperty(example = "null", value = "")
public String getBaz() {
return baz;
}
public void setBaz(String baz) {
this.baz = baz;
}
@Override
public boolean equals(java.lang.Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
@@ -66,8 +54,8 @@ public class ReadOnlyFirst {
return false;
}
ReadOnlyFirst readOnlyFirst = (ReadOnlyFirst) o;
return Objects.equals(this.bar, readOnlyFirst.bar) &&
Objects.equals(this.baz, readOnlyFirst.baz);
return Objects.equals(bar, readOnlyFirst.bar) &&
Objects.equals(baz, readOnlyFirst.baz);
}
@Override
@@ -75,7 +63,6 @@ public class ReadOnlyFirst {
return Objects.hash(bar, baz);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -91,11 +78,10 @@ public class ReadOnlyFirst {
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,51 +1,35 @@
/*
* 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 javax.validation.constraints.*;
/**
* SpecialModelName
*/
import io.swagger.annotations.*;
import java.util.Objects;
public class SpecialModelName {
@JsonProperty("$special[property.name]")
private Long specialPropertyName = null;
/**
**/
public SpecialModelName specialPropertyName(Long specialPropertyName) {
this.specialPropertyName = specialPropertyName;
return this;
}
/**
* Get specialPropertyName
* @return specialPropertyName
**/
@JsonProperty("$special[property.name]")
@ApiModelProperty(example = "null", value = "")
public Long getSpecialPropertyName() {
return specialPropertyName;
}
public void setSpecialPropertyName(Long specialPropertyName) {
this.specialPropertyName = specialPropertyName;
}
@Override
public boolean equals(java.lang.Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
@@ -53,7 +37,7 @@ public class SpecialModelName {
return false;
}
SpecialModelName specialModelName = (SpecialModelName) o;
return Objects.equals(this.specialPropertyName, specialModelName.specialPropertyName);
return Objects.equals(specialPropertyName, specialModelName.specialPropertyName);
}
@Override
@@ -61,7 +45,6 @@ public class SpecialModelName {
return Objects.hash(specialPropertyName);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -76,11 +59,10 @@ public class SpecialModelName {
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,73 +1,52 @@
/*
* 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 javax.validation.constraints.*;
/**
* Tag
*/
import io.swagger.annotations.*;
import java.util.Objects;
public class Tag {
@JsonProperty("id")
private Long id = null;
@JsonProperty("name")
private String name = null;
/**
**/
public Tag id(Long id) {
this.id = id;
return this;
}
/**
* Get id
* @return id
**/
@JsonProperty("id")
@ApiModelProperty(example = "null", value = "")
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
/**
**/
public Tag name(String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
@JsonProperty("name")
@ApiModelProperty(example = "null", value = "")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public boolean equals(java.lang.Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
@@ -75,8 +54,8 @@ public class Tag {
return false;
}
Tag tag = (Tag) o;
return Objects.equals(this.id, tag.id) &&
Objects.equals(this.name, tag.name);
return Objects.equals(id, tag.id) &&
Objects.equals(name, tag.name);
}
@Override
@@ -84,7 +63,6 @@ public class Tag {
return Objects.hash(id, name);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -100,11 +78,10 @@ public class Tag {
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,205 +1,155 @@
/*
* 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 javax.validation.constraints.*;
/**
* User
*/
import io.swagger.annotations.*;
import java.util.Objects;
public class User {
@JsonProperty("id")
private Long id = null;
@JsonProperty("username")
private String username = null;
@JsonProperty("firstName")
private String firstName = null;
@JsonProperty("lastName")
private String lastName = null;
@JsonProperty("email")
private String email = null;
@JsonProperty("password")
private String password = null;
@JsonProperty("phone")
private String phone = null;
@JsonProperty("userStatus")
private Integer userStatus = null;
/**
**/
public User id(Long id) {
this.id = id;
return this;
}
/**
* Get id
* @return id
**/
@JsonProperty("id")
@ApiModelProperty(example = "null", value = "")
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
/**
**/
public User username(String username) {
this.username = username;
return this;
}
/**
* Get username
* @return username
**/
@JsonProperty("username")
@ApiModelProperty(example = "null", value = "")
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
/**
**/
public User firstName(String firstName) {
this.firstName = firstName;
return this;
}
/**
* Get firstName
* @return firstName
**/
@JsonProperty("firstName")
@ApiModelProperty(example = "null", value = "")
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
/**
**/
public User lastName(String lastName) {
this.lastName = lastName;
return this;
}
/**
* Get lastName
* @return lastName
**/
@JsonProperty("lastName")
@ApiModelProperty(example = "null", value = "")
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
/**
**/
public User email(String email) {
this.email = email;
return this;
}
/**
* Get email
* @return email
**/
@JsonProperty("email")
@ApiModelProperty(example = "null", value = "")
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
/**
**/
public User password(String password) {
this.password = password;
return this;
}
/**
* Get password
* @return password
**/
@JsonProperty("password")
@ApiModelProperty(example = "null", value = "")
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
/**
**/
public User phone(String phone) {
this.phone = phone;
return this;
}
/**
* Get phone
* @return phone
**/
@JsonProperty("phone")
@ApiModelProperty(example = "null", value = "")
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
/**
* User Status
**/
public User userStatus(Integer userStatus) {
this.userStatus = userStatus;
return this;
}
/**
* User Status
* @return userStatus
**/
@JsonProperty("userStatus")
@ApiModelProperty(example = "null", value = "User Status")
public Integer getUserStatus() {
return userStatus;
}
public void setUserStatus(Integer userStatus) {
this.userStatus = userStatus;
}
@Override
public boolean equals(java.lang.Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
@@ -207,14 +157,14 @@ public class User {
return false;
}
User user = (User) o;
return Objects.equals(this.id, user.id) &&
Objects.equals(this.username, user.username) &&
Objects.equals(this.firstName, user.firstName) &&
Objects.equals(this.lastName, user.lastName) &&
Objects.equals(this.email, user.email) &&
Objects.equals(this.password, user.password) &&
Objects.equals(this.phone, user.phone) &&
Objects.equals(this.userStatus, user.userStatus);
return Objects.equals(id, user.id) &&
Objects.equals(username, user.username) &&
Objects.equals(firstName, user.firstName) &&
Objects.equals(lastName, user.lastName) &&
Objects.equals(email, user.email) &&
Objects.equals(password, user.password) &&
Objects.equals(phone, user.phone) &&
Objects.equals(userStatus, user.userStatus);
}
@Override
@@ -222,7 +172,6 @@ public class User {
return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -244,11 +193,10 @@ public class User {
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -375,8 +375,8 @@
"description" : "ID of pet that needs to be fetched",
"required" : true,
"type" : "integer",
"maximum" : 5.0,
"minimum" : 1.0,
"maximum" : 5,
"minimum" : 1,
"format" : "int64"
} ],
"responses" : {
@@ -736,16 +736,16 @@
"description" : "None",
"required" : false,
"type" : "integer",
"maximum" : 100.0,
"minimum" : 10.0
"maximum" : 100,
"minimum" : 10
}, {
"name" : "int32",
"in" : "formData",
"description" : "None",
"required" : false,
"type" : "integer",
"maximum" : 200.0,
"minimum" : 20.0,
"maximum" : 200,
"minimum" : 20,
"format" : "int32"
}, {
"name" : "int64",
@@ -760,15 +760,15 @@
"description" : "None",
"required" : true,
"type" : "number",
"maximum" : 543.2,
"minimum" : 32.1
"maximum" : 543.200000000000045474735088646411895751953125,
"minimum" : 32.10000000000000142108547152020037174224853515625
}, {
"name" : "float",
"in" : "formData",
"description" : "None",
"required" : false,
"type" : "number",
"maximum" : 987.6,
"maximum" : 987.6000000000000227373675443232059478759765625,
"format" : "float"
}, {
"name" : "double",
@@ -776,8 +776,8 @@
"description" : "None",
"required" : true,
"type" : "number",
"maximum" : 123.4,
"minimum" : 67.8,
"maximum" : 123.400000000000005684341886080801486968994140625,
"minimum" : 67.7999999999999971578290569595992565155029296875,
"format" : "double"
}, {
"name" : "string",