mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-07 02:55:19 +00:00
Merge remote-tracking branch 'origin/master' into 3.1.x
This commit is contained in:
commit
a878749f6c
26
.travis.yml
26
.travis.yml
@ -100,14 +100,24 @@ script:
|
||||
- mvn --quiet verify -Psamples
|
||||
after_success:
|
||||
# push to maven repo
|
||||
- if [ $SONATYPE_USERNAME ] && [ -z $TRAVIS_TAG ] && ([ "$TRAVIS_BRANCH" = "master" ] || [ "$TRAVIS_BRANCH" = "3.1.x" ] || [ "$TRAVIS_BRANCH" = "4.0.x" ]) && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
|
||||
mvn clean deploy -DskipTests=true -B -U -P release --settings CI/settings.xml;
|
||||
echo "Finished mvn clean deploy for $TRAVIS_BRANCH";
|
||||
pushd .;
|
||||
cd modules/openapi-generator-gradle-plugin;
|
||||
./gradlew -Psigning.keyId="$SIGNING_KEY" -Psigning.password="$SIGNING_PASSPHRASE" -Psigning.secretKeyRingFile="${TRAVIS_BUILD_DIR}/sec.gpg" -PossrhUsername="${SONATYPE_USERNAME}" -PossrhPassword="${SONATYPE_PASSWORD}" uploadArchives --no-daemon;
|
||||
echo "Finished ./gradlew uploadArchives";
|
||||
popd;
|
||||
- if [ $SONATYPE_USERNAME ] && [ -z $TRAVIS_TAG ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
|
||||
if [ "$TRAVIS_BRANCH" = "master" ]; then
|
||||
mvn clean deploy -DskipTests=true -B -U -P release --settings CI/settings.xml;
|
||||
echo "Finished mvn clean deploy for $TRAVIS_BRANCH";
|
||||
pushd .;
|
||||
cd modules/openapi-generator-gradle-plugin;
|
||||
./gradlew -Psigning.keyId="$SIGNING_KEY" -Psigning.password="$SIGNING_PASSPHRASE" -Psigning.secretKeyRingFile="${TRAVIS_BUILD_DIR}/sec.gpg" -PossrhUsername="${SONATYPE_USERNAME}" -PossrhPassword="${SONATYPE_PASSWORD}" uploadArchives --no-daemon;
|
||||
echo "Finished ./gradlew uploadArchives";
|
||||
popd;
|
||||
else
|
||||
mvn clean deploy --settings CI/settings.xml;
|
||||
echo "Finished mvn clean deploy for $TRAVIS_BRANCH";
|
||||
pushd .;
|
||||
cd modules/openapi-generator-gradle-plugin;
|
||||
./gradlew -PossrhUsername="${SONATYPE_USERNAME}" -PossrhPassword="${SONATYPE_PASSWORD}" uploadArchives --no-daemon;
|
||||
echo "Finished ./gradlew uploadArchives";
|
||||
popd;
|
||||
fi;
|
||||
fi;
|
||||
## docker: build and push openapi-generator-online to DockerHub
|
||||
- if [ $DOCKER_HUB_USERNAME ]; then echo "$DOCKER_HUB_PASSWORD" | docker login --username=$DOCKER_HUB_USERNAME --password-stdin && docker build -t $DOCKER_GENERATOR_IMAGE_NAME ./modules/openapi-generator-online && if [ ! -z "$TRAVIS_TAG" ]; then docker tag $DOCKER_GENERATOR_IMAGE_NAME:latest $DOCKER_GENERATOR_IMAGE_NAME:$TRAVIS_TAG; fi && if [ ! -z "$TRAVIS_TAG" ] || [ "$TRAVIS_BRANCH" = "master" ]; then docker push $DOCKER_GENERATOR_IMAGE_NAME && echo "Pushed to $DOCKER_GENERATOR_IMAGE_NAME"; fi; fi
|
||||
|
@ -13,6 +13,9 @@ import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
{{/jdk8-no-delegate}}
|
||||
import org.springframework.http.ResponseEntity;
|
||||
{{#useBeanValidation}}
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
{{/useBeanValidation}}
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
@ -50,6 +53,9 @@ import java.util.Optional;
|
||||
import java.util.concurrent.{{^jdk8}}Callable{{/jdk8}}{{#jdk8}}CompletableFuture{{/jdk8}};
|
||||
{{/async}}
|
||||
{{>generatedAnnotation}}
|
||||
{{#useBeanValidation}}
|
||||
@Validated
|
||||
{{/useBeanValidation}}
|
||||
@Api(value = "{{{baseName}}}", description = "the {{{baseName}}} API")
|
||||
{{#operations}}
|
||||
public interface {{classname}} {
|
||||
|
@ -7,7 +7,6 @@ import java.util.Objects;
|
||||
import java.io.Serializable;
|
||||
{{/serializableModel}}
|
||||
{{#useBeanValidation}}
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
{{/useBeanValidation}}
|
||||
|
@ -2,7 +2,6 @@
|
||||
* {{#description}}{{.}}{{/description}}{{^description}}{{classname}}{{/description}}
|
||||
*/{{#description}}
|
||||
@ApiModel(description = "{{{description}}}"){{/description}}
|
||||
{{#useBeanValidation}}@Validated{{/useBeanValidation}}
|
||||
{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}}
|
||||
public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} {
|
||||
{{#serializableModel}}
|
||||
|
@ -12,6 +12,7 @@ import io.swagger.annotations.*;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
@ -28,6 +29,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
@Validated
|
||||
@Api(value = "Pet", description = "the Pet API")
|
||||
public interface PetApi {
|
||||
|
||||
|
@ -11,6 +11,7 @@ import io.swagger.annotations.*;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
@ -27,6 +28,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
@Validated
|
||||
@Api(value = "Store", description = "the Store API")
|
||||
public interface StoreApi {
|
||||
|
||||
|
@ -11,6 +11,7 @@ import io.swagger.annotations.*;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
@ -27,6 +28,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
@Validated
|
||||
@Api(value = "User", description = "the User API")
|
||||
public interface UserApi {
|
||||
|
||||
|
@ -5,7 +5,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
@ -13,7 +12,6 @@ import javax.validation.constraints.*;
|
||||
* A category for a pet
|
||||
*/
|
||||
@ApiModel(description = "A category for a pet")
|
||||
@Validated
|
||||
|
||||
public class Category {
|
||||
@JsonProperty("id")
|
||||
|
@ -5,7 +5,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
@ -13,7 +12,6 @@ import javax.validation.constraints.*;
|
||||
* Describes the result of uploading an image resource
|
||||
*/
|
||||
@ApiModel(description = "Describes the result of uploading an image resource")
|
||||
@Validated
|
||||
|
||||
public class ModelApiResponse {
|
||||
@JsonProperty("code")
|
||||
|
@ -7,7 +7,6 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.time.OffsetDateTime;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
@ -15,7 +14,6 @@ import javax.validation.constraints.*;
|
||||
* An order for a pets from the pet store
|
||||
*/
|
||||
@ApiModel(description = "An order for a pets from the pet store")
|
||||
@Validated
|
||||
|
||||
public class Order {
|
||||
@JsonProperty("id")
|
||||
|
@ -10,7 +10,6 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.openapitools.model.Category;
|
||||
import org.openapitools.model.Tag;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
@ -18,7 +17,6 @@ import javax.validation.constraints.*;
|
||||
* A pet for sale in the pet store
|
||||
*/
|
||||
@ApiModel(description = "A pet for sale in the pet store")
|
||||
@Validated
|
||||
|
||||
public class Pet {
|
||||
@JsonProperty("id")
|
||||
|
@ -5,7 +5,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
@ -13,7 +12,6 @@ import javax.validation.constraints.*;
|
||||
* A tag for a pet
|
||||
*/
|
||||
@ApiModel(description = "A tag for a pet")
|
||||
@Validated
|
||||
|
||||
public class Tag {
|
||||
@JsonProperty("id")
|
||||
|
@ -5,7 +5,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
@ -13,7 +12,6 @@ import javax.validation.constraints.*;
|
||||
* A User who is purchasing from the pet store
|
||||
*/
|
||||
@ApiModel(description = "A User who is purchasing from the pet store")
|
||||
@Validated
|
||||
|
||||
public class User {
|
||||
@JsonProperty("id")
|
||||
|
@ -4,7 +4,6 @@ import com.netflix.hystrix.exception.HystrixRuntimeException;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.openapitools.Application;
|
||||
import org.openapitools.TestUtils;
|
||||
import org.openapitools.model.Order;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
@ -31,6 +30,11 @@ public class StoreApiTest {
|
||||
@Test
|
||||
public void testPlaceOrder() {
|
||||
Order order = createOrder();
|
||||
try {
|
||||
client.deleteOrder(order.getId().toString()).execute();
|
||||
} catch (HystrixRuntimeException e) {
|
||||
// noop
|
||||
}
|
||||
client.placeOrder(order).execute();
|
||||
|
||||
Order fetched = client.getOrderById(order.getId()).execute().getBody();
|
||||
@ -43,6 +47,7 @@ public class StoreApiTest {
|
||||
@Test
|
||||
public void testDeleteOrder() {
|
||||
Order order = createOrder();
|
||||
client.deleteOrder(order.getId().toString());
|
||||
client.placeOrder(order).execute();
|
||||
|
||||
Order fetched = client.getOrderById(order.getId()).execute().getBody();
|
||||
@ -60,7 +65,7 @@ public class StoreApiTest {
|
||||
|
||||
private Order createOrder() {
|
||||
return new Order()
|
||||
.id(TestUtils.nextId())
|
||||
.id(1L)
|
||||
.petId(200L)
|
||||
.quantity(13)
|
||||
//Ensure 3 fractional digits because of a bug in the petstore server
|
||||
|
@ -12,6 +12,7 @@ import io.swagger.annotations.*;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
@ -28,6 +29,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
@Validated
|
||||
@Api(value = "pet", description = "the pet API")
|
||||
public interface PetApi {
|
||||
|
||||
|
@ -11,6 +11,7 @@ import io.swagger.annotations.*;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
@ -27,6 +28,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
@Validated
|
||||
@Api(value = "store", description = "the store API")
|
||||
public interface StoreApi {
|
||||
|
||||
|
@ -11,6 +11,7 @@ import io.swagger.annotations.*;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
@ -27,6 +28,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
@Validated
|
||||
@Api(value = "user", description = "the user API")
|
||||
public interface UserApi {
|
||||
|
||||
|
@ -5,7 +5,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
@ -13,7 +12,6 @@ import javax.validation.constraints.*;
|
||||
* A category for a pet
|
||||
*/
|
||||
@ApiModel(description = "A category for a pet")
|
||||
@Validated
|
||||
|
||||
public class Category {
|
||||
@JsonProperty("id")
|
||||
|
@ -5,7 +5,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
@ -13,7 +12,6 @@ import javax.validation.constraints.*;
|
||||
* Describes the result of uploading an image resource
|
||||
*/
|
||||
@ApiModel(description = "Describes the result of uploading an image resource")
|
||||
@Validated
|
||||
|
||||
public class ModelApiResponse {
|
||||
@JsonProperty("code")
|
||||
|
@ -7,7 +7,6 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.time.OffsetDateTime;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
@ -15,7 +14,6 @@ import javax.validation.constraints.*;
|
||||
* An order for a pets from the pet store
|
||||
*/
|
||||
@ApiModel(description = "An order for a pets from the pet store")
|
||||
@Validated
|
||||
|
||||
public class Order {
|
||||
@JsonProperty("id")
|
||||
|
@ -10,7 +10,6 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.openapitools.model.Category;
|
||||
import org.openapitools.model.Tag;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
@ -18,7 +17,6 @@ import javax.validation.constraints.*;
|
||||
* A pet for sale in the pet store
|
||||
*/
|
||||
@ApiModel(description = "A pet for sale in the pet store")
|
||||
@Validated
|
||||
|
||||
public class Pet {
|
||||
@JsonProperty("id")
|
||||
|
@ -5,7 +5,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
@ -13,7 +12,6 @@ import javax.validation.constraints.*;
|
||||
* A tag for a pet
|
||||
*/
|
||||
@ApiModel(description = "A tag for a pet")
|
||||
@Validated
|
||||
|
||||
public class Tag {
|
||||
@JsonProperty("id")
|
||||
|
@ -5,7 +5,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
@ -13,7 +12,6 @@ import javax.validation.constraints.*;
|
||||
* A User who is purchasing from the pet store
|
||||
*/
|
||||
@ApiModel(description = "A User who is purchasing from the pet store")
|
||||
@Validated
|
||||
|
||||
public class User {
|
||||
@JsonProperty("id")
|
||||
|
@ -10,6 +10,7 @@ import io.swagger.annotations.*;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
@ -27,6 +28,7 @@ import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
@Validated
|
||||
@Api(value = "another-fake", description = "the another-fake API")
|
||||
public interface AnotherFakeApi {
|
||||
|
||||
|
@ -17,6 +17,7 @@ import io.swagger.annotations.*;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
@ -34,6 +35,7 @@ import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
@Validated
|
||||
@Api(value = "fake", description = "the fake API")
|
||||
public interface FakeApi {
|
||||
|
||||
|
@ -10,6 +10,7 @@ import io.swagger.annotations.*;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
@ -27,6 +28,7 @@ import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
@Validated
|
||||
@Api(value = "fake_classname_test", description = "the fake_classname_test API")
|
||||
public interface FakeClassnameTestApi {
|
||||
|
||||
|
@ -12,6 +12,7 @@ import io.swagger.annotations.*;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
@ -29,6 +30,7 @@ import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
@Validated
|
||||
@Api(value = "pet", description = "the pet API")
|
||||
public interface PetApi {
|
||||
|
||||
|
@ -11,6 +11,7 @@ import io.swagger.annotations.*;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
@ -28,6 +29,7 @@ import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
@Validated
|
||||
@Api(value = "store", description = "the store API")
|
||||
public interface StoreApi {
|
||||
|
||||
|
@ -11,6 +11,7 @@ import io.swagger.annotations.*;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
@ -28,6 +29,7 @@ import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
@Validated
|
||||
@Api(value = "user", description = "the user API")
|
||||
public interface UserApi {
|
||||
|
||||
|
@ -8,14 +8,12 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* AdditionalPropertiesClass
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class AdditionalPropertiesClass {
|
||||
@JsonProperty("map_property")
|
||||
|
@ -7,14 +7,12 @@ import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* Animal
|
||||
*/
|
||||
@Validated
|
||||
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true )
|
||||
@JsonSubTypes({
|
||||
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
||||
|
@ -4,14 +4,12 @@ import java.util.Objects;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.openapitools.model.Animal;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* AnimalFarm
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class AnimalFarm extends ArrayList<Animal> {
|
||||
|
||||
|
@ -8,14 +8,12 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* ArrayOfArrayOfNumberOnly
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class ArrayOfArrayOfNumberOnly {
|
||||
@JsonProperty("ArrayArrayNumber")
|
||||
|
@ -8,14 +8,12 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* ArrayOfNumberOnly
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class ArrayOfNumberOnly {
|
||||
@JsonProperty("ArrayNumber")
|
||||
|
@ -8,14 +8,12 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.openapitools.model.ReadOnlyFirst;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* ArrayTest
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class ArrayTest {
|
||||
@JsonProperty("array_of_string")
|
||||
|
@ -5,14 +5,12 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* Capitalization
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class Capitalization {
|
||||
@JsonProperty("smallCamel")
|
||||
|
@ -6,14 +6,12 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.model.Animal;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* Cat
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class Cat extends Animal {
|
||||
@JsonProperty("declawed")
|
||||
|
@ -5,14 +5,12 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* Category
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class Category {
|
||||
@JsonProperty("id")
|
||||
|
@ -5,7 +5,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
@ -13,7 +12,6 @@ import javax.validation.constraints.*;
|
||||
* Model for testing model with \"_class\" property
|
||||
*/
|
||||
@ApiModel(description = "Model for testing model with \"_class\" property")
|
||||
@Validated
|
||||
|
||||
public class ClassModel {
|
||||
@JsonProperty("_class")
|
||||
|
@ -5,14 +5,12 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* Client
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class Client {
|
||||
@JsonProperty("client")
|
||||
|
@ -6,14 +6,12 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.model.Animal;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* Dog
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class Dog extends Animal {
|
||||
@JsonProperty("breed")
|
||||
|
@ -8,14 +8,12 @@ import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* EnumArrays
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class EnumArrays {
|
||||
/**
|
||||
|
@ -2,7 +2,6 @@ package org.openapitools.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
@ -7,14 +7,12 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.model.OuterEnum;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* EnumTest
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class EnumTest {
|
||||
/**
|
||||
|
@ -10,14 +10,12 @@ import java.time.LocalDate;
|
||||
import java.time.OffsetDateTime;
|
||||
import java.util.UUID;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* FormatTest
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class FormatTest {
|
||||
@JsonProperty("integer")
|
||||
|
@ -5,14 +5,12 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* HasOnlyReadOnly
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class HasOnlyReadOnly {
|
||||
@JsonProperty("bar")
|
||||
|
@ -9,14 +9,12 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* MapTest
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class MapTest {
|
||||
@JsonProperty("map_map_of_string")
|
||||
|
@ -11,14 +11,12 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
import org.openapitools.model.Animal;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* MixedPropertiesAndAdditionalPropertiesClass
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class MixedPropertiesAndAdditionalPropertiesClass {
|
||||
@JsonProperty("uuid")
|
||||
|
@ -5,7 +5,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
@ -13,7 +12,6 @@ import javax.validation.constraints.*;
|
||||
* Model for testing model name starting with number
|
||||
*/
|
||||
@ApiModel(description = "Model for testing model name starting with number")
|
||||
@Validated
|
||||
|
||||
public class Model200Response {
|
||||
@JsonProperty("name")
|
||||
|
@ -5,14 +5,12 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* ModelApiResponse
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class ModelApiResponse {
|
||||
@JsonProperty("code")
|
||||
|
@ -5,7 +5,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
@ -13,7 +12,6 @@ import javax.validation.constraints.*;
|
||||
* Model for testing reserved words
|
||||
*/
|
||||
@ApiModel(description = "Model for testing reserved words")
|
||||
@Validated
|
||||
|
||||
public class ModelReturn {
|
||||
@JsonProperty("return")
|
||||
|
@ -5,7 +5,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
@ -13,7 +12,6 @@ import javax.validation.constraints.*;
|
||||
* Model for testing model name same as property name
|
||||
*/
|
||||
@ApiModel(description = "Model for testing model name same as property name")
|
||||
@Validated
|
||||
|
||||
public class Name {
|
||||
@JsonProperty("name")
|
||||
|
@ -6,14 +6,12 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* NumberOnly
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class NumberOnly {
|
||||
@JsonProperty("JustNumber")
|
||||
|
@ -7,14 +7,12 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.time.OffsetDateTime;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* Order
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class Order {
|
||||
@JsonProperty("id")
|
||||
|
@ -6,14 +6,12 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* OuterComposite
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class OuterComposite {
|
||||
@JsonProperty("my_number")
|
||||
|
@ -2,7 +2,6 @@ package org.openapitools.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
@ -10,14 +10,12 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.openapitools.model.Category;
|
||||
import org.openapitools.model.Tag;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* Pet
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class Pet {
|
||||
@JsonProperty("id")
|
||||
|
@ -5,14 +5,12 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* ReadOnlyFirst
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class ReadOnlyFirst {
|
||||
@JsonProperty("bar")
|
||||
|
@ -5,14 +5,12 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* SpecialModelName
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class SpecialModelName {
|
||||
@JsonProperty("$special[property.name]")
|
||||
|
@ -5,14 +5,12 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* Tag
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class Tag {
|
||||
@JsonProperty("id")
|
||||
|
@ -5,14 +5,12 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* User
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class User {
|
||||
@JsonProperty("id")
|
||||
|
@ -10,6 +10,7 @@ import io.swagger.annotations.*;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
@ -26,6 +27,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
@Validated
|
||||
@Api(value = "another-fake", description = "the another-fake API")
|
||||
public interface AnotherFakeApi {
|
||||
|
||||
|
@ -17,6 +17,7 @@ import io.swagger.annotations.*;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
@ -33,6 +34,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
@Validated
|
||||
@Api(value = "fake", description = "the fake API")
|
||||
public interface FakeApi {
|
||||
|
||||
|
@ -10,6 +10,7 @@ import io.swagger.annotations.*;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
@ -26,6 +27,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
@Validated
|
||||
@Api(value = "fake_classname_test", description = "the fake_classname_test API")
|
||||
public interface FakeClassnameTestApi {
|
||||
|
||||
|
@ -12,6 +12,7 @@ import io.swagger.annotations.*;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
@ -28,6 +29,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
@Validated
|
||||
@Api(value = "pet", description = "the pet API")
|
||||
public interface PetApi {
|
||||
|
||||
|
@ -11,6 +11,7 @@ import io.swagger.annotations.*;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
@ -27,6 +28,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
@Validated
|
||||
@Api(value = "store", description = "the store API")
|
||||
public interface StoreApi {
|
||||
|
||||
|
@ -11,6 +11,7 @@ import io.swagger.annotations.*;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
@ -27,6 +28,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
@Validated
|
||||
@Api(value = "user", description = "the user API")
|
||||
public interface UserApi {
|
||||
|
||||
|
@ -8,14 +8,12 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* AdditionalPropertiesClass
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class AdditionalPropertiesClass {
|
||||
@JsonProperty("map_property")
|
||||
|
@ -7,14 +7,12 @@ import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* Animal
|
||||
*/
|
||||
@Validated
|
||||
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true )
|
||||
@JsonSubTypes({
|
||||
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
||||
|
@ -4,14 +4,12 @@ import java.util.Objects;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.openapitools.model.Animal;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* AnimalFarm
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class AnimalFarm extends ArrayList<Animal> {
|
||||
|
||||
|
@ -8,14 +8,12 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* ArrayOfArrayOfNumberOnly
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class ArrayOfArrayOfNumberOnly {
|
||||
@JsonProperty("ArrayArrayNumber")
|
||||
|
@ -8,14 +8,12 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* ArrayOfNumberOnly
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class ArrayOfNumberOnly {
|
||||
@JsonProperty("ArrayNumber")
|
||||
|
@ -8,14 +8,12 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.openapitools.model.ReadOnlyFirst;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* ArrayTest
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class ArrayTest {
|
||||
@JsonProperty("array_of_string")
|
||||
|
@ -5,14 +5,12 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* Capitalization
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class Capitalization {
|
||||
@JsonProperty("smallCamel")
|
||||
|
@ -6,14 +6,12 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.model.Animal;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* Cat
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class Cat extends Animal {
|
||||
@JsonProperty("declawed")
|
||||
|
@ -5,14 +5,12 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* Category
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class Category {
|
||||
@JsonProperty("id")
|
||||
|
@ -5,7 +5,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
@ -13,7 +12,6 @@ import javax.validation.constraints.*;
|
||||
* Model for testing model with \"_class\" property
|
||||
*/
|
||||
@ApiModel(description = "Model for testing model with \"_class\" property")
|
||||
@Validated
|
||||
|
||||
public class ClassModel {
|
||||
@JsonProperty("_class")
|
||||
|
@ -5,14 +5,12 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* Client
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class Client {
|
||||
@JsonProperty("client")
|
||||
|
@ -6,14 +6,12 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.model.Animal;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* Dog
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class Dog extends Animal {
|
||||
@JsonProperty("breed")
|
||||
|
@ -8,14 +8,12 @@ import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* EnumArrays
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class EnumArrays {
|
||||
/**
|
||||
|
@ -2,7 +2,6 @@ package org.openapitools.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
@ -7,14 +7,12 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.model.OuterEnum;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* EnumTest
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class EnumTest {
|
||||
/**
|
||||
|
@ -10,14 +10,12 @@ import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.UUID;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* FormatTest
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class FormatTest {
|
||||
@JsonProperty("integer")
|
||||
|
@ -5,14 +5,12 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* HasOnlyReadOnly
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class HasOnlyReadOnly {
|
||||
@JsonProperty("bar")
|
||||
|
@ -9,14 +9,12 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* MapTest
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class MapTest {
|
||||
@JsonProperty("map_map_of_string")
|
||||
|
@ -11,14 +11,12 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
import org.openapitools.model.Animal;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* MixedPropertiesAndAdditionalPropertiesClass
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class MixedPropertiesAndAdditionalPropertiesClass {
|
||||
@JsonProperty("uuid")
|
||||
|
@ -5,7 +5,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
@ -13,7 +12,6 @@ import javax.validation.constraints.*;
|
||||
* Model for testing model name starting with number
|
||||
*/
|
||||
@ApiModel(description = "Model for testing model name starting with number")
|
||||
@Validated
|
||||
|
||||
public class Model200Response {
|
||||
@JsonProperty("name")
|
||||
|
@ -5,14 +5,12 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* ModelApiResponse
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class ModelApiResponse {
|
||||
@JsonProperty("code")
|
||||
|
@ -5,7 +5,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
@ -13,7 +12,6 @@ import javax.validation.constraints.*;
|
||||
* Model for testing reserved words
|
||||
*/
|
||||
@ApiModel(description = "Model for testing reserved words")
|
||||
@Validated
|
||||
|
||||
public class ModelReturn {
|
||||
@JsonProperty("return")
|
||||
|
@ -5,7 +5,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
@ -13,7 +12,6 @@ import javax.validation.constraints.*;
|
||||
* Model for testing model name same as property name
|
||||
*/
|
||||
@ApiModel(description = "Model for testing model name same as property name")
|
||||
@Validated
|
||||
|
||||
public class Name {
|
||||
@JsonProperty("name")
|
||||
|
@ -6,14 +6,12 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* NumberOnly
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class NumberOnly {
|
||||
@JsonProperty("JustNumber")
|
||||
|
@ -7,14 +7,12 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.time.LocalDateTime;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* Order
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class Order {
|
||||
@JsonProperty("id")
|
||||
|
@ -6,14 +6,12 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* OuterComposite
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class OuterComposite {
|
||||
@JsonProperty("my_number")
|
||||
|
@ -2,7 +2,6 @@ package org.openapitools.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
@ -10,14 +10,12 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.openapitools.model.Category;
|
||||
import org.openapitools.model.Tag;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* Pet
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class Pet {
|
||||
@JsonProperty("id")
|
||||
|
@ -5,14 +5,12 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* ReadOnlyFirst
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class ReadOnlyFirst {
|
||||
@JsonProperty("bar")
|
||||
|
@ -5,14 +5,12 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* SpecialModelName
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class SpecialModelName {
|
||||
@JsonProperty("$special[property.name]")
|
||||
|
@ -5,14 +5,12 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* Tag
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class Tag {
|
||||
@JsonProperty("id")
|
||||
|
@ -5,14 +5,12 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* User
|
||||
*/
|
||||
@Validated
|
||||
|
||||
public class User {
|
||||
@JsonProperty("id")
|
||||
|
@ -8,6 +8,7 @@ package org.openapitools.api;
|
||||
import org.openapitools.model.Client;
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
@ -22,6 +23,7 @@ import javax.validation.constraints.*;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Validated
|
||||
@Api(value = "another-fake", description = "the another-fake API")
|
||||
public interface AnotherFakeApi {
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user