Fix usage of javax.annotation (#6645)

* Fix usage of javax.annotation:javax.annotation-api

* Regenerate samples

```
bin/generate-samples.sh bin/configs/java-* bin/configs/jaxrs-* bin/configs/spring-* bin/configs/kotlin-* bin/configs/other/java-* bin/configs/other/jaxrs-* bin/configs/other/kotlin-* bin/configs/other/openapi3/jaxrs-cxf-client.yaml bin/configs/other/openapi3/kotlin-*
```
This commit is contained in:
Jochen Schalanda
2020-06-14 11:01:18 +02:00
committed by GitHub
parent e07f084e2a
commit 32adeddd8f
3075 changed files with 6183 additions and 4573 deletions

View File

@@ -23,7 +23,7 @@ import javax.validation.Valid;
import javax.validation.constraints.*;
import java.util.List;
import java.util.Map;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
@Validated
@Api(value = "another-fake", description = "the another-fake API")
public interface AnotherFakeApi {

View File

@@ -20,7 +20,7 @@ import javax.validation.constraints.*;
import javax.validation.Valid;
import java.util.List;
import java.util.Map;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
@Controller
@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}")
public class AnotherFakeApiController implements AnotherFakeApi {

View File

@@ -33,7 +33,7 @@ import javax.validation.Valid;
import javax.validation.constraints.*;
import java.util.List;
import java.util.Map;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
@Validated
@Api(value = "fake", description = "the fake API")
public interface FakeApi {

View File

@@ -30,7 +30,7 @@ import javax.validation.constraints.*;
import javax.validation.Valid;
import java.util.List;
import java.util.Map;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
@Controller
@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}")
public class FakeApiController implements FakeApi {

View File

@@ -23,7 +23,7 @@ import javax.validation.Valid;
import javax.validation.constraints.*;
import java.util.List;
import java.util.Map;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
@Validated
@Api(value = "fake_classname_test", description = "the fake_classname_test API")
public interface FakeClassnameTestApi {

View File

@@ -20,7 +20,7 @@ import javax.validation.constraints.*;
import javax.validation.Valid;
import java.util.List;
import java.util.Map;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
@Controller
@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}")
public class FakeClassnameTestApiController implements FakeClassnameTestApi {

View File

@@ -26,7 +26,7 @@ import javax.validation.Valid;
import javax.validation.constraints.*;
import java.util.List;
import java.util.Map;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
@Validated
@Api(value = "pet", description = "the pet API")
public interface PetApi {

View File

@@ -23,7 +23,7 @@ import javax.validation.constraints.*;
import javax.validation.Valid;
import java.util.List;
import java.util.Map;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
@Controller
@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}")
public class PetApiController implements PetApi {

View File

@@ -24,7 +24,7 @@ import javax.validation.Valid;
import javax.validation.constraints.*;
import java.util.List;
import java.util.Map;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
@Validated
@Api(value = "store", description = "the store API")
public interface StoreApi {

View File

@@ -21,7 +21,7 @@ import javax.validation.constraints.*;
import javax.validation.Valid;
import java.util.List;
import java.util.Map;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
@Controller
@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}")
public class StoreApiController implements StoreApi {

View File

@@ -24,7 +24,7 @@ import javax.validation.Valid;
import javax.validation.constraints.*;
import java.util.List;
import java.util.Map;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
@Validated
@Api(value = "user", description = "the user API")
public interface UserApi {

View File

@@ -21,7 +21,7 @@ import javax.validation.constraints.*;
import javax.validation.Valid;
import java.util.List;
import java.util.Map;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
@Controller
@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}")
public class UserApiController implements UserApi {

View File

@@ -17,7 +17,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
import javax.servlet.ServletContext;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
@Configuration
@EnableSwagger2
public class OpenAPIDocumentationConfig {

View File

@@ -14,7 +14,7 @@ import javax.validation.constraints.*;
/**
* AdditionalPropertiesAnyType
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class AdditionalPropertiesAnyType extends HashMap<String, Object> {
@JsonProperty("name")
private String name;

View File

@@ -15,7 +15,7 @@ import javax.validation.constraints.*;
/**
* AdditionalPropertiesArray
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class AdditionalPropertiesArray extends HashMap<String, List> {
@JsonProperty("name")
private String name;

View File

@@ -14,7 +14,7 @@ import javax.validation.constraints.*;
/**
* AdditionalPropertiesBoolean
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class AdditionalPropertiesBoolean extends HashMap<String, Boolean> {
@JsonProperty("name")
private String name;

View File

@@ -16,7 +16,7 @@ import javax.validation.constraints.*;
/**
* AdditionalPropertiesClass
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class AdditionalPropertiesClass {
@JsonProperty("map_string")
@Valid

View File

@@ -14,7 +14,7 @@ import javax.validation.constraints.*;
/**
* AdditionalPropertiesInteger
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class AdditionalPropertiesInteger extends HashMap<String, Integer> {
@JsonProperty("name")
private String name;

View File

@@ -15,7 +15,7 @@ import javax.validation.constraints.*;
/**
* AdditionalPropertiesNumber
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class AdditionalPropertiesNumber extends HashMap<String, BigDecimal> {
@JsonProperty("name")
private String name;

View File

@@ -14,7 +14,7 @@ import javax.validation.constraints.*;
/**
* AdditionalPropertiesObject
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class AdditionalPropertiesObject extends HashMap<String, Map> {
@JsonProperty("name")
private String name;

View File

@@ -14,7 +14,7 @@ import javax.validation.constraints.*;
/**
* AdditionalPropertiesString
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class AdditionalPropertiesString extends HashMap<String, String> {
@JsonProperty("name")
private String name;

View File

@@ -14,7 +14,7 @@ import javax.validation.constraints.*;
/**
* Animal
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true)
@JsonSubTypes({
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),

View File

@@ -15,7 +15,7 @@ import javax.validation.constraints.*;
/**
* ArrayOfArrayOfNumberOnly
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class ArrayOfArrayOfNumberOnly {
@JsonProperty("ArrayArrayNumber")
@Valid

View File

@@ -15,7 +15,7 @@ import javax.validation.constraints.*;
/**
* ArrayOfNumberOnly
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class ArrayOfNumberOnly {
@JsonProperty("ArrayNumber")
@Valid

View File

@@ -15,7 +15,7 @@ import javax.validation.constraints.*;
/**
* ArrayTest
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class ArrayTest {
@JsonProperty("array_of_string")
@Valid

View File

@@ -15,7 +15,7 @@ import javax.validation.constraints.*;
/**
* BigCat
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class BigCat extends Cat {
/**
* Gets or Sets kind

View File

@@ -13,7 +13,7 @@ import javax.validation.constraints.*;
/**
* BigCatAllOf
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class BigCatAllOf {
/**
* Gets or Sets kind

View File

@@ -12,7 +12,7 @@ import javax.validation.constraints.*;
/**
* Capitalization
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class Capitalization {
@JsonProperty("smallCamel")
private String smallCamel;

View File

@@ -14,7 +14,7 @@ import javax.validation.constraints.*;
/**
* Cat
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class Cat extends Animal {
@JsonProperty("declawed")
private Boolean declawed;

View File

@@ -12,7 +12,7 @@ import javax.validation.constraints.*;
/**
* CatAllOf
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class CatAllOf {
@JsonProperty("declawed")
private Boolean declawed;

View File

@@ -12,7 +12,7 @@ import javax.validation.constraints.*;
/**
* Category
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class Category {
@JsonProperty("id")
private Long id;

View File

@@ -13,7 +13,7 @@ import javax.validation.constraints.*;
* Model for testing model with \&quot;_class\&quot; property
*/
@ApiModel(description = "Model for testing model with \"_class\" property")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class ClassModel {
@JsonProperty("_class")
private String propertyClass;

View File

@@ -12,7 +12,7 @@ import javax.validation.constraints.*;
/**
* Client
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class Client {
@JsonProperty("client")
private String client;

View File

@@ -14,7 +14,7 @@ import javax.validation.constraints.*;
/**
* Dog
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class Dog extends Animal {
@JsonProperty("breed")
private String breed;

View File

@@ -12,7 +12,7 @@ import javax.validation.constraints.*;
/**
* DogAllOf
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class DogAllOf {
@JsonProperty("breed")
private String breed;

View File

@@ -15,7 +15,7 @@ import javax.validation.constraints.*;
/**
* EnumArrays
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class EnumArrays {
/**
* Gets or Sets justSymbol

View File

@@ -14,7 +14,7 @@ import javax.validation.constraints.*;
/**
* EnumTest
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class EnumTest {
/**
* Gets or Sets enumString

View File

@@ -14,7 +14,7 @@ import javax.validation.constraints.*;
/**
* FileSchemaTestClass
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class FileSchemaTestClass {
@JsonProperty("file")
private java.io.File file;

View File

@@ -17,7 +17,7 @@ import javax.validation.constraints.*;
/**
* FormatTest
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class FormatTest {
@JsonProperty("integer")
private Integer integer;

View File

@@ -12,7 +12,7 @@ import javax.validation.constraints.*;
/**
* HasOnlyReadOnly
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class HasOnlyReadOnly {
@JsonProperty("bar")
private String bar;

View File

@@ -16,7 +16,7 @@ import javax.validation.constraints.*;
/**
* MapTest
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class MapTest {
@JsonProperty("map_map_of_string")
@Valid

View File

@@ -18,7 +18,7 @@ import javax.validation.constraints.*;
/**
* MixedPropertiesAndAdditionalPropertiesClass
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class MixedPropertiesAndAdditionalPropertiesClass {
@JsonProperty("uuid")
private UUID uuid;

View File

@@ -13,7 +13,7 @@ import javax.validation.constraints.*;
* Model for testing model name starting with number
*/
@ApiModel(description = "Model for testing model name starting with number")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class Model200Response {
@JsonProperty("name")
private Integer name;

View File

@@ -12,7 +12,7 @@ import javax.validation.constraints.*;
/**
* ModelApiResponse
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class ModelApiResponse {
@JsonProperty("code")
private Integer code;

View File

@@ -13,7 +13,7 @@ import javax.validation.constraints.*;
* Model for testing reserved words
*/
@ApiModel(description = "Model for testing reserved words")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class ModelReturn {
@JsonProperty("return")
private Integer _return;

View File

@@ -13,7 +13,7 @@ import javax.validation.constraints.*;
* Model for testing model name same as property name
*/
@ApiModel(description = "Model for testing model name same as property name")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class Name {
@JsonProperty("name")
private Integer name;

View File

@@ -13,7 +13,7 @@ import javax.validation.constraints.*;
/**
* NumberOnly
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class NumberOnly {
@JsonProperty("JustNumber")
private BigDecimal justNumber;

View File

@@ -14,7 +14,7 @@ import javax.validation.constraints.*;
/**
* Order
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class Order {
@JsonProperty("id")
private Long id;

View File

@@ -13,7 +13,7 @@ import javax.validation.constraints.*;
/**
* OuterComposite
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class OuterComposite {
@JsonProperty("my_number")
private BigDecimal myNumber;

View File

@@ -19,7 +19,7 @@ import javax.validation.constraints.*;
/**
* Pet
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class Pet {
@JsonProperty("id")
private Long id;

View File

@@ -12,7 +12,7 @@ import javax.validation.constraints.*;
/**
* ReadOnlyFirst
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class ReadOnlyFirst {
@JsonProperty("bar")
private String bar;

View File

@@ -12,7 +12,7 @@ import javax.validation.constraints.*;
/**
* SpecialModelName
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class SpecialModelName {
@JsonProperty("$special[property.name]")
private Long $specialPropertyName;

View File

@@ -12,7 +12,7 @@ import javax.validation.constraints.*;
/**
* Tag
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class Tag {
@JsonProperty("id")
private Long id;

View File

@@ -15,7 +15,7 @@ import javax.validation.constraints.*;
/**
* TypeHolderDefault
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class TypeHolderDefault {
@JsonProperty("string_item")
private String stringItem = "what";

View File

@@ -15,7 +15,7 @@ import javax.validation.constraints.*;
/**
* TypeHolderExample
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class TypeHolderExample {
@JsonProperty("string_item")
private String stringItem;

View File

@@ -12,7 +12,7 @@ import javax.validation.constraints.*;
/**
* User
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class User {
@JsonProperty("id")
private Long id;

View File

@@ -15,7 +15,7 @@ import javax.validation.constraints.*;
/**
* XmlItem
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
public class XmlItem {
@JsonProperty("attribute_string")
private String attributeString;