Rename default packages for jaxrs generators (#209)

This commit is contained in:
Jérémie Bresson 2018-04-24 06:26:42 +02:00 committed by GitHub
parent ccd0029667
commit d5d8c356b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
659 changed files with 1878 additions and 18555 deletions

View File

@ -1,5 +1,20 @@
package org.openapitools.codegen.languages;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.Operation;
import io.swagger.v3.oas.models.PathItem;
import org.openapitools.codegen.CliOption;
import org.openapitools.codegen.CodegenConstants;
import org.openapitools.codegen.CodegenOperation;
import org.openapitools.codegen.CodegenParameter;
import org.openapitools.codegen.CodegenResponse;
import org.openapitools.codegen.CodegenType;
import org.openapitools.codegen.languages.features.BeanValidationFeatures;
import org.openapitools.codegen.utils.URLPathUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
@ -7,15 +22,6 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.openapitools.codegen.*;
import org.openapitools.codegen.languages.features.BeanValidationFeatures;
import org.openapitools.codegen.utils.ModelUtils;
import org.openapitools.codegen.utils.URLPathUtils;
import io.swagger.v3.oas.models.*;
public abstract class AbstractJavaJAXRSServerCodegen extends AbstractJavaCodegen implements BeanValidationFeatures {
/**
* Name of the sub-directory in "src/main/resource" where to find the
@ -34,12 +40,12 @@ public abstract class AbstractJavaJAXRSServerCodegen extends AbstractJavaCodegen
super();
sourceFolder = "src/gen/java";
invokerPackage = "io.swagger.api";
invokerPackage = "org.openapitools.api";
artifactId = "swagger-jaxrs-server";
dateLibrary = "legacy"; //TODO: add joda support to all jax-rs
apiPackage = "io.swagger.api";
modelPackage = "io.swagger.model";
apiPackage = "org.openapitools.api";
modelPackage = "org.openapitools.model";
additionalProperties.put("title", title);
// java inflector uses the jackson lib

View File

@ -1,18 +1,23 @@
package org.openapitools.codegen.languages;
import java.io.File;
import java.util.List;
import java.util.Map;
import io.swagger.v3.oas.models.Operation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.openapitools.codegen.*;
import org.openapitools.codegen.CliOption;
import org.openapitools.codegen.CodegenModel;
import org.openapitools.codegen.CodegenOperation;
import org.openapitools.codegen.CodegenProperty;
import org.openapitools.codegen.CodegenType;
import org.openapitools.codegen.SupportingFile;
import org.openapitools.codegen.languages.features.BeanValidationFeatures;
import org.openapitools.codegen.languages.features.GzipTestFeatures;
import org.openapitools.codegen.languages.features.LoggingTestFeatures;
import org.openapitools.codegen.languages.features.UseGenericResponseFeatures;
import io.swagger.v3.oas.models.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.util.List;
import java.util.Map;
public class JavaCXFClientCodegen extends AbstractJavaCodegen
implements BeanValidationFeatures, UseGenericResponseFeatures, GzipTestFeatures, LoggingTestFeatures {
@ -39,12 +44,12 @@ public class JavaCXFClientCodegen extends AbstractJavaCodegen
supportsInheritance = true;
sourceFolder = "src/gen/java";
invokerPackage = "io.swagger.api";
invokerPackage = "org.openapitools.api";
artifactId = "swagger-jaxrs-client";
dateLibrary = "legacy"; //TODO: add joda support to all jax-rs
apiPackage = "io.swagger.api";
modelPackage = "io.swagger.model";
apiPackage = "org.openapitools.api";
modelPackage = "org.openapitools.model";
outputFolder = "generated-code/JavaJaxRS-CXF";

View File

@ -64,45 +64,45 @@ public class JavaCXFClientCodegenTest {
Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.HIDE_GENERATION_TIMESTAMP), Boolean.FALSE);
Assert.assertEquals(codegen.isHideGenerationTimestamp(), false);
Assert.assertEquals(codegen.modelPackage(), "io.swagger.model");
Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.MODEL_PACKAGE), "io.swagger.model");
Assert.assertEquals(codegen.apiPackage(), "io.swagger.api");
Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.API_PACKAGE), "io.swagger.api");
Assert.assertEquals(codegen.getInvokerPackage(), "io.swagger.api");
Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.INVOKER_PACKAGE), "io.swagger.api");
Assert.assertEquals(codegen.modelPackage(), "org.openapitools.model");
Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.MODEL_PACKAGE), "org.openapitools.model");
Assert.assertEquals(codegen.apiPackage(), "org.openapitools.api");
Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.API_PACKAGE), "org.openapitools.api");
Assert.assertEquals(codegen.getInvokerPackage(), "org.openapitools.api");
Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.INVOKER_PACKAGE), "org.openapitools.api");
}
@Test
public void testSettersForConfigValues() throws Exception {
final JavaCXFClientCodegen codegen = new JavaCXFClientCodegen();
codegen.setHideGenerationTimestamp(true);
codegen.setInvokerPackage("io.swagger.client.xyz.invoker");
codegen.setInvokerPackage("org.openapitools.client.xyz.invoker");
codegen.processOpts();
Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.HIDE_GENERATION_TIMESTAMP), Boolean.TRUE);
Assert.assertEquals(codegen.isHideGenerationTimestamp(), true);
Assert.assertEquals(codegen.modelPackage(), "io.swagger.model");
Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.MODEL_PACKAGE), "io.swagger.model");
Assert.assertEquals(codegen.apiPackage(), "io.swagger.api");
Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.API_PACKAGE), "io.swagger.api");
Assert.assertEquals(codegen.getInvokerPackage(), "io.swagger.client.xyz.invoker");
Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.INVOKER_PACKAGE), "io.swagger.client.xyz.invoker");
Assert.assertEquals(codegen.modelPackage(), "org.openapitools.model");
Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.MODEL_PACKAGE), "org.openapitools.model");
Assert.assertEquals(codegen.apiPackage(), "org.openapitools.api");
Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.API_PACKAGE), "org.openapitools.api");
Assert.assertEquals(codegen.getInvokerPackage(), "org.openapitools.client.xyz.invoker");
Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.INVOKER_PACKAGE), "org.openapitools.client.xyz.invoker");
}
@Test
public void testAdditionalPropertiesPutForConfigValues() throws Exception {
final JavaCXFClientCodegen codegen = new JavaCXFClientCodegen();
codegen.additionalProperties().put(CodegenConstants.HIDE_GENERATION_TIMESTAMP, "false");
codegen.additionalProperties().put(CodegenConstants.INVOKER_PACKAGE,"io.swagger.client.xyz.invoker");
codegen.additionalProperties().put(CodegenConstants.INVOKER_PACKAGE,"org.openapitools.client.xyz.invoker");
codegen.processOpts();
Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.HIDE_GENERATION_TIMESTAMP), Boolean.FALSE);
Assert.assertEquals(codegen.isHideGenerationTimestamp(), false);
Assert.assertEquals(codegen.modelPackage(), "io.swagger.model");
Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.MODEL_PACKAGE), "io.swagger.model");
Assert.assertEquals(codegen.apiPackage(), "io.swagger.api");
Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.API_PACKAGE), "io.swagger.api");
Assert.assertEquals(codegen.getInvokerPackage(), "io.swagger.client.xyz.invoker");
Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.INVOKER_PACKAGE), "io.swagger.client.xyz.invoker");
Assert.assertEquals(codegen.modelPackage(), "org.openapitools.model");
Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.MODEL_PACKAGE), "org.openapitools.model");
Assert.assertEquals(codegen.apiPackage(), "org.openapitools.api");
Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.API_PACKAGE), "org.openapitools.api");
Assert.assertEquals(codegen.getInvokerPackage(), "org.openapitools.client.xyz.invoker");
Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.INVOKER_PACKAGE), "org.openapitools.client.xyz.invoker");
}
}

View File

@ -1,11 +1,10 @@
package org.openapitools.codegen.java.jaxrs;
import org.testng.Assert;
import org.testng.annotations.Test;
import org.openapitools.codegen.CodegenConstants;
import org.openapitools.codegen.CodegenType;
import org.openapitools.codegen.languages.AbstractJavaJAXRSServerCodegen;
import org.testng.Assert;
import org.testng.annotations.Test;
public class AbstractJavaJAXRSServerCodegenTest {
@ -27,12 +26,12 @@ public class AbstractJavaJAXRSServerCodegenTest {
Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.HIDE_GENERATION_TIMESTAMP), Boolean.FALSE);
Assert.assertEquals(codegen.isHideGenerationTimestamp(), false);
Assert.assertEquals(codegen.modelPackage(), "io.swagger.model");
Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.MODEL_PACKAGE), "io.swagger.model");
Assert.assertEquals(codegen.apiPackage(), "io.swagger.api");
Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.API_PACKAGE), "io.swagger.api");
Assert.assertEquals(codegen.getInvokerPackage(), "io.swagger.api");
Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.INVOKER_PACKAGE), "io.swagger.api");
Assert.assertEquals(codegen.modelPackage(), "org.openapitools.model");
Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.MODEL_PACKAGE), "org.openapitools.model");
Assert.assertEquals(codegen.apiPackage(), "org.openapitools.api");
Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.API_PACKAGE), "org.openapitools.api");
Assert.assertEquals(codegen.getInvokerPackage(), "org.openapitools.api");
Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.INVOKER_PACKAGE), "org.openapitools.api");
}
@Test

View File

@ -1,5 +1,5 @@
# Swagger Codegen Ignore
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
# Openapi Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.

View File

@ -1,8 +1,8 @@
package io.swagger.api;
package org.openapitools.api;
import java.io.File;
import io.swagger.model.ModelApiResponse;
import io.swagger.model.Pet;
import org.openapitools.model.ModelApiResponse;
import org.openapitools.model.Pet;
import java.io.InputStream;
import java.io.OutputStream;

View File

@ -1,6 +1,6 @@
package io.swagger.api;
package org.openapitools.api;
import io.swagger.model.Order;
import org.openapitools.model.Order;
import java.io.InputStream;
import java.io.OutputStream;

View File

@ -1,6 +1,6 @@
package io.swagger.api;
package org.openapitools.api;
import io.swagger.model.User;
import org.openapitools.model.User;
import java.io.InputStream;
import java.io.OutputStream;

View File

@ -1,4 +1,4 @@
package io.swagger.model;
package org.openapitools.model;
import io.swagger.annotations.ApiModel;

View File

@ -1,4 +1,4 @@
package io.swagger.model;
package org.openapitools.model;
import io.swagger.annotations.ApiModel;
import java.util.Date;

View File

@ -1,10 +1,10 @@
package io.swagger.model;
package org.openapitools.model;
import io.swagger.annotations.ApiModel;
import io.swagger.model.Category;
import io.swagger.model.Tag;
import java.util.ArrayList;
import java.util.List;
import org.openapitools.model.Category;
import org.openapitools.model.Tag;
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;

View File

@ -1,4 +1,4 @@
package io.swagger.model;
package org.openapitools.model;
import io.swagger.annotations.ApiModel;

View File

@ -1,4 +1,4 @@
package io.swagger.model;
package org.openapitools.model;
import io.swagger.annotations.ApiModel;

View File

@ -23,11 +23,11 @@
*/
package io.swagger.api;
package org.openapitools.api;
import java.io.File;
import io.swagger.model.ModelApiResponse;
import io.swagger.model.Pet;
import org.openapitools.model.ModelApiResponse;
import org.openapitools.model.Pet;
import org.junit.Test;
import org.junit.Before;
import static org.junit.Assert.*;

View File

@ -23,9 +23,9 @@
*/
package io.swagger.api;
package org.openapitools.api;
import io.swagger.model.Order;
import org.openapitools.model.Order;
import org.junit.Test;
import org.junit.Before;
import static org.junit.Assert.*;

View File

@ -23,9 +23,9 @@
*/
package io.swagger.api;
package org.openapitools.api;
import io.swagger.model.User;
import org.openapitools.model.User;
import org.junit.Test;
import org.junit.Before;
import static org.junit.Assert.*;

View File

@ -21,3 +21,5 @@
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
**/impl/*

View File

@ -33,7 +33,7 @@
<stopPort>8079</stopPort>
<stopKey>stopit</stopKey>
<httpConnector>
<port>8080</port>
<port>-1</port>
<idleTimeout>60000</idleTimeout>
</httpConnector>
</configuration>
@ -166,10 +166,9 @@
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-joda</artifactId>
<version>${jackson-jaxrs-version}</version>
<scope>compile</scope>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-joda</artifactId>
<version>${jackson-jaxrs-version}</version>
</dependency>
</dependencies>
<repositories>

View File

@ -1,8 +1,8 @@
package io.swagger.api;
package org.openapitools.api;
import java.io.File;
import io.swagger.model.ModelApiResponse;
import io.swagger.model.Pet;
import org.openapitools.model.ModelApiResponse;
import org.openapitools.model.Pet;
import java.io.InputStream;
import java.io.OutputStream;

View File

@ -1,7 +1,7 @@
package io.swagger.api;
package org.openapitools.api;
import java.util.Map;
import io.swagger.model.Order;
import org.openapitools.model.Order;
import java.io.InputStream;
import java.io.OutputStream;

View File

@ -1,7 +1,7 @@
package io.swagger.api;
package org.openapitools.api;
import java.util.List;
import io.swagger.model.User;
import org.openapitools.model.User;
import java.io.InputStream;
import java.io.OutputStream;

View File

@ -1,4 +1,4 @@
package io.swagger.model;
package org.openapitools.model;
import io.swagger.annotations.ApiModel;
import javax.validation.constraints.*;

View File

@ -1,4 +1,4 @@
package io.swagger.model;
package org.openapitools.model;
import io.swagger.annotations.ApiModel;
import javax.validation.constraints.*;

View File

@ -1,4 +1,4 @@
package io.swagger.model;
package org.openapitools.model;
import io.swagger.annotations.ApiModel;
import java.util.Date;

View File

@ -1,10 +1,10 @@
package io.swagger.model;
package org.openapitools.model;
import io.swagger.annotations.ApiModel;
import io.swagger.model.Category;
import io.swagger.model.Tag;
import java.util.ArrayList;
import java.util.List;
import org.openapitools.model.Category;
import org.openapitools.model.Tag;
import javax.validation.constraints.*;
import javax.validation.Valid;

View File

@ -1,4 +1,4 @@
package io.swagger.model;
package org.openapitools.model;
import io.swagger.annotations.ApiModel;
import javax.validation.constraints.*;

View File

@ -1,4 +1,4 @@
package io.swagger.model;
package org.openapitools.model;
import io.swagger.annotations.ApiModel;
import javax.validation.constraints.*;

View File

@ -1,9 +1,9 @@
package io.swagger.api.impl;
package org.openapitools.api.impl;
import io.swagger.api.*;
import org.openapitools.api.*;
import java.io.File;
import io.swagger.model.ModelApiResponse;
import io.swagger.model.Pet;
import org.openapitools.model.ModelApiResponse;
import org.openapitools.model.Pet;
import java.io.InputStream;
import java.io.OutputStream;

View File

@ -1,8 +1,8 @@
package io.swagger.api.impl;
package org.openapitools.api.impl;
import io.swagger.api.*;
import org.openapitools.api.*;
import java.util.Map;
import io.swagger.model.Order;
import org.openapitools.model.Order;
import java.io.InputStream;
import java.io.OutputStream;

View File

@ -1,8 +1,8 @@
package io.swagger.api.impl;
package org.openapitools.api.impl;
import io.swagger.api.*;
import org.openapitools.api.*;
import java.util.List;
import io.swagger.model.User;
import org.openapitools.model.User;
import java.io.InputStream;
import java.io.OutputStream;

View File

@ -23,11 +23,11 @@
*/
package io.swagger.api;
package org.openapitools.api;
import java.io.File;
import io.swagger.model.ModelApiResponse;
import io.swagger.model.Pet;
import org.openapitools.model.ModelApiResponse;
import org.openapitools.model.Pet;
import org.junit.Test;
import org.junit.Before;
import static org.junit.Assert.*;
@ -49,7 +49,11 @@ import java.util.Map;
/**
* API tests for PetApi
* Swagger Petstore
*
* <p>This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* API tests for PetApi
*/
public class PetApiTest {
@ -72,15 +76,13 @@ public class PetApiTest {
/**
* Add a new pet to the store
*
*
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void addPetTest() {
Pet body = null;
//api.addPet(body);
Pet pet = null;
//api.addPet(pet);
// TODO: test validations
@ -90,8 +92,6 @@ public class PetApiTest {
/**
* Deletes a pet
*
*
*
* @throws ApiException
* if the Api call fails
*/
@ -99,7 +99,7 @@ public class PetApiTest {
public void deletePetTest() {
Long petId = null;
String apiKey = null;
//api.deletePet(petId, apiKey);
//api.deletePet(petId, apiKey);
// TODO: test validations
@ -117,7 +117,7 @@ public class PetApiTest {
@Test
public void findPetsByStatusTest() {
List<String> status = null;
//List<Pet> response = api.findPetsByStatus(status);
//List<Pet> response = api.findPetsByStatus(status);
//assertNotNull(response);
// TODO: test validations
@ -135,7 +135,7 @@ public class PetApiTest {
@Test
public void findPetsByTagsTest() {
List<String> tags = null;
//List<Pet> response = api.findPetsByTags(tags);
//List<Pet> response = api.findPetsByTags(tags);
//assertNotNull(response);
// TODO: test validations
@ -153,7 +153,7 @@ public class PetApiTest {
@Test
public void getPetByIdTest() {
Long petId = null;
//Pet response = api.getPetById(petId);
//Pet response = api.getPetById(petId);
//assertNotNull(response);
// TODO: test validations
@ -163,15 +163,13 @@ public class PetApiTest {
/**
* Update an existing pet
*
*
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void updatePetTest() {
Pet body = null;
//api.updatePet(body);
Pet pet = null;
//api.updatePet(pet);
// TODO: test validations
@ -181,8 +179,6 @@ public class PetApiTest {
/**
* Updates a pet in the store with form data
*
*
*
* @throws ApiException
* if the Api call fails
*/
@ -191,7 +187,7 @@ public class PetApiTest {
Long petId = null;
String name = null;
String status = null;
//api.updatePetWithForm(petId, name, status);
//api.updatePetWithForm(petId, name, status);
// TODO: test validations
@ -201,8 +197,6 @@ public class PetApiTest {
/**
* uploads an image
*
*
*
* @throws ApiException
* if the Api call fails
*/
@ -211,7 +205,7 @@ public class PetApiTest {
Long petId = null;
String additionalMetadata = null;
org.apache.cxf.jaxrs.ext.multipart.Attachment file = null;
//ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file);
//ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file);
//assertNotNull(response);
// TODO: test validations

View File

@ -23,10 +23,10 @@
*/
package io.swagger.api;
package org.openapitools.api;
import java.util.Map;
import io.swagger.model.Order;
import org.openapitools.model.Order;
import org.junit.Test;
import org.junit.Before;
import static org.junit.Assert.*;
@ -48,7 +48,11 @@ import java.util.Map;
/**
* API tests for StoreApi
* Swagger Petstore
*
* <p>This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* API tests for StoreApi
*/
public class StoreApiTest {
@ -79,7 +83,7 @@ public class StoreApiTest {
@Test
public void deleteOrderTest() {
String orderId = null;
//api.deleteOrder(orderId);
//api.deleteOrder(orderId);
// TODO: test validations
@ -96,7 +100,7 @@ public class StoreApiTest {
*/
@Test
public void getInventoryTest() {
//Map<String, Integer> response = api.getInventory();
//Map<String, Integer> response = api.getInventory();
//assertNotNull(response);
// TODO: test validations
@ -114,7 +118,7 @@ public class StoreApiTest {
@Test
public void getOrderByIdTest() {
Long orderId = null;
//Order response = api.getOrderById(orderId);
//Order response = api.getOrderById(orderId);
//assertNotNull(response);
// TODO: test validations
@ -124,15 +128,13 @@ public class StoreApiTest {
/**
* Place an order for a pet
*
*
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void placeOrderTest() {
Order body = null;
//Order response = api.placeOrder(body);
Order order = null;
//Order response = api.placeOrder(order);
//assertNotNull(response);
// TODO: test validations

View File

@ -23,10 +23,10 @@
*/
package io.swagger.api;
package org.openapitools.api;
import java.util.List;
import io.swagger.model.User;
import org.openapitools.model.User;
import org.junit.Test;
import org.junit.Before;
import static org.junit.Assert.*;
@ -48,7 +48,11 @@ import java.util.Map;
/**
* API tests for UserApi
* Swagger Petstore
*
* <p>This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* API tests for UserApi
*/
public class UserApiTest {
@ -78,8 +82,8 @@ public class UserApiTest {
*/
@Test
public void createUserTest() {
User body = null;
//api.createUser(body);
User user = null;
//api.createUser(user);
// TODO: test validations
@ -89,15 +93,13 @@ public class UserApiTest {
/**
* Creates list of users with given input array
*
*
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void createUsersWithArrayInputTest() {
List<User> body = null;
//api.createUsersWithArrayInput(body);
List<User> user = null;
//api.createUsersWithArrayInput(user);
// TODO: test validations
@ -107,15 +109,13 @@ public class UserApiTest {
/**
* Creates list of users with given input array
*
*
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void createUsersWithListInputTest() {
List<User> body = null;
//api.createUsersWithListInput(body);
List<User> user = null;
//api.createUsersWithListInput(user);
// TODO: test validations
@ -133,7 +133,7 @@ public class UserApiTest {
@Test
public void deleteUserTest() {
String username = null;
//api.deleteUser(username);
//api.deleteUser(username);
// TODO: test validations
@ -143,15 +143,13 @@ public class UserApiTest {
/**
* Get user by user name
*
*
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void getUserByNameTest() {
String username = null;
//User response = api.getUserByName(username);
//User response = api.getUserByName(username);
//assertNotNull(response);
// TODO: test validations
@ -161,8 +159,6 @@ public class UserApiTest {
/**
* Logs user into the system
*
*
*
* @throws ApiException
* if the Api call fails
*/
@ -170,7 +166,7 @@ public class UserApiTest {
public void loginUserTest() {
String username = null;
String password = null;
//String response = api.loginUser(username, password);
//String response = api.loginUser(username, password);
//assertNotNull(response);
// TODO: test validations
@ -180,14 +176,12 @@ public class UserApiTest {
/**
* Logs out current logged in user session
*
*
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void logoutUserTest() {
//api.logoutUser();
//api.logoutUser();
// TODO: test validations
@ -205,8 +199,8 @@ public class UserApiTest {
@Test
public void updateUserTest() {
String username = null;
User body = null;
//api.updateUser(username, body);
User user = null;
//api.updateUser(username, user);
// TODO: test validations

View File

@ -1,5 +1,5 @@
# Swagger Codegen Ignore
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
# Openapi Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.

View File

@ -1,9 +1,9 @@
package io.swagger.api;
import javax.ws.rs.ApplicationPath;
import javax.ws.rs.core.Application;
@ApplicationPath("/")
public class RestApplication extends Application {
// Add implementation-specific details here
package io.swagger.api;
import javax.ws.rs.ApplicationPath;
import javax.ws.rs.core.Application;
@ApplicationPath("/")
public class RestApplication extends Application {
// Add implementation-specific details here
}

View File

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
<!--
This is just an empty file so that CDI archive scanning kicks in when
implicit archive scanning is disabled (such as on IBM Bluemix)
-->
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
<!--
This is just an empty file so that CDI archive scanning kicks in when
implicit archive scanning is disabled (such as on IBM Bluemix)
-->
</beans>

View File

@ -1,831 +0,0 @@
{
"swagger" : "2.0",
"info" : {
"description" : "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.",
"version" : "1.0.0",
"title" : "Swagger Petstore",
"termsOfService" : "http://swagger.io/terms/",
"contact" : {
"email" : "apiteam@swagger.io"
},
"license" : {
"name" : "Apache-2.0",
"url" : "http://www.apache.org/licenses/LICENSE-2.0.html"
}
},
"host" : "petstore.swagger.io",
"basePath" : "/v2",
"tags" : [ {
"name" : "pet",
"description" : "Everything about your Pets",
"externalDocs" : {
"description" : "Find out more",
"url" : "http://swagger.io"
}
}, {
"name" : "store",
"description" : "Access to Petstore orders"
}, {
"name" : "user",
"description" : "Operations about user",
"externalDocs" : {
"description" : "Find out more about our store",
"url" : "http://swagger.io"
}
} ],
"schemes" : [ "http" ],
"paths" : {
"/pet" : {
"post" : {
"tags" : [ "pet" ],
"summary" : "Add a new pet to the store",
"description" : "",
"operationId" : "addPet",
"consumes" : [ "application/json", "application/xml" ],
"produces" : [ "application/xml", "application/json" ],
"parameters" : [ {
"in" : "body",
"name" : "body",
"description" : "Pet object that needs to be added to the store",
"required" : true,
"schema" : {
"$ref" : "#/definitions/Pet"
}
} ],
"responses" : {
"405" : {
"description" : "Invalid input"
}
},
"security" : [ {
"petstore_auth" : [ "write:pets", "read:pets" ]
} ]
},
"put" : {
"tags" : [ "pet" ],
"summary" : "Update an existing pet",
"description" : "",
"operationId" : "updatePet",
"consumes" : [ "application/json", "application/xml" ],
"produces" : [ "application/xml", "application/json" ],
"parameters" : [ {
"in" : "body",
"name" : "body",
"description" : "Pet object that needs to be added to the store",
"required" : true,
"schema" : {
"$ref" : "#/definitions/Pet"
}
} ],
"responses" : {
"400" : {
"description" : "Invalid ID supplied"
},
"404" : {
"description" : "Pet not found"
},
"405" : {
"description" : "Validation exception"
}
},
"security" : [ {
"petstore_auth" : [ "write:pets", "read:pets" ]
} ]
}
},
"/pet/findByStatus" : {
"get" : {
"tags" : [ "pet" ],
"summary" : "Finds Pets by status",
"description" : "Multiple status values can be provided with comma separated strings",
"operationId" : "findPetsByStatus",
"produces" : [ "application/xml", "application/json" ],
"parameters" : [ {
"name" : "status",
"in" : "query",
"description" : "Status values that need to be considered for filter",
"required" : true,
"type" : "array",
"items" : {
"type" : "string",
"default" : "available",
"enum" : [ "available", "pending", "sold" ]
},
"collectionFormat" : "csv"
} ],
"responses" : {
"200" : {
"description" : "successful operation",
"schema" : {
"type" : "array",
"items" : {
"$ref" : "#/definitions/Pet"
}
}
},
"400" : {
"description" : "Invalid status value"
}
},
"security" : [ {
"petstore_auth" : [ "write:pets", "read:pets" ]
} ]
}
},
"/pet/findByTags" : {
"get" : {
"tags" : [ "pet" ],
"summary" : "Finds Pets by tags",
"description" : "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.",
"operationId" : "findPetsByTags",
"produces" : [ "application/xml", "application/json" ],
"parameters" : [ {
"name" : "tags",
"in" : "query",
"description" : "Tags to filter by",
"required" : true,
"type" : "array",
"items" : {
"type" : "string"
},
"collectionFormat" : "csv"
} ],
"responses" : {
"200" : {
"description" : "successful operation",
"schema" : {
"type" : "array",
"items" : {
"$ref" : "#/definitions/Pet"
}
}
},
"400" : {
"description" : "Invalid tag value"
}
},
"security" : [ {
"petstore_auth" : [ "write:pets", "read:pets" ]
} ],
"deprecated" : true
}
},
"/pet/{petId}" : {
"get" : {
"tags" : [ "pet" ],
"summary" : "Find pet by ID",
"description" : "Returns a single pet",
"operationId" : "getPetById",
"produces" : [ "application/xml", "application/json" ],
"parameters" : [ {
"name" : "petId",
"in" : "path",
"description" : "ID of pet to return",
"required" : true,
"type" : "integer",
"format" : "int64"
} ],
"responses" : {
"200" : {
"description" : "successful operation",
"schema" : {
"$ref" : "#/definitions/Pet"
}
},
"400" : {
"description" : "Invalid ID supplied"
},
"404" : {
"description" : "Pet not found"
}
},
"security" : [ {
"api_key" : [ ]
} ]
},
"post" : {
"tags" : [ "pet" ],
"summary" : "Updates a pet in the store with form data",
"description" : "",
"operationId" : "updatePetWithForm",
"consumes" : [ "application/x-www-form-urlencoded" ],
"produces" : [ "application/xml", "application/json" ],
"parameters" : [ {
"name" : "petId",
"in" : "path",
"description" : "ID of pet that needs to be updated",
"required" : true,
"type" : "integer",
"format" : "int64"
}, {
"name" : "name",
"in" : "formData",
"description" : "Updated name of the pet",
"required" : false,
"type" : "string"
}, {
"name" : "status",
"in" : "formData",
"description" : "Updated status of the pet",
"required" : false,
"type" : "string"
} ],
"responses" : {
"405" : {
"description" : "Invalid input"
}
},
"security" : [ {
"petstore_auth" : [ "write:pets", "read:pets" ]
} ]
},
"delete" : {
"tags" : [ "pet" ],
"summary" : "Deletes a pet",
"description" : "",
"operationId" : "deletePet",
"produces" : [ "application/xml", "application/json" ],
"parameters" : [ {
"name" : "api_key",
"in" : "header",
"required" : false,
"type" : "string"
}, {
"name" : "petId",
"in" : "path",
"description" : "Pet id to delete",
"required" : true,
"type" : "integer",
"format" : "int64"
} ],
"responses" : {
"400" : {
"description" : "Invalid pet value"
}
},
"security" : [ {
"petstore_auth" : [ "write:pets", "read:pets" ]
} ]
}
},
"/pet/{petId}/uploadImage" : {
"post" : {
"tags" : [ "pet" ],
"summary" : "uploads an image",
"description" : "",
"operationId" : "uploadFile",
"consumes" : [ "multipart/form-data" ],
"produces" : [ "application/json" ],
"parameters" : [ {
"name" : "petId",
"in" : "path",
"description" : "ID of pet to update",
"required" : true,
"type" : "integer",
"format" : "int64"
}, {
"name" : "additionalMetadata",
"in" : "formData",
"description" : "Additional data to pass to server",
"required" : false,
"type" : "string"
}, {
"name" : "file",
"in" : "formData",
"description" : "file to upload",
"required" : false,
"type" : "file"
} ],
"responses" : {
"200" : {
"description" : "successful operation",
"schema" : {
"$ref" : "#/definitions/ApiResponse"
}
}
},
"security" : [ {
"petstore_auth" : [ "write:pets", "read:pets" ]
} ]
}
},
"/store/inventory" : {
"get" : {
"tags" : [ "store" ],
"summary" : "Returns pet inventories by status",
"description" : "Returns a map of status codes to quantities",
"operationId" : "getInventory",
"produces" : [ "application/json" ],
"parameters" : [ ],
"responses" : {
"200" : {
"description" : "successful operation",
"schema" : {
"type" : "object",
"additionalProperties" : {
"type" : "integer",
"format" : "int32"
}
}
}
},
"security" : [ {
"api_key" : [ ]
} ]
}
},
"/store/order" : {
"post" : {
"tags" : [ "store" ],
"summary" : "Place an order for a pet",
"description" : "",
"operationId" : "placeOrder",
"produces" : [ "application/xml", "application/json" ],
"parameters" : [ {
"in" : "body",
"name" : "body",
"description" : "order placed for purchasing the pet",
"required" : true,
"schema" : {
"$ref" : "#/definitions/Order"
}
} ],
"responses" : {
"200" : {
"description" : "successful operation",
"schema" : {
"$ref" : "#/definitions/Order"
}
},
"400" : {
"description" : "Invalid Order"
}
}
}
},
"/store/order/{orderId}" : {
"get" : {
"tags" : [ "store" ],
"summary" : "Find purchase order by ID",
"description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions",
"operationId" : "getOrderById",
"produces" : [ "application/xml", "application/json" ],
"parameters" : [ {
"name" : "orderId",
"in" : "path",
"description" : "ID of pet that needs to be fetched",
"required" : true,
"type" : "integer",
"maximum" : 5,
"minimum" : 1,
"format" : "int64"
} ],
"responses" : {
"200" : {
"description" : "successful operation",
"schema" : {
"$ref" : "#/definitions/Order"
}
},
"400" : {
"description" : "Invalid ID supplied"
},
"404" : {
"description" : "Order not found"
}
}
},
"delete" : {
"tags" : [ "store" ],
"summary" : "Delete purchase order by ID",
"description" : "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors",
"operationId" : "deleteOrder",
"produces" : [ "application/xml", "application/json" ],
"parameters" : [ {
"name" : "orderId",
"in" : "path",
"description" : "ID of the order that needs to be deleted",
"required" : true,
"type" : "string"
} ],
"responses" : {
"400" : {
"description" : "Invalid ID supplied"
},
"404" : {
"description" : "Order not found"
}
}
}
},
"/user" : {
"post" : {
"tags" : [ "user" ],
"summary" : "Create user",
"description" : "This can only be done by the logged in user.",
"operationId" : "createUser",
"produces" : [ "application/xml", "application/json" ],
"parameters" : [ {
"in" : "body",
"name" : "body",
"description" : "Created user object",
"required" : true,
"schema" : {
"$ref" : "#/definitions/User"
}
} ],
"responses" : {
"default" : {
"description" : "successful operation"
}
}
}
},
"/user/createWithArray" : {
"post" : {
"tags" : [ "user" ],
"summary" : "Creates list of users with given input array",
"description" : "",
"operationId" : "createUsersWithArrayInput",
"produces" : [ "application/xml", "application/json" ],
"parameters" : [ {
"in" : "body",
"name" : "body",
"description" : "List of user object",
"required" : true,
"schema" : {
"type" : "array",
"items" : {
"$ref" : "#/definitions/User"
}
}
} ],
"responses" : {
"default" : {
"description" : "successful operation"
}
}
}
},
"/user/createWithList" : {
"post" : {
"tags" : [ "user" ],
"summary" : "Creates list of users with given input array",
"description" : "",
"operationId" : "createUsersWithListInput",
"produces" : [ "application/xml", "application/json" ],
"parameters" : [ {
"in" : "body",
"name" : "body",
"description" : "List of user object",
"required" : true,
"schema" : {
"type" : "array",
"items" : {
"$ref" : "#/definitions/User"
}
}
} ],
"responses" : {
"default" : {
"description" : "successful operation"
}
}
}
},
"/user/login" : {
"get" : {
"tags" : [ "user" ],
"summary" : "Logs user into the system",
"description" : "",
"operationId" : "loginUser",
"produces" : [ "application/xml", "application/json" ],
"parameters" : [ {
"name" : "username",
"in" : "query",
"description" : "The user name for login",
"required" : true,
"type" : "string"
}, {
"name" : "password",
"in" : "query",
"description" : "The password for login in clear text",
"required" : true,
"type" : "string"
} ],
"responses" : {
"200" : {
"description" : "successful operation",
"schema" : {
"type" : "string"
},
"headers" : {
"X-Rate-Limit" : {
"type" : "integer",
"format" : "int32",
"description" : "calls per hour allowed by the user"
},
"X-Expires-After" : {
"type" : "string",
"format" : "date-time",
"description" : "date in UTC when toekn expires"
}
}
},
"400" : {
"description" : "Invalid username/password supplied"
}
}
}
},
"/user/logout" : {
"get" : {
"tags" : [ "user" ],
"summary" : "Logs out current logged in user session",
"description" : "",
"operationId" : "logoutUser",
"produces" : [ "application/xml", "application/json" ],
"parameters" : [ ],
"responses" : {
"default" : {
"description" : "successful operation"
}
}
}
},
"/user/{username}" : {
"get" : {
"tags" : [ "user" ],
"summary" : "Get user by user name",
"description" : "",
"operationId" : "getUserByName",
"produces" : [ "application/xml", "application/json" ],
"parameters" : [ {
"name" : "username",
"in" : "path",
"description" : "The name that needs to be fetched. Use user1 for testing. ",
"required" : true,
"type" : "string"
} ],
"responses" : {
"200" : {
"description" : "successful operation",
"schema" : {
"$ref" : "#/definitions/User"
}
},
"400" : {
"description" : "Invalid username supplied"
},
"404" : {
"description" : "User not found"
}
}
},
"put" : {
"tags" : [ "user" ],
"summary" : "Updated user",
"description" : "This can only be done by the logged in user.",
"operationId" : "updateUser",
"produces" : [ "application/xml", "application/json" ],
"parameters" : [ {
"name" : "username",
"in" : "path",
"description" : "name that need to be deleted",
"required" : true,
"type" : "string"
}, {
"in" : "body",
"name" : "body",
"description" : "Updated user object",
"required" : true,
"schema" : {
"$ref" : "#/definitions/User"
}
} ],
"responses" : {
"400" : {
"description" : "Invalid user supplied"
},
"404" : {
"description" : "User not found"
}
}
},
"delete" : {
"tags" : [ "user" ],
"summary" : "Delete user",
"description" : "This can only be done by the logged in user.",
"operationId" : "deleteUser",
"produces" : [ "application/xml", "application/json" ],
"parameters" : [ {
"name" : "username",
"in" : "path",
"description" : "The name that needs to be deleted",
"required" : true,
"type" : "string"
} ],
"responses" : {
"400" : {
"description" : "Invalid username supplied"
},
"404" : {
"description" : "User not found"
}
}
}
}
},
"securityDefinitions" : {
"petstore_auth" : {
"type" : "oauth2",
"authorizationUrl" : "http://petstore.swagger.io/api/oauth/dialog",
"flow" : "implicit",
"scopes" : {
"write:pets" : "modify pets in your account",
"read:pets" : "read your pets"
}
},
"api_key" : {
"type" : "apiKey",
"name" : "api_key",
"in" : "header"
}
},
"definitions" : {
"Order" : {
"type" : "object",
"properties" : {
"id" : {
"type" : "integer",
"format" : "int64"
},
"petId" : {
"type" : "integer",
"format" : "int64"
},
"quantity" : {
"type" : "integer",
"format" : "int32"
},
"shipDate" : {
"type" : "string",
"format" : "date-time"
},
"status" : {
"type" : "string",
"description" : "Order Status",
"enum" : [ "placed", "approved", "delivered" ]
},
"complete" : {
"type" : "boolean",
"default" : false
}
},
"title" : "Pet Order",
"description" : "An order for a pets from the pet store",
"xml" : {
"name" : "Order"
}
},
"Category" : {
"type" : "object",
"properties" : {
"id" : {
"type" : "integer",
"format" : "int64"
},
"name" : {
"type" : "string"
}
},
"title" : "Pet category",
"description" : "A category for a pet",
"xml" : {
"name" : "Category"
}
},
"User" : {
"type" : "object",
"properties" : {
"id" : {
"type" : "integer",
"format" : "int64"
},
"username" : {
"type" : "string"
},
"firstName" : {
"type" : "string"
},
"lastName" : {
"type" : "string"
},
"email" : {
"type" : "string"
},
"password" : {
"type" : "string"
},
"phone" : {
"type" : "string"
},
"userStatus" : {
"type" : "integer",
"format" : "int32",
"description" : "User Status"
}
},
"title" : "a User",
"description" : "A User who is purchasing from the pet store",
"xml" : {
"name" : "User"
}
},
"Tag" : {
"type" : "object",
"properties" : {
"id" : {
"type" : "integer",
"format" : "int64"
},
"name" : {
"type" : "string"
}
},
"title" : "Pet Tag",
"description" : "A tag for a pet",
"xml" : {
"name" : "Tag"
}
},
"Pet" : {
"type" : "object",
"required" : [ "name", "photoUrls" ],
"properties" : {
"id" : {
"type" : "integer",
"format" : "int64"
},
"category" : {
"$ref" : "#/definitions/Category"
},
"name" : {
"type" : "string",
"example" : "doggie"
},
"photoUrls" : {
"type" : "array",
"xml" : {
"name" : "photoUrl",
"wrapped" : true
},
"items" : {
"type" : "string"
}
},
"tags" : {
"type" : "array",
"xml" : {
"name" : "tag",
"wrapped" : true
},
"items" : {
"$ref" : "#/definitions/Tag"
}
},
"status" : {
"type" : "string",
"description" : "pet status in the store",
"enum" : [ "available", "pending", "sold" ]
}
},
"title" : "a Pet",
"description" : "A pet for sale in the pet store",
"xml" : {
"name" : "Pet"
}
},
"ApiResponse" : {
"type" : "object",
"properties" : {
"code" : {
"type" : "integer",
"format" : "int32"
},
"type" : {
"type" : "string"
},
"message" : {
"type" : "string"
}
},
"title" : "An uploaded response",
"description" : "Describes the result of uploading an image resource"
}
},
"externalDocs" : {
"description" : "Find out more about Swagger",
"url" : "http://swagger.io"
}
}

View File

@ -21,3 +21,5 @@
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
**/impl/*

View File

@ -33,7 +33,7 @@
<stopPort>8079</stopPort>
<stopKey>stopit</stopKey>
<httpConnector>
<port>8080</port>
<port>-1</port>
<idleTimeout>60000</idleTimeout>
</httpConnector>
</configuration>
@ -166,10 +166,9 @@
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-joda</artifactId>
<version>${jackson-jaxrs-version}</version>
<scope>compile</scope>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-joda</artifactId>
<version>${jackson-jaxrs-version}</version>
</dependency>
</dependencies>
<repositories>

View File

@ -1,8 +1,8 @@
package io.swagger.api;
package org.openapitools.api;
import java.io.File;
import io.swagger.model.ModelApiResponse;
import io.swagger.model.Pet;
import org.openapitools.model.ModelApiResponse;
import org.openapitools.model.Pet;
import java.io.InputStream;
import java.io.OutputStream;

View File

@ -1,7 +1,7 @@
package io.swagger.api;
package org.openapitools.api;
import java.util.Map;
import io.swagger.model.Order;
import org.openapitools.model.Order;
import java.io.InputStream;
import java.io.OutputStream;

View File

@ -1,7 +1,7 @@
package io.swagger.api;
package org.openapitools.api;
import java.util.List;
import io.swagger.model.User;
import org.openapitools.model.User;
import java.io.InputStream;
import java.io.OutputStream;

View File

@ -1,4 +1,4 @@
package io.swagger.model;
package org.openapitools.model;
import io.swagger.annotations.ApiModel;
import javax.validation.constraints.*;

View File

@ -1,4 +1,4 @@
package io.swagger.model;
package org.openapitools.model;
import io.swagger.annotations.ApiModel;
import javax.validation.constraints.*;

View File

@ -1,4 +1,4 @@
package io.swagger.model;
package org.openapitools.model;
import io.swagger.annotations.ApiModel;
import java.util.Date;

View File

@ -1,10 +1,10 @@
package io.swagger.model;
package org.openapitools.model;
import io.swagger.annotations.ApiModel;
import io.swagger.model.Category;
import io.swagger.model.Tag;
import java.util.ArrayList;
import java.util.List;
import org.openapitools.model.Category;
import org.openapitools.model.Tag;
import javax.validation.constraints.*;
import javax.validation.Valid;

View File

@ -1,4 +1,4 @@
package io.swagger.model;
package org.openapitools.model;
import io.swagger.annotations.ApiModel;
import javax.validation.constraints.*;

View File

@ -1,4 +1,4 @@
package io.swagger.model;
package org.openapitools.model;
import io.swagger.annotations.ApiModel;
import javax.validation.constraints.*;

View File

@ -1,9 +1,9 @@
package io.swagger.api.impl;
package org.openapitools.api.impl;
import io.swagger.api.*;
import org.openapitools.api.*;
import java.io.File;
import io.swagger.model.ModelApiResponse;
import io.swagger.model.Pet;
import org.openapitools.model.ModelApiResponse;
import org.openapitools.model.Pet;
import java.io.InputStream;
import java.io.OutputStream;

View File

@ -1,8 +1,8 @@
package io.swagger.api.impl;
package org.openapitools.api.impl;
import io.swagger.api.*;
import org.openapitools.api.*;
import java.util.Map;
import io.swagger.model.Order;
import org.openapitools.model.Order;
import java.io.InputStream;
import java.io.OutputStream;

View File

@ -1,8 +1,8 @@
package io.swagger.api.impl;
package org.openapitools.api.impl;
import io.swagger.api.*;
import org.openapitools.api.*;
import java.util.List;
import io.swagger.model.User;
import org.openapitools.model.User;
import java.io.InputStream;
import java.io.OutputStream;

View File

@ -8,7 +8,7 @@
<servlet-class>org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet</servlet-class>
<init-param>
<param-name>jaxrs.serviceClasses</param-name>
<param-value>io.swagger.api.impl.PetApiServiceImpl,io.swagger.api.impl.StoreApiServiceImpl,io.swagger.api.impl.UserApiServiceImpl</param-value>
<param-value>org.openapitools.api.impl.PetApiServiceImpl,org.openapitools.api.impl.StoreApiServiceImpl,org.openapitools.api.impl.UserApiServiceImpl</param-value>
</init-param>
<init-param>
<param-name>jaxrs.providers</param-name>

View File

@ -23,11 +23,11 @@
*/
package io.swagger.api;
package org.openapitools.api;
import java.io.File;
import io.swagger.model.ModelApiResponse;
import io.swagger.model.Pet;
import org.openapitools.model.ModelApiResponse;
import org.openapitools.model.Pet;
import org.junit.Test;
import org.junit.Before;
import static org.junit.Assert.*;
@ -49,7 +49,11 @@ import java.util.Map;
/**
* API tests for PetApi
* Swagger Petstore
*
* <p>This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* API tests for PetApi
*/
public class PetApiTest {
@ -72,15 +76,13 @@ public class PetApiTest {
/**
* Add a new pet to the store
*
*
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void addPetTest() {
Pet body = null;
//api.addPet(body);
Pet pet = null;
//api.addPet(pet);
// TODO: test validations
@ -90,8 +92,6 @@ public class PetApiTest {
/**
* Deletes a pet
*
*
*
* @throws ApiException
* if the Api call fails
*/
@ -99,7 +99,7 @@ public class PetApiTest {
public void deletePetTest() {
Long petId = null;
String apiKey = null;
//api.deletePet(petId, apiKey);
//api.deletePet(petId, apiKey);
// TODO: test validations
@ -117,7 +117,7 @@ public class PetApiTest {
@Test
public void findPetsByStatusTest() {
List<String> status = null;
//List<Pet> response = api.findPetsByStatus(status);
//List<Pet> response = api.findPetsByStatus(status);
//assertNotNull(response);
// TODO: test validations
@ -135,7 +135,7 @@ public class PetApiTest {
@Test
public void findPetsByTagsTest() {
List<String> tags = null;
//List<Pet> response = api.findPetsByTags(tags);
//List<Pet> response = api.findPetsByTags(tags);
//assertNotNull(response);
// TODO: test validations
@ -153,7 +153,7 @@ public class PetApiTest {
@Test
public void getPetByIdTest() {
Long petId = null;
//Pet response = api.getPetById(petId);
//Pet response = api.getPetById(petId);
//assertNotNull(response);
// TODO: test validations
@ -163,15 +163,13 @@ public class PetApiTest {
/**
* Update an existing pet
*
*
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void updatePetTest() {
Pet body = null;
//api.updatePet(body);
Pet pet = null;
//api.updatePet(pet);
// TODO: test validations
@ -181,8 +179,6 @@ public class PetApiTest {
/**
* Updates a pet in the store with form data
*
*
*
* @throws ApiException
* if the Api call fails
*/
@ -191,7 +187,7 @@ public class PetApiTest {
Long petId = null;
String name = null;
String status = null;
//api.updatePetWithForm(petId, name, status);
//api.updatePetWithForm(petId, name, status);
// TODO: test validations
@ -201,8 +197,6 @@ public class PetApiTest {
/**
* uploads an image
*
*
*
* @throws ApiException
* if the Api call fails
*/
@ -211,7 +205,7 @@ public class PetApiTest {
Long petId = null;
String additionalMetadata = null;
org.apache.cxf.jaxrs.ext.multipart.Attachment file = null;
//ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file);
//ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file);
//assertNotNull(response);
// TODO: test validations

View File

@ -23,10 +23,10 @@
*/
package io.swagger.api;
package org.openapitools.api;
import java.util.Map;
import io.swagger.model.Order;
import org.openapitools.model.Order;
import org.junit.Test;
import org.junit.Before;
import static org.junit.Assert.*;
@ -48,7 +48,11 @@ import java.util.Map;
/**
* API tests for StoreApi
* Swagger Petstore
*
* <p>This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* API tests for StoreApi
*/
public class StoreApiTest {
@ -79,7 +83,7 @@ public class StoreApiTest {
@Test
public void deleteOrderTest() {
String orderId = null;
//api.deleteOrder(orderId);
//api.deleteOrder(orderId);
// TODO: test validations
@ -96,7 +100,7 @@ public class StoreApiTest {
*/
@Test
public void getInventoryTest() {
//Map<String, Integer> response = api.getInventory();
//Map<String, Integer> response = api.getInventory();
//assertNotNull(response);
// TODO: test validations
@ -114,7 +118,7 @@ public class StoreApiTest {
@Test
public void getOrderByIdTest() {
Long orderId = null;
//Order response = api.getOrderById(orderId);
//Order response = api.getOrderById(orderId);
//assertNotNull(response);
// TODO: test validations
@ -124,15 +128,13 @@ public class StoreApiTest {
/**
* Place an order for a pet
*
*
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void placeOrderTest() {
Order body = null;
//Order response = api.placeOrder(body);
Order order = null;
//Order response = api.placeOrder(order);
//assertNotNull(response);
// TODO: test validations

View File

@ -23,10 +23,10 @@
*/
package io.swagger.api;
package org.openapitools.api;
import java.util.List;
import io.swagger.model.User;
import org.openapitools.model.User;
import org.junit.Test;
import org.junit.Before;
import static org.junit.Assert.*;
@ -48,7 +48,11 @@ import java.util.Map;
/**
* API tests for UserApi
* Swagger Petstore
*
* <p>This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* API tests for UserApi
*/
public class UserApiTest {
@ -78,8 +82,8 @@ public class UserApiTest {
*/
@Test
public void createUserTest() {
User body = null;
//api.createUser(body);
User user = null;
//api.createUser(user);
// TODO: test validations
@ -89,15 +93,13 @@ public class UserApiTest {
/**
* Creates list of users with given input array
*
*
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void createUsersWithArrayInputTest() {
List<User> body = null;
//api.createUsersWithArrayInput(body);
List<User> user = null;
//api.createUsersWithArrayInput(user);
// TODO: test validations
@ -107,15 +109,13 @@ public class UserApiTest {
/**
* Creates list of users with given input array
*
*
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void createUsersWithListInputTest() {
List<User> body = null;
//api.createUsersWithListInput(body);
List<User> user = null;
//api.createUsersWithListInput(user);
// TODO: test validations
@ -133,7 +133,7 @@ public class UserApiTest {
@Test
public void deleteUserTest() {
String username = null;
//api.deleteUser(username);
//api.deleteUser(username);
// TODO: test validations
@ -143,15 +143,13 @@ public class UserApiTest {
/**
* Get user by user name
*
*
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void getUserByNameTest() {
String username = null;
//User response = api.getUserByName(username);
//User response = api.getUserByName(username);
//assertNotNull(response);
// TODO: test validations
@ -161,8 +159,6 @@ public class UserApiTest {
/**
* Logs user into the system
*
*
*
* @throws ApiException
* if the Api call fails
*/
@ -170,7 +166,7 @@ public class UserApiTest {
public void loginUserTest() {
String username = null;
String password = null;
//String response = api.loginUser(username, password);
//String response = api.loginUser(username, password);
//assertNotNull(response);
// TODO: test validations
@ -180,14 +176,12 @@ public class UserApiTest {
/**
* Logs out current logged in user session
*
*
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void logoutUserTest() {
//api.logoutUser();
//api.logoutUser();
// TODO: test validations
@ -205,8 +199,8 @@ public class UserApiTest {
@Test
public void updateUserTest() {
String username = null;
User body = null;
//api.updateUser(username, body);
User user = null;
//api.updateUser(username, user);
// TODO: test validations

View File

@ -22,4 +22,4 @@
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
#**/impl/*
**/impl/*

View File

@ -166,10 +166,9 @@
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-joda</artifactId>
<version>${jackson-jaxrs-version}</version>
<scope>compile</scope>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-joda</artifactId>
<version>${jackson-jaxrs-version}</version>
</dependency>
</dependencies>
<repositories>

View File

@ -1,6 +1,6 @@
package io.swagger.api;
package org.openapitools.api;
import io.swagger.model.Client;
import org.openapitools.model.Client;
import java.io.InputStream;
import java.io.OutputStream;

View File

@ -1,13 +1,13 @@
package io.swagger.api;
package org.openapitools.api;
import java.math.BigDecimal;
import io.swagger.model.Client;
import org.openapitools.model.Client;
import java.util.Date;
import java.io.File;
import org.joda.time.LocalDate;
import java.util.Map;
import io.swagger.model.OuterComposite;
import io.swagger.model.User;
import org.openapitools.model.OuterComposite;
import org.openapitools.model.User;
import java.io.InputStream;
import java.io.OutputStream;

View File

@ -1,6 +1,6 @@
package io.swagger.api;
package org.openapitools.api;
import io.swagger.model.Client;
import org.openapitools.model.Client;
import java.io.InputStream;
import java.io.OutputStream;

View File

@ -1,8 +1,8 @@
package io.swagger.api;
package org.openapitools.api;
import java.io.File;
import io.swagger.model.ModelApiResponse;
import io.swagger.model.Pet;
import org.openapitools.model.ModelApiResponse;
import org.openapitools.model.Pet;
import java.io.InputStream;
import java.io.OutputStream;

View File

@ -1,7 +1,7 @@
package io.swagger.api;
package org.openapitools.api;
import java.util.Map;
import io.swagger.model.Order;
import org.openapitools.model.Order;
import java.io.InputStream;
import java.io.OutputStream;

View File

@ -1,7 +1,7 @@
package io.swagger.api;
package org.openapitools.api;
import java.util.List;
import io.swagger.model.User;
import org.openapitools.model.User;
import java.io.InputStream;
import java.io.OutputStream;

View File

@ -1,4 +1,4 @@
package io.swagger.model;
package org.openapitools.model;
import java.util.HashMap;
import java.util.List;

View File

@ -1,4 +1,4 @@
package io.swagger.model;
package org.openapitools.model;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;

View File

@ -1,8 +1,8 @@
package io.swagger.model;
package org.openapitools.model;
import io.swagger.model.Animal;
import java.util.ArrayList;
import java.util.List;
import org.openapitools.model.Animal;
import javax.validation.constraints.*;
import javax.validation.Valid;

View File

@ -1,4 +1,4 @@
package io.swagger.model;
package org.openapitools.model;
import java.math.BigDecimal;
import java.util.ArrayList;

View File

@ -1,4 +1,4 @@
package io.swagger.model;
package org.openapitools.model;
import java.math.BigDecimal;
import java.util.ArrayList;

View File

@ -1,8 +1,8 @@
package io.swagger.model;
package org.openapitools.model;
import io.swagger.model.ReadOnlyFirst;
import java.util.ArrayList;
import java.util.List;
import org.openapitools.model.ReadOnlyFirst;
import javax.validation.constraints.*;
import javax.validation.Valid;

View File

@ -1,4 +1,4 @@
package io.swagger.model;
package org.openapitools.model;
import javax.validation.constraints.*;
import javax.validation.Valid;

View File

@ -1,6 +1,6 @@
package io.swagger.model;
package org.openapitools.model;
import io.swagger.model.Animal;
import org.openapitools.model.Animal;
import javax.validation.constraints.*;
import javax.validation.Valid;

View File

@ -1,4 +1,4 @@
package io.swagger.model;
package org.openapitools.model;
import javax.validation.constraints.*;
import javax.validation.Valid;

View File

@ -1,4 +1,4 @@
package io.swagger.model;
package org.openapitools.model;
import io.swagger.annotations.ApiModel;
import javax.validation.constraints.*;

View File

@ -1,4 +1,4 @@
package io.swagger.model;
package org.openapitools.model;
import javax.validation.constraints.*;
import javax.validation.Valid;

View File

@ -1,6 +1,6 @@
package io.swagger.model;
package org.openapitools.model;
import io.swagger.model.Animal;
import org.openapitools.model.Animal;
import javax.validation.constraints.*;
import javax.validation.Valid;

View File

@ -1,4 +1,4 @@
package io.swagger.model;
package org.openapitools.model;
import java.util.ArrayList;
import java.util.List;

View File

@ -1,4 +1,4 @@
package io.swagger.model;
package org.openapitools.model;
import javax.validation.constraints.*;
import javax.validation.Valid;

View File

@ -1,6 +1,6 @@
package io.swagger.model;
package org.openapitools.model;
import io.swagger.model.OuterEnum;
import org.openapitools.model.OuterEnum;
import javax.validation.constraints.*;
import javax.validation.Valid;

View File

@ -1,4 +1,4 @@
package io.swagger.model;
package org.openapitools.model;
import java.io.File;
import java.math.BigDecimal;

View File

@ -1,4 +1,4 @@
package io.swagger.model;
package org.openapitools.model;
import javax.validation.constraints.*;
import javax.validation.Valid;

View File

@ -1,4 +1,4 @@
package io.swagger.model;
package org.openapitools.model;
import java.util.HashMap;
import java.util.List;

View File

@ -1,11 +1,11 @@
package io.swagger.model;
package org.openapitools.model;
import io.swagger.model.Animal;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import org.openapitools.model.Animal;
import javax.validation.constraints.*;
import javax.validation.Valid;

View File

@ -1,4 +1,4 @@
package io.swagger.model;
package org.openapitools.model;
import io.swagger.annotations.ApiModel;
import javax.validation.constraints.*;

View File

@ -1,4 +1,4 @@
package io.swagger.model;
package org.openapitools.model;
import javax.validation.constraints.*;
import javax.validation.Valid;

View File

@ -1,4 +1,4 @@
package io.swagger.model;
package org.openapitools.model;
import io.swagger.annotations.ApiModel;
import javax.validation.constraints.*;

View File

@ -1,4 +1,4 @@
package io.swagger.model;
package org.openapitools.model;
import io.swagger.annotations.ApiModel;
import javax.validation.constraints.*;
@ -30,7 +30,7 @@ public class Name {
private String property = null;
@ApiModelProperty(value = "")
private Integer _123Number = null;
private Integer _123number = null;
/**
* Get name
* @return name
@ -79,12 +79,12 @@ public class Name {
}
/**
* Get _123Number
* @return _123Number
* Get _123number
* @return _123number
**/
@JsonProperty("123Number")
public Integer get123Number() {
return _123Number;
public Integer get123number() {
return _123number;
}
@ -97,7 +97,7 @@ public class Name {
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n");
sb.append(" property: ").append(toIndentedString(property)).append("\n");
sb.append(" _123Number: ").append(toIndentedString(_123Number)).append("\n");
sb.append(" _123number: ").append(toIndentedString(_123number)).append("\n");
sb.append("}");
return sb.toString();
}

View File

@ -1,4 +1,4 @@
package io.swagger.model;
package org.openapitools.model;
import java.math.BigDecimal;
import javax.validation.constraints.*;

View File

@ -1,4 +1,4 @@
package io.swagger.model;
package org.openapitools.model;
import java.util.Date;
import javax.validation.constraints.*;

View File

@ -1,4 +1,4 @@
package io.swagger.model;
package org.openapitools.model;
import javax.validation.constraints.*;
import javax.validation.Valid;

View File

@ -1,4 +1,4 @@
package io.swagger.model;
package org.openapitools.model;
import java.math.BigDecimal;
import javax.validation.constraints.*;

View File

@ -1,4 +1,4 @@
package io.swagger.model;
package org.openapitools.model;
import javax.validation.constraints.*;
import javax.validation.Valid;

View File

@ -1,4 +1,4 @@
package io.swagger.model;
package org.openapitools.model;
import javax.validation.constraints.*;
import javax.validation.Valid;

View File

@ -1,4 +1,4 @@
package io.swagger.model;
package org.openapitools.model;
import javax.validation.constraints.*;
import javax.validation.Valid;

View File

@ -1,9 +1,9 @@
package io.swagger.model;
package org.openapitools.model;
import io.swagger.model.Category;
import io.swagger.model.Tag;
import java.util.ArrayList;
import java.util.List;
import org.openapitools.model.Category;
import org.openapitools.model.Tag;
import javax.validation.constraints.*;
import javax.validation.Valid;

View File

@ -1,4 +1,4 @@
package io.swagger.model;
package org.openapitools.model;
import javax.validation.constraints.*;
import javax.validation.Valid;

View File

@ -1,4 +1,4 @@
package io.swagger.model;
package org.openapitools.model;
import javax.validation.constraints.*;
import javax.validation.Valid;
@ -16,22 +16,22 @@ import com.fasterxml.jackson.annotation.JsonProperty;
public class SpecialModelName {
@ApiModelProperty(value = "")
private Long specialPropertyName = null;
private Long $specialPropertyName = null;
/**
* Get specialPropertyName
* @return specialPropertyName
* Get $specialPropertyName
* @return $specialPropertyName
**/
@JsonProperty("$special[property.name]")
public Long getSpecialPropertyName() {
return specialPropertyName;
public Long get$SpecialPropertyName() {
return $specialPropertyName;
}
public void setSpecialPropertyName(Long specialPropertyName) {
this.specialPropertyName = specialPropertyName;
public void set$SpecialPropertyName(Long $specialPropertyName) {
this.$specialPropertyName = $specialPropertyName;
}
public SpecialModelName specialPropertyName(Long specialPropertyName) {
this.specialPropertyName = specialPropertyName;
public SpecialModelName $specialPropertyName(Long $specialPropertyName) {
this.$specialPropertyName = $specialPropertyName;
return this;
}
@ -41,7 +41,7 @@ public class SpecialModelName {
StringBuilder sb = new StringBuilder();
sb.append("class SpecialModelName {\n");
sb.append(" specialPropertyName: ").append(toIndentedString(specialPropertyName)).append("\n");
sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n");
sb.append("}");
return sb.toString();
}

View File

@ -1,4 +1,4 @@
package io.swagger.model;
package org.openapitools.model;
import javax.validation.constraints.*;
import javax.validation.Valid;

View File

@ -1,4 +1,4 @@
package io.swagger.model;
package org.openapitools.model;
import javax.validation.constraints.*;
import javax.validation.Valid;

View File

@ -1,7 +1,7 @@
package io.swagger.api.impl;
package org.openapitools.api.impl;
import io.swagger.api.*;
import io.swagger.model.Client;
import org.openapitools.api.*;
import org.openapitools.model.Client;
import java.io.InputStream;
import java.io.OutputStream;

Some files were not shown because too many files have changed in this diff Show More