mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-11 10:52:42 +00:00
feat: Support useSingleRequestParameter feature for java microprofile client generation (#17072)
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
package org.openapitools.client.api;
|
||||
|
||||
import jakarta.ws.rs.core.Response;
|
||||
|
||||
public class ApiException extends Exception {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private Response response;
|
||||
|
||||
public ApiException() {
|
||||
super();
|
||||
}
|
||||
|
||||
public ApiException(Response response) {
|
||||
super("Api response has status code " + response.getStatus());
|
||||
this.response = response;
|
||||
}
|
||||
|
||||
public Response getResponse() {
|
||||
return this.response;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
package org.openapitools.client.api;
|
||||
|
||||
import jakarta.ws.rs.core.MultivaluedMap;
|
||||
import jakarta.ws.rs.core.Response;
|
||||
import jakarta.ws.rs.ext.Provider;
|
||||
import org.eclipse.microprofile.rest.client.ext.ResponseExceptionMapper;
|
||||
|
||||
@Provider
|
||||
public class ApiExceptionMapper
|
||||
implements ResponseExceptionMapper<ApiException> {
|
||||
|
||||
@Override
|
||||
public boolean handles(int status, MultivaluedMap<String, Object> headers) {
|
||||
return status >= 400;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ApiException toThrowable(Response response) {
|
||||
return new ApiException(response);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,312 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
package org.openapitools.client.api;
|
||||
|
||||
import java.io.File;
|
||||
import org.openapitools.client.model.ModelApiResponse;
|
||||
import org.openapitools.client.model.Pet;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import jakarta.ws.rs.*;
|
||||
import jakarta.ws.rs.core.Response;
|
||||
import jakarta.ws.rs.core.MediaType;
|
||||
import org.apache.cxf.jaxrs.ext.multipart.*;
|
||||
|
||||
|
||||
import org.eclipse.microprofile.rest.client.annotation.RegisterProvider;
|
||||
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;
|
||||
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* <p>This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
*/
|
||||
|
||||
@RegisterRestClient(configKey="petstore")
|
||||
@RegisterProvider(ApiExceptionMapper.class)
|
||||
@Path("/pet")
|
||||
public interface PetApi {
|
||||
|
||||
/**
|
||||
* Add a new pet to the store
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
@POST
|
||||
|
||||
@Consumes({ "application/json", "application/xml" })
|
||||
@Produces({ "application/xml", "application/json" })
|
||||
Pet addPet(Pet pet) throws ApiException, ProcessingException;
|
||||
|
||||
/**
|
||||
* Deletes a pet
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
@DELETE
|
||||
@Path("/{petId}")
|
||||
void deletePet(@BeanParam DeletePetRequest request) throws ApiException, ProcessingException;
|
||||
public class DeletePetRequest {
|
||||
|
||||
private @HeaderParam("api_key") String apiKey;
|
||||
private @PathParam("petId") Long petId;
|
||||
|
||||
private DeletePetRequest() {
|
||||
}
|
||||
|
||||
public static DeletePetRequest newInstance() {
|
||||
return new DeletePetRequest();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set petId
|
||||
* @param petId Pet id to delete (required)
|
||||
* @return DeletePetRequest
|
||||
*/
|
||||
public DeletePetRequest petId(Long petId) {
|
||||
this.petId = petId;
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* Set apiKey
|
||||
* @param apiKey (optional)
|
||||
* @return DeletePetRequest
|
||||
*/
|
||||
public DeletePetRequest apiKey(String apiKey) {
|
||||
this.apiKey = apiKey;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds Pets by status
|
||||
*
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
*
|
||||
*/
|
||||
@GET
|
||||
@Path("/findByStatus")
|
||||
@Produces({ "application/xml", "application/json" })
|
||||
List<Pet> findPetsByStatus(@BeanParam FindPetsByStatusRequest request) throws ApiException, ProcessingException;
|
||||
public class FindPetsByStatusRequest {
|
||||
|
||||
private @QueryParam("status") List<String> status;
|
||||
|
||||
private FindPetsByStatusRequest() {
|
||||
}
|
||||
|
||||
public static FindPetsByStatusRequest newInstance() {
|
||||
return new FindPetsByStatusRequest();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set status
|
||||
* @param status Status values that need to be considered for filter (required)
|
||||
* @return FindPetsByStatusRequest
|
||||
*/
|
||||
public FindPetsByStatusRequest status(List<String> status) {
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds Pets by tags
|
||||
*
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
@Deprecated
|
||||
@GET
|
||||
@Path("/findByTags")
|
||||
@Produces({ "application/xml", "application/json" })
|
||||
List<Pet> findPetsByTags(@BeanParam FindPetsByTagsRequest request) throws ApiException, ProcessingException;
|
||||
public class FindPetsByTagsRequest {
|
||||
|
||||
private @QueryParam("tags") List<String> tags;
|
||||
|
||||
private FindPetsByTagsRequest() {
|
||||
}
|
||||
|
||||
public static FindPetsByTagsRequest newInstance() {
|
||||
return new FindPetsByTagsRequest();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set tags
|
||||
* @param tags Tags to filter by (required)
|
||||
* @return FindPetsByTagsRequest
|
||||
*/
|
||||
public FindPetsByTagsRequest tags(List<String> tags) {
|
||||
this.tags = tags;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Find pet by ID
|
||||
*
|
||||
* Returns a single pet
|
||||
*
|
||||
*/
|
||||
@GET
|
||||
@Path("/{petId}")
|
||||
@Produces({ "application/xml", "application/json" })
|
||||
Pet getPetById(@BeanParam GetPetByIdRequest request) throws ApiException, ProcessingException;
|
||||
public class GetPetByIdRequest {
|
||||
|
||||
private @PathParam("petId") Long petId;
|
||||
|
||||
private GetPetByIdRequest() {
|
||||
}
|
||||
|
||||
public static GetPetByIdRequest newInstance() {
|
||||
return new GetPetByIdRequest();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set petId
|
||||
* @param petId ID of pet to return (required)
|
||||
* @return GetPetByIdRequest
|
||||
*/
|
||||
public GetPetByIdRequest petId(Long petId) {
|
||||
this.petId = petId;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update an existing pet
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
@PUT
|
||||
|
||||
@Consumes({ "application/json", "application/xml" })
|
||||
@Produces({ "application/xml", "application/json" })
|
||||
Pet updatePet(Pet pet) throws ApiException, ProcessingException;
|
||||
|
||||
/**
|
||||
* Updates a pet in the store with form data
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
@POST
|
||||
@Path("/{petId}")
|
||||
@Consumes({ "application/x-www-form-urlencoded" })
|
||||
void updatePetWithForm(@BeanParam UpdatePetWithFormRequest request) throws ApiException, ProcessingException;
|
||||
public class UpdatePetWithFormRequest {
|
||||
|
||||
private @PathParam("petId") Long petId;
|
||||
private @Multipart(value = "name", required = false) String name;
|
||||
private @Multipart(value = "status", required = false) String status;
|
||||
|
||||
private UpdatePetWithFormRequest() {
|
||||
}
|
||||
|
||||
public static UpdatePetWithFormRequest newInstance() {
|
||||
return new UpdatePetWithFormRequest();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set petId
|
||||
* @param petId ID of pet that needs to be updated (required)
|
||||
* @return UpdatePetWithFormRequest
|
||||
*/
|
||||
public UpdatePetWithFormRequest petId(Long petId) {
|
||||
this.petId = petId;
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* Set name
|
||||
* @param name Updated name of the pet (optional)
|
||||
* @return UpdatePetWithFormRequest
|
||||
*/
|
||||
public UpdatePetWithFormRequest name(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* Set status
|
||||
* @param status Updated status of the pet (optional)
|
||||
* @return UpdatePetWithFormRequest
|
||||
*/
|
||||
public UpdatePetWithFormRequest status(String status) {
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* uploads an image
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
@POST
|
||||
@Path("/{petId}/uploadImage")
|
||||
@Consumes({ "multipart/form-data" })
|
||||
@Produces({ "application/json" })
|
||||
ModelApiResponse uploadFile(@BeanParam UploadFileRequest request) throws ApiException, ProcessingException;
|
||||
public class UploadFileRequest {
|
||||
|
||||
private @PathParam("petId") Long petId;
|
||||
private @Multipart(value = "additionalMetadata", required = false) String additionalMetadata;
|
||||
private @Multipart(value = "file" , required = false) Attachment _fileDetail;
|
||||
|
||||
private UploadFileRequest() {
|
||||
}
|
||||
|
||||
public static UploadFileRequest newInstance() {
|
||||
return new UploadFileRequest();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set petId
|
||||
* @param petId ID of pet to update (required)
|
||||
* @return UploadFileRequest
|
||||
*/
|
||||
public UploadFileRequest petId(Long petId) {
|
||||
this.petId = petId;
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* Set additionalMetadata
|
||||
* @param additionalMetadata Additional data to pass to server (optional)
|
||||
* @return UploadFileRequest
|
||||
*/
|
||||
public UploadFileRequest additionalMetadata(String additionalMetadata) {
|
||||
this.additionalMetadata = additionalMetadata;
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* Set _fileDetail
|
||||
* @param _fileDetail file to upload (optional)
|
||||
* @return UploadFileRequest
|
||||
*/
|
||||
public UploadFileRequest _fileDetail( Attachment _fileDetail) {
|
||||
this._fileDetail = _fileDetail;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,128 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
package org.openapitools.client.api;
|
||||
|
||||
import org.openapitools.client.model.Order;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import jakarta.ws.rs.*;
|
||||
import jakarta.ws.rs.core.Response;
|
||||
import jakarta.ws.rs.core.MediaType;
|
||||
import org.apache.cxf.jaxrs.ext.multipart.*;
|
||||
|
||||
|
||||
import org.eclipse.microprofile.rest.client.annotation.RegisterProvider;
|
||||
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;
|
||||
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* <p>This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
*/
|
||||
|
||||
@RegisterRestClient(configKey="petstore")
|
||||
@RegisterProvider(ApiExceptionMapper.class)
|
||||
@Path("/store")
|
||||
public interface StoreApi {
|
||||
|
||||
/**
|
||||
* Delete purchase order by ID
|
||||
*
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
*
|
||||
*/
|
||||
@DELETE
|
||||
@Path("/order/{orderId}")
|
||||
void deleteOrder(@BeanParam DeleteOrderRequest request) throws ApiException, ProcessingException;
|
||||
public class DeleteOrderRequest {
|
||||
|
||||
private @PathParam("orderId") String orderId;
|
||||
|
||||
private DeleteOrderRequest() {
|
||||
}
|
||||
|
||||
public static DeleteOrderRequest newInstance() {
|
||||
return new DeleteOrderRequest();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set orderId
|
||||
* @param orderId ID of the order that needs to be deleted (required)
|
||||
* @return DeleteOrderRequest
|
||||
*/
|
||||
public DeleteOrderRequest orderId(String orderId) {
|
||||
this.orderId = orderId;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns pet inventories by status
|
||||
*
|
||||
* Returns a map of status codes to quantities
|
||||
*
|
||||
*/
|
||||
@GET
|
||||
@Path("/inventory")
|
||||
@Produces({ "application/json" })
|
||||
Map<String, Integer> getInventory() throws ApiException, ProcessingException;
|
||||
|
||||
/**
|
||||
* Find purchase order by ID
|
||||
*
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
||||
*
|
||||
*/
|
||||
@GET
|
||||
@Path("/order/{orderId}")
|
||||
@Produces({ "application/xml", "application/json" })
|
||||
Order getOrderById(@BeanParam GetOrderByIdRequest request) throws ApiException, ProcessingException;
|
||||
public class GetOrderByIdRequest {
|
||||
|
||||
private @PathParam("orderId") Long orderId;
|
||||
|
||||
private GetOrderByIdRequest() {
|
||||
}
|
||||
|
||||
public static GetOrderByIdRequest newInstance() {
|
||||
return new GetOrderByIdRequest();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set orderId
|
||||
* @param orderId ID of pet that needs to be fetched (required)
|
||||
* @return GetOrderByIdRequest
|
||||
*/
|
||||
public GetOrderByIdRequest orderId(Long orderId) {
|
||||
this.orderId = orderId;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Place an order for a pet
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
@POST
|
||||
@Path("/order")
|
||||
@Consumes({ "application/json" })
|
||||
@Produces({ "application/xml", "application/json" })
|
||||
Order placeOrder(Order order) throws ApiException, ProcessingException;
|
||||
}
|
||||
@@ -0,0 +1,223 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
package org.openapitools.client.api;
|
||||
|
||||
import java.util.Date;
|
||||
import org.openapitools.client.model.User;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import jakarta.ws.rs.*;
|
||||
import jakarta.ws.rs.core.Response;
|
||||
import jakarta.ws.rs.core.MediaType;
|
||||
import org.apache.cxf.jaxrs.ext.multipart.*;
|
||||
|
||||
|
||||
import org.eclipse.microprofile.rest.client.annotation.RegisterProvider;
|
||||
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;
|
||||
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* <p>This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
*/
|
||||
|
||||
@RegisterRestClient(configKey="petstore")
|
||||
@RegisterProvider(ApiExceptionMapper.class)
|
||||
@Path("/user")
|
||||
public interface UserApi {
|
||||
|
||||
/**
|
||||
* Create user
|
||||
*
|
||||
* This can only be done by the logged in user.
|
||||
*
|
||||
*/
|
||||
@POST
|
||||
|
||||
@Consumes({ "application/json" })
|
||||
void createUser(User user) throws ApiException, ProcessingException;
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
@POST
|
||||
@Path("/createWithArray")
|
||||
@Consumes({ "application/json" })
|
||||
void createUsersWithArrayInput(List<User> user) throws ApiException, ProcessingException;
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
@POST
|
||||
@Path("/createWithList")
|
||||
@Consumes({ "application/json" })
|
||||
void createUsersWithListInput(List<User> user) throws ApiException, ProcessingException;
|
||||
|
||||
/**
|
||||
* Delete user
|
||||
*
|
||||
* This can only be done by the logged in user.
|
||||
*
|
||||
*/
|
||||
@DELETE
|
||||
@Path("/{username}")
|
||||
void deleteUser(@BeanParam DeleteUserRequest request) throws ApiException, ProcessingException;
|
||||
public class DeleteUserRequest {
|
||||
|
||||
private @PathParam("username") String username;
|
||||
|
||||
private DeleteUserRequest() {
|
||||
}
|
||||
|
||||
public static DeleteUserRequest newInstance() {
|
||||
return new DeleteUserRequest();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set username
|
||||
* @param username The name that needs to be deleted (required)
|
||||
* @return DeleteUserRequest
|
||||
*/
|
||||
public DeleteUserRequest username(String username) {
|
||||
this.username = username;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user by user name
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
@GET
|
||||
@Path("/{username}")
|
||||
@Produces({ "application/xml", "application/json" })
|
||||
User getUserByName(@BeanParam GetUserByNameRequest request) throws ApiException, ProcessingException;
|
||||
public class GetUserByNameRequest {
|
||||
|
||||
private @PathParam("username") String username;
|
||||
|
||||
private GetUserByNameRequest() {
|
||||
}
|
||||
|
||||
public static GetUserByNameRequest newInstance() {
|
||||
return new GetUserByNameRequest();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set username
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @return GetUserByNameRequest
|
||||
*/
|
||||
public GetUserByNameRequest username(String username) {
|
||||
this.username = username;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs user into the system
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
@GET
|
||||
@Path("/login")
|
||||
@Produces({ "application/xml", "application/json" })
|
||||
String loginUser(@BeanParam LoginUserRequest request) throws ApiException, ProcessingException;
|
||||
public class LoginUserRequest {
|
||||
|
||||
private @QueryParam("username") String username;
|
||||
private @QueryParam("password") String password;
|
||||
|
||||
private LoginUserRequest() {
|
||||
}
|
||||
|
||||
public static LoginUserRequest newInstance() {
|
||||
return new LoginUserRequest();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set username
|
||||
* @param username The user name for login (required)
|
||||
* @return LoginUserRequest
|
||||
*/
|
||||
public LoginUserRequest username(String username) {
|
||||
this.username = username;
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* Set password
|
||||
* @param password The password for login in clear text (required)
|
||||
* @return LoginUserRequest
|
||||
*/
|
||||
public LoginUserRequest password(String password) {
|
||||
this.password = password;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs out current logged in user session
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
@GET
|
||||
@Path("/logout")
|
||||
void logoutUser() throws ApiException, ProcessingException;
|
||||
|
||||
/**
|
||||
* Updated user
|
||||
*
|
||||
* This can only be done by the logged in user.
|
||||
*
|
||||
*/
|
||||
@PUT
|
||||
@Path("/{username}")
|
||||
@Consumes({ "application/json" })
|
||||
void updateUser(@BeanParam UpdateUserRequest request, User user) throws ApiException, ProcessingException;
|
||||
public class UpdateUserRequest {
|
||||
|
||||
private @PathParam("username") String username;
|
||||
|
||||
private UpdateUserRequest() {
|
||||
}
|
||||
|
||||
public static UpdateUserRequest newInstance() {
|
||||
return new UpdateUserRequest();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set username
|
||||
* @param username name that need to be deleted (required)
|
||||
* @return UpdateUserRequest
|
||||
*/
|
||||
public UpdateUserRequest username(String username) {
|
||||
this.username = username;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import jakarta.json.bind.annotation.JsonbTypeDeserializer;
|
||||
import jakarta.json.bind.annotation.JsonbTypeSerializer;
|
||||
import jakarta.json.bind.serializer.DeserializationContext;
|
||||
import jakarta.json.bind.serializer.JsonbDeserializer;
|
||||
import jakarta.json.bind.serializer.JsonbSerializer;
|
||||
import jakarta.json.bind.serializer.SerializationContext;
|
||||
import jakarta.json.stream.JsonGenerator;
|
||||
import jakarta.json.stream.JsonParser;
|
||||
import jakarta.json.bind.annotation.JsonbProperty;
|
||||
|
||||
/**
|
||||
* A category for a pet
|
||||
**/
|
||||
|
||||
public class Category {
|
||||
|
||||
@JsonbProperty("id")
|
||||
private Long id;
|
||||
|
||||
@JsonbProperty("name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* Get id
|
||||
* @return id
|
||||
**/
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set id
|
||||
**/
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Category id(Long id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get name
|
||||
* @return name
|
||||
**/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set name
|
||||
**/
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Category name(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Create a string representation of this pojo.
|
||||
**/
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Category {\n");
|
||||
|
||||
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private static String toIndentedString(Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import jakarta.json.bind.annotation.JsonbTypeDeserializer;
|
||||
import jakarta.json.bind.annotation.JsonbTypeSerializer;
|
||||
import jakarta.json.bind.serializer.DeserializationContext;
|
||||
import jakarta.json.bind.serializer.JsonbDeserializer;
|
||||
import jakarta.json.bind.serializer.JsonbSerializer;
|
||||
import jakarta.json.bind.serializer.SerializationContext;
|
||||
import jakarta.json.stream.JsonGenerator;
|
||||
import jakarta.json.stream.JsonParser;
|
||||
import jakarta.json.bind.annotation.JsonbProperty;
|
||||
|
||||
/**
|
||||
* Describes the result of uploading an image resource
|
||||
**/
|
||||
|
||||
public class ModelApiResponse {
|
||||
|
||||
@JsonbProperty("code")
|
||||
private Integer code;
|
||||
|
||||
@JsonbProperty("type")
|
||||
private String type;
|
||||
|
||||
@JsonbProperty("message")
|
||||
private String message;
|
||||
|
||||
/**
|
||||
* Get code
|
||||
* @return code
|
||||
**/
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set code
|
||||
**/
|
||||
public void setCode(Integer code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public ModelApiResponse code(Integer code) {
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get type
|
||||
* @return type
|
||||
**/
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set type
|
||||
**/
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public ModelApiResponse type(String type) {
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get message
|
||||
* @return message
|
||||
**/
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set message
|
||||
**/
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public ModelApiResponse message(String message) {
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Create a string representation of this pojo.
|
||||
**/
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class ModelApiResponse {\n");
|
||||
|
||||
sb.append(" code: ").append(toIndentedString(code)).append("\n");
|
||||
sb.append(" type: ").append(toIndentedString(type)).append("\n");
|
||||
sb.append(" message: ").append(toIndentedString(message)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private static String toIndentedString(Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,245 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import java.util.Date;
|
||||
import java.lang.reflect.Type;
|
||||
import jakarta.json.bind.annotation.JsonbTypeDeserializer;
|
||||
import jakarta.json.bind.annotation.JsonbTypeSerializer;
|
||||
import jakarta.json.bind.serializer.DeserializationContext;
|
||||
import jakarta.json.bind.serializer.JsonbDeserializer;
|
||||
import jakarta.json.bind.serializer.JsonbSerializer;
|
||||
import jakarta.json.bind.serializer.SerializationContext;
|
||||
import jakarta.json.stream.JsonGenerator;
|
||||
import jakarta.json.stream.JsonParser;
|
||||
import jakarta.json.bind.annotation.JsonbProperty;
|
||||
|
||||
/**
|
||||
* An order for a pets from the pet store
|
||||
**/
|
||||
|
||||
public class Order {
|
||||
|
||||
@JsonbProperty("id")
|
||||
private Long id;
|
||||
|
||||
@JsonbProperty("petId")
|
||||
private Long petId;
|
||||
|
||||
@JsonbProperty("quantity")
|
||||
private Integer quantity;
|
||||
|
||||
@JsonbProperty("shipDate")
|
||||
private Date shipDate;
|
||||
|
||||
@JsonbTypeSerializer(StatusEnum.Serializer.class)
|
||||
@JsonbTypeDeserializer(StatusEnum.Deserializer.class)
|
||||
public enum StatusEnum {
|
||||
|
||||
PLACED(String.valueOf("placed")), APPROVED(String.valueOf("approved")), DELIVERED(String.valueOf("delivered"));
|
||||
|
||||
|
||||
String value;
|
||||
|
||||
StatusEnum (String v) {
|
||||
value = v;
|
||||
}
|
||||
|
||||
public String value() {
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.valueOf(value);
|
||||
}
|
||||
|
||||
public static final class Deserializer implements JsonbDeserializer<StatusEnum> {
|
||||
@Override
|
||||
public StatusEnum deserialize(JsonParser parser, DeserializationContext ctx, Type rtType) {
|
||||
for (StatusEnum b : StatusEnum.values()) {
|
||||
if (String.valueOf(b.value).equals(parser.getString())) {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("Unexpected value '" + parser.getString() + "'");
|
||||
}
|
||||
}
|
||||
|
||||
public static final class Serializer implements JsonbSerializer<StatusEnum> {
|
||||
@Override
|
||||
public void serialize(StatusEnum obj, JsonGenerator generator, SerializationContext ctx) {
|
||||
generator.write(obj.value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Order Status
|
||||
**/
|
||||
@JsonbProperty("status")
|
||||
private StatusEnum status;
|
||||
|
||||
@JsonbProperty("complete")
|
||||
private Boolean complete = false;
|
||||
|
||||
/**
|
||||
* Get id
|
||||
* @return id
|
||||
**/
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set id
|
||||
**/
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Order id(Long id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get petId
|
||||
* @return petId
|
||||
**/
|
||||
public Long getPetId() {
|
||||
return petId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set petId
|
||||
**/
|
||||
public void setPetId(Long petId) {
|
||||
this.petId = petId;
|
||||
}
|
||||
|
||||
public Order petId(Long petId) {
|
||||
this.petId = petId;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get quantity
|
||||
* @return quantity
|
||||
**/
|
||||
public Integer getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set quantity
|
||||
**/
|
||||
public void setQuantity(Integer quantity) {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public Order quantity(Integer quantity) {
|
||||
this.quantity = quantity;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get shipDate
|
||||
* @return shipDate
|
||||
**/
|
||||
public Date getShipDate() {
|
||||
return shipDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set shipDate
|
||||
**/
|
||||
public void setShipDate(Date shipDate) {
|
||||
this.shipDate = shipDate;
|
||||
}
|
||||
|
||||
public Order shipDate(Date shipDate) {
|
||||
this.shipDate = shipDate;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Order Status
|
||||
* @return status
|
||||
**/
|
||||
public StatusEnum getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set status
|
||||
**/
|
||||
public void setStatus(StatusEnum status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Order status(StatusEnum status) {
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get complete
|
||||
* @return complete
|
||||
**/
|
||||
public Boolean getComplete() {
|
||||
return complete;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set complete
|
||||
**/
|
||||
public void setComplete(Boolean complete) {
|
||||
this.complete = complete;
|
||||
}
|
||||
|
||||
public Order complete(Boolean complete) {
|
||||
this.complete = complete;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Create a string representation of this pojo.
|
||||
**/
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Order {\n");
|
||||
|
||||
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
||||
sb.append(" petId: ").append(toIndentedString(petId)).append("\n");
|
||||
sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n");
|
||||
sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n");
|
||||
sb.append(" status: ").append(toIndentedString(status)).append("\n");
|
||||
sb.append(" complete: ").append(toIndentedString(complete)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private static String toIndentedString(Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,267 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import org.openapitools.client.model.Category;
|
||||
import org.openapitools.client.model.Tag;
|
||||
import java.lang.reflect.Type;
|
||||
import jakarta.json.bind.annotation.JsonbTypeDeserializer;
|
||||
import jakarta.json.bind.annotation.JsonbTypeSerializer;
|
||||
import jakarta.json.bind.serializer.DeserializationContext;
|
||||
import jakarta.json.bind.serializer.JsonbDeserializer;
|
||||
import jakarta.json.bind.serializer.JsonbSerializer;
|
||||
import jakarta.json.bind.serializer.SerializationContext;
|
||||
import jakarta.json.stream.JsonGenerator;
|
||||
import jakarta.json.stream.JsonParser;
|
||||
import jakarta.json.bind.annotation.JsonbProperty;
|
||||
|
||||
/**
|
||||
* A pet for sale in the pet store
|
||||
**/
|
||||
|
||||
public class Pet {
|
||||
|
||||
@JsonbProperty("id")
|
||||
private Long id;
|
||||
|
||||
@JsonbProperty("category")
|
||||
private Category category;
|
||||
|
||||
@JsonbProperty("name")
|
||||
private String name;
|
||||
|
||||
@JsonbProperty("photoUrls")
|
||||
private List<String> photoUrls = new ArrayList<>();
|
||||
|
||||
@JsonbProperty("tags")
|
||||
private List<Tag> tags = null;
|
||||
|
||||
@JsonbTypeSerializer(StatusEnum.Serializer.class)
|
||||
@JsonbTypeDeserializer(StatusEnum.Deserializer.class)
|
||||
public enum StatusEnum {
|
||||
|
||||
AVAILABLE(String.valueOf("available")), PENDING(String.valueOf("pending")), SOLD(String.valueOf("sold"));
|
||||
|
||||
|
||||
String value;
|
||||
|
||||
StatusEnum (String v) {
|
||||
value = v;
|
||||
}
|
||||
|
||||
public String value() {
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.valueOf(value);
|
||||
}
|
||||
|
||||
public static final class Deserializer implements JsonbDeserializer<StatusEnum> {
|
||||
@Override
|
||||
public StatusEnum deserialize(JsonParser parser, DeserializationContext ctx, Type rtType) {
|
||||
for (StatusEnum b : StatusEnum.values()) {
|
||||
if (String.valueOf(b.value).equals(parser.getString())) {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("Unexpected value '" + parser.getString() + "'");
|
||||
}
|
||||
}
|
||||
|
||||
public static final class Serializer implements JsonbSerializer<StatusEnum> {
|
||||
@Override
|
||||
public void serialize(StatusEnum obj, JsonGenerator generator, SerializationContext ctx) {
|
||||
generator.write(obj.value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* pet status in the store
|
||||
**/
|
||||
@JsonbProperty("status")
|
||||
private StatusEnum status;
|
||||
|
||||
/**
|
||||
* Get id
|
||||
* @return id
|
||||
**/
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set id
|
||||
**/
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Pet id(Long id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get category
|
||||
* @return category
|
||||
**/
|
||||
public Category getCategory() {
|
||||
return category;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set category
|
||||
**/
|
||||
public void setCategory(Category category) {
|
||||
this.category = category;
|
||||
}
|
||||
|
||||
public Pet category(Category category) {
|
||||
this.category = category;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get name
|
||||
* @return name
|
||||
**/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set name
|
||||
**/
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Pet name(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get photoUrls
|
||||
* @return photoUrls
|
||||
**/
|
||||
public List<String> getPhotoUrls() {
|
||||
return photoUrls;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set photoUrls
|
||||
**/
|
||||
public void setPhotoUrls(List<String> photoUrls) {
|
||||
this.photoUrls = photoUrls;
|
||||
}
|
||||
|
||||
public Pet photoUrls(List<String> photoUrls) {
|
||||
this.photoUrls = photoUrls;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Pet addPhotoUrlsItem(String photoUrlsItem) {
|
||||
if (this.photoUrls == null) {
|
||||
this.photoUrls = new ArrayList<>();
|
||||
}
|
||||
this.photoUrls.add(photoUrlsItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get tags
|
||||
* @return tags
|
||||
**/
|
||||
public List<Tag> getTags() {
|
||||
return tags;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set tags
|
||||
**/
|
||||
public void setTags(List<Tag> tags) {
|
||||
this.tags = tags;
|
||||
}
|
||||
|
||||
public Pet tags(List<Tag> tags) {
|
||||
this.tags = tags;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Pet addTagsItem(Tag tagsItem) {
|
||||
if (this.tags == null) {
|
||||
this.tags = new ArrayList<>();
|
||||
}
|
||||
this.tags.add(tagsItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* pet status in the store
|
||||
* @return status
|
||||
* @deprecated
|
||||
**/
|
||||
@Deprecated
|
||||
public StatusEnum getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set status
|
||||
**/
|
||||
public void setStatus(StatusEnum status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Pet status(StatusEnum status) {
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Create a string representation of this pojo.
|
||||
**/
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Pet {\n");
|
||||
|
||||
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
||||
sb.append(" category: ").append(toIndentedString(category)).append("\n");
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n");
|
||||
sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
|
||||
sb.append(" status: ").append(toIndentedString(status)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private static String toIndentedString(Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import jakarta.json.bind.annotation.JsonbTypeDeserializer;
|
||||
import jakarta.json.bind.annotation.JsonbTypeSerializer;
|
||||
import jakarta.json.bind.serializer.DeserializationContext;
|
||||
import jakarta.json.bind.serializer.JsonbDeserializer;
|
||||
import jakarta.json.bind.serializer.JsonbSerializer;
|
||||
import jakarta.json.bind.serializer.SerializationContext;
|
||||
import jakarta.json.stream.JsonGenerator;
|
||||
import jakarta.json.stream.JsonParser;
|
||||
import jakarta.json.bind.annotation.JsonbProperty;
|
||||
|
||||
/**
|
||||
* A tag for a pet
|
||||
**/
|
||||
|
||||
public class Tag {
|
||||
|
||||
@JsonbProperty("id")
|
||||
private Long id;
|
||||
|
||||
@JsonbProperty("name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* Get id
|
||||
* @return id
|
||||
**/
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set id
|
||||
**/
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Tag id(Long id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get name
|
||||
* @return name
|
||||
**/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set name
|
||||
**/
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Tag name(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Create a string representation of this pojo.
|
||||
**/
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Tag {\n");
|
||||
|
||||
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private static String toIndentedString(Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,250 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import jakarta.json.bind.annotation.JsonbTypeDeserializer;
|
||||
import jakarta.json.bind.annotation.JsonbTypeSerializer;
|
||||
import jakarta.json.bind.serializer.DeserializationContext;
|
||||
import jakarta.json.bind.serializer.JsonbDeserializer;
|
||||
import jakarta.json.bind.serializer.JsonbSerializer;
|
||||
import jakarta.json.bind.serializer.SerializationContext;
|
||||
import jakarta.json.stream.JsonGenerator;
|
||||
import jakarta.json.stream.JsonParser;
|
||||
import jakarta.json.bind.annotation.JsonbProperty;
|
||||
|
||||
/**
|
||||
* A User who is purchasing from the pet store
|
||||
**/
|
||||
|
||||
public class User {
|
||||
|
||||
@JsonbProperty("id")
|
||||
private Long id;
|
||||
|
||||
@JsonbProperty("username")
|
||||
private String username;
|
||||
|
||||
@JsonbProperty("firstName")
|
||||
private String firstName;
|
||||
|
||||
@JsonbProperty("lastName")
|
||||
private String lastName;
|
||||
|
||||
@JsonbProperty("email")
|
||||
private String email;
|
||||
|
||||
@JsonbProperty("password")
|
||||
private String password;
|
||||
|
||||
@JsonbProperty("phone")
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* User Status
|
||||
**/
|
||||
@JsonbProperty("userStatus")
|
||||
private Integer userStatus;
|
||||
|
||||
/**
|
||||
* Get id
|
||||
* @return id
|
||||
**/
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set id
|
||||
**/
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public User id(Long id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get username
|
||||
* @return username
|
||||
**/
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set username
|
||||
**/
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public User username(String username) {
|
||||
this.username = username;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get firstName
|
||||
* @return firstName
|
||||
**/
|
||||
public String getFirstName() {
|
||||
return firstName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set firstName
|
||||
**/
|
||||
public void setFirstName(String firstName) {
|
||||
this.firstName = firstName;
|
||||
}
|
||||
|
||||
public User firstName(String firstName) {
|
||||
this.firstName = firstName;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get lastName
|
||||
* @return lastName
|
||||
**/
|
||||
public String getLastName() {
|
||||
return lastName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set lastName
|
||||
**/
|
||||
public void setLastName(String lastName) {
|
||||
this.lastName = lastName;
|
||||
}
|
||||
|
||||
public User lastName(String lastName) {
|
||||
this.lastName = lastName;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get email
|
||||
* @return email
|
||||
**/
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set email
|
||||
**/
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
public User email(String email) {
|
||||
this.email = email;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get password
|
||||
* @return password
|
||||
**/
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set password
|
||||
**/
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public User password(String password) {
|
||||
this.password = password;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get phone
|
||||
* @return phone
|
||||
**/
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set phone
|
||||
**/
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public User phone(String phone) {
|
||||
this.phone = phone;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* User Status
|
||||
* @return userStatus
|
||||
**/
|
||||
public Integer getUserStatus() {
|
||||
return userStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set userStatus
|
||||
**/
|
||||
public void setUserStatus(Integer userStatus) {
|
||||
this.userStatus = userStatus;
|
||||
}
|
||||
|
||||
public User userStatus(Integer userStatus) {
|
||||
this.userStatus = userStatus;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Create a string representation of this pojo.
|
||||
**/
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class User {\n");
|
||||
|
||||
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
||||
sb.append(" username: ").append(toIndentedString(username)).append("\n");
|
||||
sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n");
|
||||
sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n");
|
||||
sb.append(" email: ").append(toIndentedString(email)).append("\n");
|
||||
sb.append(" password: ").append(toIndentedString(password)).append("\n");
|
||||
sb.append(" phone: ").append(toIndentedString(phone)).append("\n");
|
||||
sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private static String toIndentedString(Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,198 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.api;
|
||||
|
||||
import java.io.File;
|
||||
import org.openapitools.client.model.ModelApiResponse;
|
||||
import org.openapitools.client.model.Pet;
|
||||
import org.junit.Test;
|
||||
import org.junit.Before;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import org.eclipse.microprofile.rest.client.RestClientBuilder;
|
||||
|
||||
import java.net.URL;
|
||||
import java.net.MalformedURLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* OpenAPI Petstore Test
|
||||
*
|
||||
* API tests for PetApi
|
||||
*/
|
||||
public class PetApiTest {
|
||||
|
||||
private PetApi client;
|
||||
private String baseUrl = "http://localhost:9080";
|
||||
|
||||
@Before
|
||||
public void setup() throws MalformedURLException {
|
||||
// TODO initialize the client
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add a new pet to the store
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void addPetTest() {
|
||||
// TODO: test validations
|
||||
Pet pet = null;
|
||||
//Pet response = api.addPet(pet);
|
||||
//assertNotNull(response);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a pet
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void deletePetTest() {
|
||||
// TODO: test validations
|
||||
Long petId = null;
|
||||
String apiKey = null;
|
||||
//api.deletePet(petId, apiKey);
|
||||
//assertNotNull(response);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds Pets by status
|
||||
*
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void findPetsByStatusTest() {
|
||||
// TODO: test validations
|
||||
List<String> status = null;
|
||||
//List<Pet> response = api.findPetsByStatus(status);
|
||||
//assertNotNull(response);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds Pets by tags
|
||||
*
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void findPetsByTagsTest() {
|
||||
// TODO: test validations
|
||||
List<String> tags = null;
|
||||
//List<Pet> response = api.findPetsByTags(tags);
|
||||
//assertNotNull(response);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Find pet by ID
|
||||
*
|
||||
* Returns a single pet
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void getPetByIdTest() {
|
||||
// TODO: test validations
|
||||
Long petId = null;
|
||||
//Pet response = api.getPetById(petId);
|
||||
//assertNotNull(response);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Update an existing pet
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void updatePetTest() {
|
||||
// TODO: test validations
|
||||
Pet pet = null;
|
||||
//Pet response = api.updatePet(pet);
|
||||
//assertNotNull(response);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a pet in the store with form data
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void updatePetWithFormTest() {
|
||||
// TODO: test validations
|
||||
Long petId = null;
|
||||
String name = null;
|
||||
String status = null;
|
||||
//api.updatePetWithForm(petId, name, status);
|
||||
//assertNotNull(response);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* uploads an image
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void uploadFileTest() {
|
||||
// TODO: test validations
|
||||
Long petId = null;
|
||||
String additionalMetadata = null;
|
||||
org.apache.cxf.jaxrs.ext.multipart.Attachment _file = null;
|
||||
//ModelApiResponse response = api.uploadFile(petId, additionalMetadata, _file);
|
||||
//assertNotNull(response);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.api;
|
||||
|
||||
import org.openapitools.client.model.Order;
|
||||
import org.junit.Test;
|
||||
import org.junit.Before;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import org.eclipse.microprofile.rest.client.RestClientBuilder;
|
||||
|
||||
import java.net.URL;
|
||||
import java.net.MalformedURLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* OpenAPI Petstore Test
|
||||
*
|
||||
* API tests for StoreApi
|
||||
*/
|
||||
public class StoreApiTest {
|
||||
|
||||
private StoreApi client;
|
||||
private String baseUrl = "http://localhost:9080";
|
||||
|
||||
@Before
|
||||
public void setup() throws MalformedURLException {
|
||||
// TODO initialize the client
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Delete purchase order by ID
|
||||
*
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void deleteOrderTest() {
|
||||
// TODO: test validations
|
||||
String orderId = null;
|
||||
//api.deleteOrder(orderId);
|
||||
//assertNotNull(response);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns pet inventories by status
|
||||
*
|
||||
* Returns a map of status codes to quantities
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void getInventoryTest() {
|
||||
// TODO: test validations
|
||||
//Map<String, Integer> response = api.getInventory();
|
||||
//assertNotNull(response);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Find purchase order by ID
|
||||
*
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void getOrderByIdTest() {
|
||||
// TODO: test validations
|
||||
Long orderId = null;
|
||||
//Order response = api.getOrderById(orderId);
|
||||
//assertNotNull(response);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Place an order for a pet
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void placeOrderTest() {
|
||||
// TODO: test validations
|
||||
Order order = null;
|
||||
//Order response = api.placeOrder(order);
|
||||
//assertNotNull(response);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,193 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.api;
|
||||
|
||||
import java.util.Date;
|
||||
import org.openapitools.client.model.User;
|
||||
import org.junit.Test;
|
||||
import org.junit.Before;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import org.eclipse.microprofile.rest.client.RestClientBuilder;
|
||||
|
||||
import java.net.URL;
|
||||
import java.net.MalformedURLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* OpenAPI Petstore Test
|
||||
*
|
||||
* API tests for UserApi
|
||||
*/
|
||||
public class UserApiTest {
|
||||
|
||||
private UserApi client;
|
||||
private String baseUrl = "http://localhost:9080";
|
||||
|
||||
@Before
|
||||
public void setup() throws MalformedURLException {
|
||||
// TODO initialize the client
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Create user
|
||||
*
|
||||
* This can only be done by the logged in user.
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void createUserTest() {
|
||||
// TODO: test validations
|
||||
User user = null;
|
||||
//api.createUser(user);
|
||||
//assertNotNull(response);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void createUsersWithArrayInputTest() {
|
||||
// TODO: test validations
|
||||
List<User> user = null;
|
||||
//api.createUsersWithArrayInput(user);
|
||||
//assertNotNull(response);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void createUsersWithListInputTest() {
|
||||
// TODO: test validations
|
||||
List<User> user = null;
|
||||
//api.createUsersWithListInput(user);
|
||||
//assertNotNull(response);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete user
|
||||
*
|
||||
* This can only be done by the logged in user.
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void deleteUserTest() {
|
||||
// TODO: test validations
|
||||
String username = null;
|
||||
//api.deleteUser(username);
|
||||
//assertNotNull(response);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user by user name
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void getUserByNameTest() {
|
||||
// TODO: test validations
|
||||
String username = null;
|
||||
//User response = api.getUserByName(username);
|
||||
//assertNotNull(response);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs user into the system
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void loginUserTest() {
|
||||
// TODO: test validations
|
||||
String username = null;
|
||||
String password = null;
|
||||
//String response = api.loginUser(username, password);
|
||||
//assertNotNull(response);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs out current logged in user session
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void logoutUserTest() {
|
||||
// TODO: test validations
|
||||
//api.logoutUser();
|
||||
//assertNotNull(response);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Updated user
|
||||
*
|
||||
* This can only be done by the logged in user.
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void updateUserTest() {
|
||||
// TODO: test validations
|
||||
String username = null;
|
||||
User user = null;
|
||||
//api.updateUser(username, user);
|
||||
//assertNotNull(response);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* Model tests for Category
|
||||
*/
|
||||
public class CategoryTest {
|
||||
private final Category model = new Category();
|
||||
|
||||
/**
|
||||
* Model tests for Category
|
||||
*/
|
||||
@Test
|
||||
public void testCategory() {
|
||||
// TODO: test Category
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'id'
|
||||
*/
|
||||
@Test
|
||||
public void idTest() {
|
||||
// TODO: test id
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'name'
|
||||
*/
|
||||
@Test
|
||||
public void nameTest() {
|
||||
// TODO: test name
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* Model tests for ModelApiResponse
|
||||
*/
|
||||
public class ModelApiResponseTest {
|
||||
private final ModelApiResponse model = new ModelApiResponse();
|
||||
|
||||
/**
|
||||
* Model tests for ModelApiResponse
|
||||
*/
|
||||
@Test
|
||||
public void testModelApiResponse() {
|
||||
// TODO: test ModelApiResponse
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'code'
|
||||
*/
|
||||
@Test
|
||||
public void codeTest() {
|
||||
// TODO: test code
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'type'
|
||||
*/
|
||||
@Test
|
||||
public void typeTest() {
|
||||
// TODO: test type
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'message'
|
||||
*/
|
||||
@Test
|
||||
public void messageTest() {
|
||||
// TODO: test message
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import java.util.Date;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* Model tests for Order
|
||||
*/
|
||||
public class OrderTest {
|
||||
private final Order model = new Order();
|
||||
|
||||
/**
|
||||
* Model tests for Order
|
||||
*/
|
||||
@Test
|
||||
public void testOrder() {
|
||||
// TODO: test Order
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'id'
|
||||
*/
|
||||
@Test
|
||||
public void idTest() {
|
||||
// TODO: test id
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'petId'
|
||||
*/
|
||||
@Test
|
||||
public void petIdTest() {
|
||||
// TODO: test petId
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'quantity'
|
||||
*/
|
||||
@Test
|
||||
public void quantityTest() {
|
||||
// TODO: test quantity
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'shipDate'
|
||||
*/
|
||||
@Test
|
||||
public void shipDateTest() {
|
||||
// TODO: test shipDate
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'status'
|
||||
*/
|
||||
@Test
|
||||
public void statusTest() {
|
||||
// TODO: test status
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'complete'
|
||||
*/
|
||||
@Test
|
||||
public void completeTest() {
|
||||
// TODO: test complete
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import org.openapitools.client.model.Category;
|
||||
import org.openapitools.client.model.Tag;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* Model tests for Pet
|
||||
*/
|
||||
public class PetTest {
|
||||
private final Pet model = new Pet();
|
||||
|
||||
/**
|
||||
* Model tests for Pet
|
||||
*/
|
||||
@Test
|
||||
public void testPet() {
|
||||
// TODO: test Pet
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'id'
|
||||
*/
|
||||
@Test
|
||||
public void idTest() {
|
||||
// TODO: test id
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'category'
|
||||
*/
|
||||
@Test
|
||||
public void categoryTest() {
|
||||
// TODO: test category
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'name'
|
||||
*/
|
||||
@Test
|
||||
public void nameTest() {
|
||||
// TODO: test name
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'photoUrls'
|
||||
*/
|
||||
@Test
|
||||
public void photoUrlsTest() {
|
||||
// TODO: test photoUrls
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'tags'
|
||||
*/
|
||||
@Test
|
||||
public void tagsTest() {
|
||||
// TODO: test tags
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'status'
|
||||
*/
|
||||
@Test
|
||||
public void statusTest() {
|
||||
// TODO: test status
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* Model tests for Tag
|
||||
*/
|
||||
public class TagTest {
|
||||
private final Tag model = new Tag();
|
||||
|
||||
/**
|
||||
* Model tests for Tag
|
||||
*/
|
||||
@Test
|
||||
public void testTag() {
|
||||
// TODO: test Tag
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'id'
|
||||
*/
|
||||
@Test
|
||||
public void idTest() {
|
||||
// TODO: test id
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'name'
|
||||
*/
|
||||
@Test
|
||||
public void nameTest() {
|
||||
// TODO: test name
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* Model tests for User
|
||||
*/
|
||||
public class UserTest {
|
||||
private final User model = new User();
|
||||
|
||||
/**
|
||||
* Model tests for User
|
||||
*/
|
||||
@Test
|
||||
public void testUser() {
|
||||
// TODO: test User
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'id'
|
||||
*/
|
||||
@Test
|
||||
public void idTest() {
|
||||
// TODO: test id
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'username'
|
||||
*/
|
||||
@Test
|
||||
public void usernameTest() {
|
||||
// TODO: test username
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'firstName'
|
||||
*/
|
||||
@Test
|
||||
public void firstNameTest() {
|
||||
// TODO: test firstName
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'lastName'
|
||||
*/
|
||||
@Test
|
||||
public void lastNameTest() {
|
||||
// TODO: test lastName
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'email'
|
||||
*/
|
||||
@Test
|
||||
public void emailTest() {
|
||||
// TODO: test email
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'password'
|
||||
*/
|
||||
@Test
|
||||
public void passwordTest() {
|
||||
// TODO: test password
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'phone'
|
||||
*/
|
||||
@Test
|
||||
public void phoneTest() {
|
||||
// TODO: test phone
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'userStatus'
|
||||
*/
|
||||
@Test
|
||||
public void userStatusTest() {
|
||||
// TODO: test userStatus
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user