mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-10 00:16:10 +00:00
Java: Optimize HashSet Initialization (#21205)
* Optimize HashSet Initialization Noticed this while debugging - we can avoid wasting memory/cpu creating 16 buckets when we only need one or a few. * generate samples * use Arrays.asList
This commit is contained in:
@@ -167,11 +167,10 @@ public class AdditionalPropertiesAnyType {
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("name");
|
||||
openapiFields = new HashSet<String>(Arrays.asList("name"));
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields = new HashSet<String>(0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -168,11 +168,10 @@ public class AdditionalPropertiesArray {
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("name");
|
||||
openapiFields = new HashSet<String>(Arrays.asList("name"));
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields = new HashSet<String>(0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -167,11 +167,10 @@ public class AdditionalPropertiesBoolean {
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("name");
|
||||
openapiFields = new HashSet<String>(Arrays.asList("name"));
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields = new HashSet<String>(0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -449,21 +449,10 @@ public class AdditionalPropertiesClass {
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("map_string");
|
||||
openapiFields.add("map_number");
|
||||
openapiFields.add("map_integer");
|
||||
openapiFields.add("map_boolean");
|
||||
openapiFields.add("map_array_integer");
|
||||
openapiFields.add("map_array_anytype");
|
||||
openapiFields.add("map_map_string");
|
||||
openapiFields.add("map_map_anytype");
|
||||
openapiFields.add("anytype_1");
|
||||
openapiFields.add("anytype_2");
|
||||
openapiFields.add("anytype_3");
|
||||
openapiFields = new HashSet<String>(Arrays.asList("map_string", "map_number", "map_integer", "map_boolean", "map_array_integer", "map_array_anytype", "map_map_string", "map_map_anytype", "anytype_1", "anytype_2", "anytype_3"));
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields = new HashSet<String>(0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -167,11 +167,10 @@ public class AdditionalPropertiesInteger {
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("name");
|
||||
openapiFields = new HashSet<String>(Arrays.asList("name"));
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields = new HashSet<String>(0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -168,11 +168,10 @@ public class AdditionalPropertiesNumber {
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("name");
|
||||
openapiFields = new HashSet<String>(Arrays.asList("name"));
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields = new HashSet<String>(0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -168,11 +168,10 @@ public class AdditionalPropertiesObject {
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("name");
|
||||
openapiFields = new HashSet<String>(Arrays.asList("name"));
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields = new HashSet<String>(0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -167,11 +167,10 @@ public class AdditionalPropertiesString {
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("name");
|
||||
openapiFields = new HashSet<String>(Arrays.asList("name"));
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields = new HashSet<String>(0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -148,13 +148,10 @@ public class Animal {
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("className");
|
||||
openapiFields.add("color");
|
||||
openapiFields = new HashSet<String>(Arrays.asList("className", "color"));
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields.add("className");
|
||||
openapiRequiredFields = new HashSet<String>(Arrays.asList("className"));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -132,11 +132,10 @@ public class ArrayOfArrayOfNumberOnly {
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("ArrayArrayNumber");
|
||||
openapiFields = new HashSet<String>(Arrays.asList("ArrayArrayNumber"));
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields = new HashSet<String>(0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -132,11 +132,10 @@ public class ArrayOfNumberOnly {
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("ArrayNumber");
|
||||
openapiFields = new HashSet<String>(Arrays.asList("ArrayNumber"));
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields = new HashSet<String>(0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -200,13 +200,10 @@ public class ArrayTest {
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("array_of_string");
|
||||
openapiFields.add("array_array_of_integer");
|
||||
openapiFields.add("array_array_of_model");
|
||||
openapiFields = new HashSet<String>(Arrays.asList("array_of_string", "array_array_of_integer", "array_array_of_model"));
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields = new HashSet<String>(0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -181,15 +181,10 @@ public class BigCat extends Cat {
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("className");
|
||||
openapiFields.add("color");
|
||||
openapiFields.add("declawed");
|
||||
openapiFields.add("kind");
|
||||
openapiFields = new HashSet<String>(Arrays.asList("className", "color", "declawed", "kind"));
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields.add("className");
|
||||
openapiRequiredFields = new HashSet<String>(Arrays.asList("className"));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -251,16 +251,10 @@ public class Capitalization {
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("smallCamel");
|
||||
openapiFields.add("CapitalCamel");
|
||||
openapiFields.add("small_Snake");
|
||||
openapiFields.add("Capital_Snake");
|
||||
openapiFields.add("SCA_ETH_Flow_Points");
|
||||
openapiFields.add("ATT_NAME");
|
||||
openapiFields = new HashSet<String>(Arrays.asList("smallCamel", "CapitalCamel", "small_Snake", "Capital_Snake", "SCA_ETH_Flow_Points", "ATT_NAME"));
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields = new HashSet<String>(0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -125,14 +125,10 @@ public class Cat extends Animal {
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("className");
|
||||
openapiFields.add("color");
|
||||
openapiFields.add("declawed");
|
||||
openapiFields = new HashSet<String>(Arrays.asList("className", "color", "declawed"));
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields.add("className");
|
||||
openapiRequiredFields = new HashSet<String>(Arrays.asList("className"));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -147,13 +147,10 @@ public class Category {
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("id");
|
||||
openapiFields.add("name");
|
||||
openapiFields = new HashSet<String>(Arrays.asList("id", "name"));
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields.add("name");
|
||||
openapiRequiredFields = new HashSet<String>(Arrays.asList("name"));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -121,11 +121,10 @@ public class ClassModel {
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("_class");
|
||||
openapiFields = new HashSet<String>(Arrays.asList("_class"));
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields = new HashSet<String>(0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -121,11 +121,10 @@ public class Client {
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("client");
|
||||
openapiFields = new HashSet<String>(Arrays.asList("client"));
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields = new HashSet<String>(0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -125,14 +125,10 @@ public class Dog extends Animal {
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("className");
|
||||
openapiFields.add("color");
|
||||
openapiFields.add("breed");
|
||||
openapiFields = new HashSet<String>(Arrays.asList("className", "color", "breed"));
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields.add("className");
|
||||
openapiRequiredFields = new HashSet<String>(Arrays.asList("className"));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -261,12 +261,10 @@ public class EnumArrays {
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("just_symbol");
|
||||
openapiFields.add("array_enum");
|
||||
openapiFields = new HashSet<String>(Arrays.asList("just_symbol", "array_enum"));
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields = new HashSet<String>(0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -438,16 +438,10 @@ public class EnumTest {
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("enum_string");
|
||||
openapiFields.add("enum_string_required");
|
||||
openapiFields.add("enum_integer");
|
||||
openapiFields.add("enum_number");
|
||||
openapiFields.add("outerEnum");
|
||||
openapiFields = new HashSet<String>(Arrays.asList("enum_string", "enum_string_required", "enum_integer", "enum_number", "outerEnum"));
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields.add("enum_string_required");
|
||||
openapiRequiredFields = new HashSet<String>(Arrays.asList("enum_string_required"));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -158,12 +158,10 @@ public class FileSchemaTestClass {
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("file");
|
||||
openapiFields.add("files");
|
||||
openapiFields = new HashSet<String>(Arrays.asList("file", "files"));
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields = new HashSet<String>(0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -474,28 +474,10 @@ public class FormatTest {
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("integer");
|
||||
openapiFields.add("int32");
|
||||
openapiFields.add("int64");
|
||||
openapiFields.add("number");
|
||||
openapiFields.add("float");
|
||||
openapiFields.add("double");
|
||||
openapiFields.add("string");
|
||||
openapiFields.add("byte");
|
||||
openapiFields.add("binary");
|
||||
openapiFields.add("date");
|
||||
openapiFields.add("dateTime");
|
||||
openapiFields.add("uuid");
|
||||
openapiFields.add("password");
|
||||
openapiFields.add("BigDecimal");
|
||||
openapiFields = new HashSet<String>(Arrays.asList("integer", "int32", "int64", "number", "float", "double", "string", "byte", "binary", "date", "dateTime", "uuid", "password", "BigDecimal"));
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields.add("number");
|
||||
openapiRequiredFields.add("byte");
|
||||
openapiRequiredFields.add("date");
|
||||
openapiRequiredFields.add("password");
|
||||
openapiRequiredFields = new HashSet<String>(Arrays.asList("number", "byte", "date", "password"));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -140,12 +140,10 @@ public class HasOnlyReadOnly {
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("bar");
|
||||
openapiFields.add("foo");
|
||||
openapiFields = new HashSet<String>(Arrays.asList("bar", "foo"));
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields = new HashSet<String>(0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -285,14 +285,10 @@ public class MapTest {
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("map_map_of_string");
|
||||
openapiFields.add("map_of_enum_string");
|
||||
openapiFields.add("direct_map");
|
||||
openapiFields.add("indirect_map");
|
||||
openapiFields = new HashSet<String>(Arrays.asList("map_map_of_string", "map_of_enum_string", "direct_map", "indirect_map"));
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields = new HashSet<String>(0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -186,13 +186,10 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("uuid");
|
||||
openapiFields.add("dateTime");
|
||||
openapiFields.add("map");
|
||||
openapiFields = new HashSet<String>(Arrays.asList("uuid", "dateTime", "map"));
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields = new HashSet<String>(0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -147,12 +147,10 @@ public class Model200Response {
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("name");
|
||||
openapiFields.add("class");
|
||||
openapiFields = new HashSet<String>(Arrays.asList("name", "class"));
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields = new HashSet<String>(0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -173,13 +173,10 @@ public class ModelApiResponse {
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("code");
|
||||
openapiFields.add("type");
|
||||
openapiFields.add("message");
|
||||
openapiFields = new HashSet<String>(Arrays.asList("code", "type", "message"));
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields = new HashSet<String>(0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -121,11 +121,10 @@ public class ModelFile {
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("sourceURI");
|
||||
openapiFields = new HashSet<String>(Arrays.asList("sourceURI"));
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields = new HashSet<String>(0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -121,11 +121,10 @@ public class ModelList {
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("123-list");
|
||||
openapiFields = new HashSet<String>(Arrays.asList("123-list"));
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields = new HashSet<String>(0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -121,11 +121,10 @@ public class ModelReturn {
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("return");
|
||||
openapiFields = new HashSet<String>(Arrays.asList("return"));
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields = new HashSet<String>(0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -192,15 +192,10 @@ public class Name {
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("name");
|
||||
openapiFields.add("snake_case");
|
||||
openapiFields.add("property");
|
||||
openapiFields.add("123Number");
|
||||
openapiFields = new HashSet<String>(Arrays.asList("name", "snake_case", "property", "123Number"));
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields.add("name");
|
||||
openapiRequiredFields = new HashSet<String>(Arrays.asList("name"));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -122,11 +122,10 @@ public class NumberOnly {
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("JustNumber");
|
||||
openapiFields = new HashSet<String>(Arrays.asList("JustNumber"));
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields = new HashSet<String>(0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -306,16 +306,10 @@ public class Order {
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("id");
|
||||
openapiFields.add("petId");
|
||||
openapiFields.add("quantity");
|
||||
openapiFields.add("shipDate");
|
||||
openapiFields.add("status");
|
||||
openapiFields.add("complete");
|
||||
openapiFields = new HashSet<String>(Arrays.asList("id", "petId", "quantity", "shipDate", "status", "complete"));
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields = new HashSet<String>(0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -174,13 +174,10 @@ public class OuterComposite {
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("my_number");
|
||||
openapiFields.add("my_string");
|
||||
openapiFields.add("my_boolean");
|
||||
openapiFields = new HashSet<String>(Arrays.asList("my_number", "my_string", "my_boolean"));
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields = new HashSet<String>(0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -327,18 +327,10 @@ public class Pet {
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("id");
|
||||
openapiFields.add("category");
|
||||
openapiFields.add("name");
|
||||
openapiFields.add("photoUrls");
|
||||
openapiFields.add("tags");
|
||||
openapiFields.add("status");
|
||||
openapiFields = new HashSet<String>(Arrays.asList("id", "category", "name", "photoUrls", "tags", "status"));
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields.add("name");
|
||||
openapiRequiredFields.add("photoUrls");
|
||||
openapiRequiredFields = new HashSet<String>(Arrays.asList("name", "photoUrls"));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -146,12 +146,10 @@ public class ReadOnlyFirst {
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("bar");
|
||||
openapiFields.add("baz");
|
||||
openapiFields = new HashSet<String>(Arrays.asList("bar", "baz"));
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields = new HashSet<String>(0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -121,11 +121,10 @@ public class SpecialModelName {
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("$special[property.name]");
|
||||
openapiFields = new HashSet<String>(Arrays.asList("$special[property.name]"));
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields = new HashSet<String>(0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -147,12 +147,10 @@ public class Tag {
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("id");
|
||||
openapiFields.add("name");
|
||||
openapiFields = new HashSet<String>(Arrays.asList("id", "name"));
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields = new HashSet<String>(0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -236,20 +236,10 @@ public class TypeHolderDefault {
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("string_item");
|
||||
openapiFields.add("number_item");
|
||||
openapiFields.add("integer_item");
|
||||
openapiFields.add("bool_item");
|
||||
openapiFields.add("array_item");
|
||||
openapiFields = new HashSet<String>(Arrays.asList("string_item", "number_item", "integer_item", "bool_item", "array_item"));
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields.add("string_item");
|
||||
openapiRequiredFields.add("number_item");
|
||||
openapiRequiredFields.add("integer_item");
|
||||
openapiRequiredFields.add("bool_item");
|
||||
openapiRequiredFields.add("array_item");
|
||||
openapiRequiredFields = new HashSet<String>(Arrays.asList("string_item", "number_item", "integer_item", "bool_item", "array_item"));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -262,22 +262,10 @@ public class TypeHolderExample {
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("string_item");
|
||||
openapiFields.add("number_item");
|
||||
openapiFields.add("float_item");
|
||||
openapiFields.add("integer_item");
|
||||
openapiFields.add("bool_item");
|
||||
openapiFields.add("array_item");
|
||||
openapiFields = new HashSet<String>(Arrays.asList("string_item", "number_item", "float_item", "integer_item", "bool_item", "array_item"));
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields.add("string_item");
|
||||
openapiRequiredFields.add("number_item");
|
||||
openapiRequiredFields.add("float_item");
|
||||
openapiRequiredFields.add("integer_item");
|
||||
openapiRequiredFields.add("bool_item");
|
||||
openapiRequiredFields.add("array_item");
|
||||
openapiRequiredFields = new HashSet<String>(Arrays.asList("string_item", "number_item", "float_item", "integer_item", "bool_item", "array_item"));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -303,18 +303,10 @@ public class User {
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("id");
|
||||
openapiFields.add("username");
|
||||
openapiFields.add("firstName");
|
||||
openapiFields.add("lastName");
|
||||
openapiFields.add("email");
|
||||
openapiFields.add("password");
|
||||
openapiFields.add("phone");
|
||||
openapiFields.add("userStatus");
|
||||
openapiFields = new HashSet<String>(Arrays.asList("id", "username", "firstName", "lastName", "email", "password", "phone", "userStatus"));
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields = new HashSet<String>(0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -924,39 +924,10 @@ public class XmlItem {
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("attribute_string");
|
||||
openapiFields.add("attribute_number");
|
||||
openapiFields.add("attribute_integer");
|
||||
openapiFields.add("attribute_boolean");
|
||||
openapiFields.add("wrapped_array");
|
||||
openapiFields.add("name_string");
|
||||
openapiFields.add("name_number");
|
||||
openapiFields.add("name_integer");
|
||||
openapiFields.add("name_boolean");
|
||||
openapiFields.add("name_array");
|
||||
openapiFields.add("name_wrapped_array");
|
||||
openapiFields.add("prefix_string");
|
||||
openapiFields.add("prefix_number");
|
||||
openapiFields.add("prefix_integer");
|
||||
openapiFields.add("prefix_boolean");
|
||||
openapiFields.add("prefix_array");
|
||||
openapiFields.add("prefix_wrapped_array");
|
||||
openapiFields.add("namespace_string");
|
||||
openapiFields.add("namespace_number");
|
||||
openapiFields.add("namespace_integer");
|
||||
openapiFields.add("namespace_boolean");
|
||||
openapiFields.add("namespace_array");
|
||||
openapiFields.add("namespace_wrapped_array");
|
||||
openapiFields.add("prefix_ns_string");
|
||||
openapiFields.add("prefix_ns_number");
|
||||
openapiFields.add("prefix_ns_integer");
|
||||
openapiFields.add("prefix_ns_boolean");
|
||||
openapiFields.add("prefix_ns_array");
|
||||
openapiFields.add("prefix_ns_wrapped_array");
|
||||
openapiFields = new HashSet<String>(Arrays.asList("attribute_string", "attribute_number", "attribute_integer", "attribute_boolean", "wrapped_array", "name_string", "name_number", "name_integer", "name_boolean", "name_array", "name_wrapped_array", "prefix_string", "prefix_number", "prefix_integer", "prefix_boolean", "prefix_array", "prefix_wrapped_array", "namespace_string", "namespace_number", "namespace_integer", "namespace_boolean", "namespace_array", "namespace_wrapped_array", "prefix_ns_string", "prefix_ns_number", "prefix_ns_integer", "prefix_ns_boolean", "prefix_ns_array", "prefix_ns_wrapped_array"));
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
openapiRequiredFields = new HashSet<String>(0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user