fix: Using Map.Entry to avoid "reference to Entry is ambiguous" (#16445)

* fix: Using Map.Entry to avoid "reference to Entry is ambiguous"

when spec defines a model Entry it conflicts.  Also rest of mustache
uses  Map.Entry to matching it

* fix: Map.Entry - update samples
This commit is contained in:
William Caine
2023-08-30 00:57:53 -04:00
committed by GitHub
parent 8386a6eaaf
commit 134dc98a71
197 changed files with 164 additions and 361 deletions

View File

@@ -44,7 +44,6 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;

View File

@@ -45,7 +45,6 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;

View File

@@ -44,7 +44,6 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;

View File

@@ -48,7 +48,6 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -535,9 +534,9 @@ public class AdditionalPropertiesClass implements Parcelable {
}
}
Set<Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
for (Entry<String, JsonElement> entry : entries) {
for (Map.Entry<String, JsonElement> entry : entries) {
if (!AdditionalPropertiesClass.openapiFields.contains(entry.getKey())) {
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AdditionalPropertiesClass` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}

View File

@@ -44,7 +44,6 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;

View File

@@ -45,7 +45,6 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;

View File

@@ -45,7 +45,6 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;

View File

@@ -44,7 +44,6 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;

View File

@@ -44,7 +44,6 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;

View File

@@ -47,7 +47,6 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -178,9 +177,9 @@ public class ArrayOfArrayOfNumberOnly implements Parcelable {
}
}
Set<Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
for (Entry<String, JsonElement> entry : entries) {
for (Map.Entry<String, JsonElement> entry : entries) {
if (!ArrayOfArrayOfNumberOnly.openapiFields.contains(entry.getKey())) {
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ArrayOfArrayOfNumberOnly` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}

View File

@@ -47,7 +47,6 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -178,9 +177,9 @@ public class ArrayOfNumberOnly implements Parcelable {
}
}
Set<Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
for (Entry<String, JsonElement> entry : entries) {
for (Map.Entry<String, JsonElement> entry : entries) {
if (!ArrayOfNumberOnly.openapiFields.contains(entry.getKey())) {
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ArrayOfNumberOnly` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}

View File

@@ -47,7 +47,6 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -254,9 +253,9 @@ public class ArrayTest implements Parcelable {
}
}
Set<Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
for (Entry<String, JsonElement> entry : entries) {
for (Map.Entry<String, JsonElement> entry : entries) {
if (!ArrayTest.openapiFields.contains(entry.getKey())) {
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ArrayTest` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}

View File

@@ -45,7 +45,6 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -229,9 +228,9 @@ public class BigCat extends Cat implements Parcelable {
}
}
Set<Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
for (Entry<String, JsonElement> entry : entries) {
for (Map.Entry<String, JsonElement> entry : entries) {
if (!BigCat.openapiFields.contains(entry.getKey())) {
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BigCat` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}

View File

@@ -44,7 +44,6 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -317,9 +316,9 @@ public class Capitalization implements Parcelable {
}
}
Set<Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
for (Entry<String, JsonElement> entry : entries) {
for (Map.Entry<String, JsonElement> entry : entries) {
if (!Capitalization.openapiFields.contains(entry.getKey())) {
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Capitalization` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}

View File

@@ -45,7 +45,6 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;

View File

@@ -44,7 +44,6 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -198,9 +197,9 @@ public class Category implements Parcelable {
}
}
Set<Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
for (Entry<String, JsonElement> entry : entries) {
for (Map.Entry<String, JsonElement> entry : entries) {
if (!Category.openapiFields.contains(entry.getKey())) {
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Category` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}

View File

@@ -44,7 +44,6 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -167,9 +166,9 @@ public class ClassModel implements Parcelable {
}
}
Set<Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
for (Entry<String, JsonElement> entry : entries) {
for (Map.Entry<String, JsonElement> entry : entries) {
if (!ClassModel.openapiFields.contains(entry.getKey())) {
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ClassModel` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}

View File

@@ -44,7 +44,6 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -167,9 +166,9 @@ public class Client implements Parcelable {
}
}
Set<Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
for (Entry<String, JsonElement> entry : entries) {
for (Map.Entry<String, JsonElement> entry : entries) {
if (!Client.openapiFields.contains(entry.getKey())) {
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Client` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}

View File

@@ -45,7 +45,6 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -177,9 +176,9 @@ public class Dog extends Animal implements Parcelable {
}
}
Set<Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
for (Entry<String, JsonElement> entry : entries) {
for (Map.Entry<String, JsonElement> entry : entries) {
if (!Dog.openapiFields.contains(entry.getKey())) {
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Dog` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}

View File

@@ -46,7 +46,6 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -301,9 +300,9 @@ public class EnumArrays implements Parcelable {
}
}
Set<Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
for (Entry<String, JsonElement> entry : entries) {
for (Map.Entry<String, JsonElement> entry : entries) {
if (!EnumArrays.openapiFields.contains(entry.getKey())) {
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `EnumArrays` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}

View File

@@ -45,7 +45,6 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -481,9 +480,9 @@ public class EnumTest implements Parcelable {
}
}
Set<Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
for (Entry<String, JsonElement> entry : entries) {
for (Map.Entry<String, JsonElement> entry : entries) {
if (!EnumTest.openapiFields.contains(entry.getKey())) {
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `EnumTest` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}

View File

@@ -47,7 +47,6 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -208,9 +207,9 @@ public class FileSchemaTestClass implements Parcelable {
}
}
Set<Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
for (Entry<String, JsonElement> entry : entries) {
for (Map.Entry<String, JsonElement> entry : entries) {
if (!FileSchemaTestClass.openapiFields.contains(entry.getKey())) {
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FileSchemaTestClass` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}

View File

@@ -49,7 +49,6 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -576,9 +575,9 @@ public class FormatTest implements Parcelable {
}
}
Set<Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
for (Entry<String, JsonElement> entry : entries) {
for (Map.Entry<String, JsonElement> entry : entries) {
if (!FormatTest.openapiFields.contains(entry.getKey())) {
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FormatTest` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}

View File

@@ -44,7 +44,6 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -189,9 +188,9 @@ public class HasOnlyReadOnly implements Parcelable {
}
}
Set<Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
for (Entry<String, JsonElement> entry : entries) {
for (Map.Entry<String, JsonElement> entry : entries) {
if (!HasOnlyReadOnly.openapiFields.contains(entry.getKey())) {
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `HasOnlyReadOnly` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}

View File

@@ -46,7 +46,6 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -338,9 +337,9 @@ public class MapTest implements Parcelable {
}
}
Set<Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
for (Entry<String, JsonElement> entry : entries) {
for (Map.Entry<String, JsonElement> entry : entries) {
if (!MapTest.openapiFields.contains(entry.getKey())) {
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MapTest` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}

View File

@@ -49,7 +49,6 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -240,9 +239,9 @@ public class MixedPropertiesAndAdditionalPropertiesClass implements Parcelable {
}
}
Set<Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
for (Entry<String, JsonElement> entry : entries) {
for (Map.Entry<String, JsonElement> entry : entries) {
if (!MixedPropertiesAndAdditionalPropertiesClass.openapiFields.contains(entry.getKey())) {
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MixedPropertiesAndAdditionalPropertiesClass` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}

View File

@@ -44,7 +44,6 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -197,9 +196,9 @@ public class Model200Response implements Parcelable {
}
}
Set<Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
for (Entry<String, JsonElement> entry : entries) {
for (Map.Entry<String, JsonElement> entry : entries) {
if (!Model200Response.openapiFields.contains(entry.getKey())) {
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Model200Response` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}

View File

@@ -44,7 +44,6 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -227,9 +226,9 @@ public class ModelApiResponse implements Parcelable {
}
}
Set<Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
for (Entry<String, JsonElement> entry : entries) {
for (Map.Entry<String, JsonElement> entry : entries) {
if (!ModelApiResponse.openapiFields.contains(entry.getKey())) {
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ModelApiResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}

View File

@@ -44,7 +44,6 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -167,9 +166,9 @@ public class ModelFile implements Parcelable {
}
}
Set<Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
for (Entry<String, JsonElement> entry : entries) {
for (Map.Entry<String, JsonElement> entry : entries) {
if (!ModelFile.openapiFields.contains(entry.getKey())) {
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ModelFile` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}

View File

@@ -44,7 +44,6 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -167,9 +166,9 @@ public class ModelList implements Parcelable {
}
}
Set<Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
for (Entry<String, JsonElement> entry : entries) {
for (Map.Entry<String, JsonElement> entry : entries) {
if (!ModelList.openapiFields.contains(entry.getKey())) {
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ModelList` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}

View File

@@ -44,7 +44,6 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -167,9 +166,9 @@ public class ModelReturn implements Parcelable {
}
}
Set<Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
for (Entry<String, JsonElement> entry : entries) {
for (Map.Entry<String, JsonElement> entry : entries) {
if (!ModelReturn.openapiFields.contains(entry.getKey())) {
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ModelReturn` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}

View File

@@ -44,7 +44,6 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -250,9 +249,9 @@ public class Name implements Parcelable {
}
}
Set<Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
for (Entry<String, JsonElement> entry : entries) {
for (Map.Entry<String, JsonElement> entry : entries) {
if (!Name.openapiFields.contains(entry.getKey())) {
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Name` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}

View File

@@ -45,7 +45,6 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -168,9 +167,9 @@ public class NumberOnly implements Parcelable {
}
}
Set<Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
for (Entry<String, JsonElement> entry : entries) {
for (Map.Entry<String, JsonElement> entry : entries) {
if (!NumberOnly.openapiFields.contains(entry.getKey())) {
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `NumberOnly` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}

View File

@@ -45,7 +45,6 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -367,9 +366,9 @@ public class Order implements Parcelable {
}
}
Set<Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
for (Entry<String, JsonElement> entry : entries) {
for (Map.Entry<String, JsonElement> entry : entries) {
if (!Order.openapiFields.contains(entry.getKey())) {
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Order` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}

View File

@@ -45,7 +45,6 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -228,9 +227,9 @@ public class OuterComposite implements Parcelable {
}
}
Set<Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
for (Entry<String, JsonElement> entry : entries) {
for (Map.Entry<String, JsonElement> entry : entries) {
if (!OuterComposite.openapiFields.contains(entry.getKey())) {
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OuterComposite` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}

View File

@@ -50,7 +50,6 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -390,9 +389,9 @@ public class Pet implements Parcelable {
}
}
Set<Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
for (Entry<String, JsonElement> entry : entries) {
for (Map.Entry<String, JsonElement> entry : entries) {
if (!Pet.openapiFields.contains(entry.getKey())) {
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Pet` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}

View File

@@ -44,7 +44,6 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -196,9 +195,9 @@ public class ReadOnlyFirst implements Parcelable {
}
}
Set<Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
for (Entry<String, JsonElement> entry : entries) {
for (Map.Entry<String, JsonElement> entry : entries) {
if (!ReadOnlyFirst.openapiFields.contains(entry.getKey())) {
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReadOnlyFirst` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}

View File

@@ -44,7 +44,6 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -167,9 +166,9 @@ public class SpecialModelName implements Parcelable {
}
}
Set<Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
for (Entry<String, JsonElement> entry : entries) {
for (Map.Entry<String, JsonElement> entry : entries) {
if (!SpecialModelName.openapiFields.contains(entry.getKey())) {
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SpecialModelName` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}

View File

@@ -44,7 +44,6 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -197,9 +196,9 @@ public class Tag implements Parcelable {
}
}
Set<Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
for (Entry<String, JsonElement> entry : entries) {
for (Map.Entry<String, JsonElement> entry : entries) {
if (!Tag.openapiFields.contains(entry.getKey())) {
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Tag` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}

View File

@@ -47,7 +47,6 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -303,9 +302,9 @@ public class TypeHolderDefault implements Parcelable {
}
}
Set<Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
for (Entry<String, JsonElement> entry : entries) {
for (Map.Entry<String, JsonElement> entry : entries) {
if (!TypeHolderDefault.openapiFields.contains(entry.getKey())) {
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TypeHolderDefault` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}

View File

@@ -47,7 +47,6 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -334,9 +333,9 @@ public class TypeHolderExample implements Parcelable {
}
}
Set<Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
for (Entry<String, JsonElement> entry : entries) {
for (Map.Entry<String, JsonElement> entry : entries) {
if (!TypeHolderExample.openapiFields.contains(entry.getKey())) {
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TypeHolderExample` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}

View File

@@ -44,7 +44,6 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -377,9 +376,9 @@ public class User implements Parcelable {
}
}
Set<Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
for (Entry<String, JsonElement> entry : entries) {
for (Map.Entry<String, JsonElement> entry : entries) {
if (!User.openapiFields.contains(entry.getKey())) {
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `User` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}

View File

@@ -47,7 +47,6 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -1082,9 +1081,9 @@ public class XmlItem implements Parcelable {
}
}
Set<Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
for (Entry<String, JsonElement> entry : entries) {
for (Map.Entry<String, JsonElement> entry : entries) {
if (!XmlItem.openapiFields.contains(entry.getKey())) {
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `XmlItem` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}