From 0396533fe2d39a72899579ab927554f6b089c1fc Mon Sep 17 00:00:00 2001 From: fstotz Date: Thu, 7 May 2026 14:22:20 +0200 Subject: [PATCH 01/14] fix the issue of multi layer issues with dart-dio code generation --- .../languages/DartDioClientCodegen.java | 187 +++++++++++++++++- .../built_value/class_discriminator.mustache | 21 +- .../built_value/class_serializer.mustache | 8 +- .../codegen/dart/dio/DartDioModelTest.java | 98 +++++++++ .../src/test/resources/bugs/issue_15467.json | 80 ++++++++ 5 files changed, 375 insertions(+), 19 deletions(-) create mode 100644 modules/openapi-generator/src/test/resources/bugs/issue_15467.json diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java index 077f79904a69..eae2b9a155a0 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java @@ -77,6 +77,9 @@ public class DartDioClientCodegen extends AbstractDartCodegen { public static final String SKIP_COPY_WITH_DEFAULT_VALUE = "false"; private static final String CLIENT_NAME = "clientName"; + private static final String X_DISCRIMINATOR_MAPPED_MODELS_NONSELF = "x-discriminator-mapped-models-nonself"; + private static final String X_HAS_DISCRIMINATOR_SELF_MAPPING = "x-has-discriminator-self-mapping"; + private static final String X_DISCRIMINATOR_SELF_MAPPING_NAME = "x-discriminator-self-mapping-name"; @Getter @Setter private String dateLibrary; @@ -582,36 +585,200 @@ private void adaptToDartInheritance(Map objs) { } } + private int getSchemaInheritanceDepth(String schemaName, String ancestorSchemaName, Set visited) { + if (schemaName == null || ancestorSchemaName == null) { + return -1; + } + if (schemaName.equals(ancestorSchemaName)) { + return 0; + } + + Schema currentSchema = ModelUtils.getSchema(openAPI, schemaName); + if (currentSchema == null || currentSchema.getAllOf() == null || currentSchema.getAllOf().isEmpty()) { + return -1; + } + + int maxDepth = -1; + for (Object parentObj : currentSchema.getAllOf()) { + if (!(parentObj instanceof Schema)) { + continue; + } + Schema parentSchema = (Schema) parentObj; + String parentRef = parentSchema.get$ref(); + if (parentRef == null) { + continue; + } + + String parentSchemaName = ModelUtils.getSimpleRef(parentRef); + if (ancestorSchemaName.equals(parentSchemaName)) { + maxDepth = Math.max(maxDepth, 1); + continue; + } + + if (parentSchemaName != null && visited.add(parentSchemaName)) { + int parentDepth = getSchemaInheritanceDepth(parentSchemaName, ancestorSchemaName, visited); + if (parentDepth >= 0) { + maxDepth = Math.max(maxDepth, parentDepth + 1); + } + visited.remove(parentSchemaName); + } + } + + return maxDepth; + } + /// override the default behavior of createDiscriminator /// to remove extra mappings added as a side effect of setLegacyDiscriminatorBehavior(false) /// this ensures 1-1 schema mapping instead of 1-many @Override protected CodegenDiscriminator createDiscriminator(String schemaName, Schema schema) { CodegenDiscriminator sub = super.createDiscriminator(schemaName, schema); - Discriminator originalDiscriminator = schema.getDiscriminator(); + if (sub == null) { + return null; + } + + if (sub.getMapping() != null) { + // Defensive copy: avoid mutating shared mapping objects from the parsed spec. + sub.setMapping(new LinkedHashMap<>(sub.getMapping())); + } + + Discriminator originalDiscriminator = getSchemaLocalDiscriminator(schema); if (originalDiscriminator != null) { Map originalMapping = originalDiscriminator.getMapping(); if (originalMapping != null && !originalMapping.isEmpty()) { - //we already have a discriminator mapping, remove everything else - for (MappedModel currentMappings : new HashSet<>(sub.getMappedModels())) { - if (originalMapping.containsKey(currentMappings.getMappingName())) { - //all good - } else { - sub.getMapping().remove(currentMappings.getMappingName()); - sub.getMappedModels().remove(currentMappings); - } - } + // keep only explicitly declared mappings on the schema-local discriminator + filterMappedModels(sub, mappedModel -> originalMapping.containsKey(mappedModel.getMappingName())); } + orderMappedModelsBySchemaSpecificity(sub, schemaName); + prepareDiscriminatorTemplateData(sub, schemaName, toModelName(schemaName)); + return sub; } + + // For inherited discriminators, keep only real allOf descendants of this schema + // (e.g. Reptile keeps Crocodile/Turtle, but not Bird from Animal's mapping). + Set descendantSchemaNames = getAllOfDescendants(schemaName).stream() + .map(MappedModel::getSchemaName) + .filter(Objects::nonNull) + .collect(Collectors.toSet()); + + if (ModelUtils.isComposedSchema(schema) && schema.getAllOf() != null) { + filterMappedModels(sub, mappedModel -> descendantSchemaNames.contains(mappedModel.getSchemaName()) + || schemaName.equals(mappedModel.getSchemaName())); + } + + orderMappedModelsBySchemaSpecificity(sub, schemaName); + prepareDiscriminatorTemplateData(sub, schemaName, toModelName(schemaName)); return sub; } + private void prepareDiscriminatorTemplateData(CodegenDiscriminator discriminator, String schemaName, String modelName) { + if (discriminator == null || discriminator.getMappedModels() == null) { + return; + } + + String selfMappingName = null; + List nonSelfMappedModels = new ArrayList<>(); + for (MappedModel mappedModel : discriminator.getMappedModels()) { + boolean isSelfMapping = Objects.equals(schemaName, mappedModel.getSchemaName()) + || Objects.equals(modelName, mappedModel.getModelName()); + if (isSelfMapping) { + selfMappingName = mappedModel.getMappingName(); + } else { + nonSelfMappedModels.add(mappedModel); + } + } + + discriminator.getVendorExtensions().put(X_DISCRIMINATOR_MAPPED_MODELS_NONSELF, nonSelfMappedModels); + discriminator.getVendorExtensions().put(X_HAS_DISCRIMINATOR_SELF_MAPPING, selfMappingName != null); + if (selfMappingName != null) { + discriminator.getVendorExtensions().put(X_DISCRIMINATOR_SELF_MAPPING_NAME, selfMappingName); + } else { + discriminator.getVendorExtensions().remove(X_DISCRIMINATOR_SELF_MAPPING_NAME); + } + } + + private void orderMappedModelsBySchemaSpecificity(CodegenDiscriminator discriminator, String ownerSchemaName) { + if (discriminator.getMappedModels() == null || discriminator.getMappedModels().size() < 2) { + return; + } + + List ordered = new ArrayList<>(discriminator.getMappedModels()); + Map inheritanceDepthBySchema = new HashMap<>(); + Map originalOrder = new HashMap<>(); + for (int i = 0; i < ordered.size(); i++) { + MappedModel mappedModel = ordered.get(i); + originalOrder.put(mappedModel, i); + inheritanceDepthBySchema.computeIfAbsent( + mappedModel.getSchemaName(), + schemaName -> getSchemaInheritanceDepth(schemaName, ownerSchemaName, new HashSet<>()) + ); + } + + ordered.sort((left, right) -> { + int leftDepth = inheritanceDepthBySchema.getOrDefault(left.getSchemaName(), -1); + int rightDepth = inheritanceDepthBySchema.getOrDefault(right.getSchemaName(), -1); + if (leftDepth != rightDepth) { + return Integer.compare(rightDepth, leftDepth); + } + + return Integer.compare(originalOrder.get(left), originalOrder.get(right)); + }); + + discriminator.setMappedModels(new LinkedHashSet<>(ordered)); + } + + private void filterMappedModels(CodegenDiscriminator discriminator, java.util.function.Predicate keepPredicate) { + for (MappedModel mappedModel : new HashSet<>(discriminator.getMappedModels())) { + if (!keepPredicate.test(mappedModel)) { + if (discriminator.getMapping() != null) { + discriminator.getMapping().remove(mappedModel.getMappingName()); + } + discriminator.getMappedModels().remove(mappedModel); + } + } + } + + private Discriminator getSchemaLocalDiscriminator(Schema schema) { + if (schema == null) { + return null; + } + + if (schema.getDiscriminator() != null) { + return schema.getDiscriminator(); + } + + if (ModelUtils.isComposedSchema(schema) && schema.getAllOf() != null) { + // Prefer inline allOf discriminator (child-local) over inherited parent discriminators. + for (Object allOfSchemaObj : schema.getAllOf()) { + if (!(allOfSchemaObj instanceof Schema)) { + continue; + } + Schema allOfSchema = (Schema) allOfSchemaObj; + if (allOfSchema.getDiscriminator() != null) { + return allOfSchema.getDiscriminator(); + } + } + } + + return null; + } + @Override public Map postProcessAllModels(Map objs) { objs = super.postProcessAllModels(objs); if (SERIALIZATION_LIBRARY_BUILT_VALUE.equals(library)) { adaptToDartInheritance(objs); syncRootTypesWithInnerVars(objs); + for (ModelsMap entry : objs.values()) { + for (ModelMap mo : entry.getModels()) { + CodegenModel cm = mo.getModel(); + if (cm != null && cm.discriminator != null) { + String ownerSchemaName = ObjectUtils.firstNonNull(cm.getSchemaName(), cm.getName(), cm.getClassname()); + orderMappedModelsBySchemaSpecificity(cm.discriminator, ownerSchemaName); + prepareDiscriminatorTemplateData(cm.discriminator, cm.getSchemaName(), cm.classname); + } + } + } } // loop through models to update the imports diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/class_discriminator.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/class_discriminator.mustache index f867345883b1..a523fded4812 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/class_discriminator.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/class_discriminator.mustache @@ -1,20 +1,31 @@ extension {{classname}}DiscriminatorExt on {{classname}} { String? get discriminatorValue { - {{#mappedModels}} + {{#vendorExtensions.x-discriminator-mapped-models-nonself}} if (this is {{modelName}}) { return r'{{mappingName}}'; } - {{/mappedModels}} + {{/vendorExtensions.x-discriminator-mapped-models-nonself}} + {{#vendorExtensions.x-has-discriminator-self-mapping}} + return r'{{vendorExtensions.x-discriminator-self-mapping-name}}'; + {{/vendorExtensions.x-has-discriminator-self-mapping}} + {{^vendorExtensions.x-has-discriminator-self-mapping}} return null; + {{/vendorExtensions.x-has-discriminator-self-mapping}} } } extension {{classname}}BuilderDiscriminatorExt on {{classname}}Builder { String? get discriminatorValue { - {{#mappedModels}} + {{#vendorExtensions.x-discriminator-mapped-models-nonself}} if (this is {{modelName}}Builder) { return r'{{mappingName}}'; } - {{/mappedModels}} + {{/vendorExtensions.x-discriminator-mapped-models-nonself}} + {{#vendorExtensions.x-has-discriminator-self-mapping}} + return r'{{vendorExtensions.x-discriminator-self-mapping-name}}'; + {{/vendorExtensions.x-has-discriminator-self-mapping}} + {{^vendorExtensions.x-has-discriminator-self-mapping}} return null; + {{/vendorExtensions.x-has-discriminator-self-mapping}} } -} \ No newline at end of file +} + diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/class_serializer.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/class_serializer.mustache index 4cd02f3506de..937f9c086972 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/class_serializer.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/class_serializer.mustache @@ -75,11 +75,11 @@ class _${{classname}}Serializer implements PrimitiveSerializer<{{classname}}> { {{#hasDiscriminatorWithNonEmptyMapping}} {{#discriminator}} {{! handle discriminator }} - {{#mappedModels}} + {{#vendorExtensions.x-discriminator-mapped-models-nonself}} if (object is {{modelName}}) { return serializers.serialize(object, specifiedType: FullType({{modelName}}))!; } - {{/mappedModels}} + {{/vendorExtensions.x-discriminator-mapped-models-nonself}} {{/discriminator}} {{/hasDiscriminatorWithNonEmptyMapping}} return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); @@ -271,10 +271,10 @@ class _${{classname}}Serializer implements PrimitiveSerializer<{{classname}}> { final discIndex = serializedList.indexOf({{classname}}.discriminatorFieldName) + 1; final discValue = serializers.deserialize(serializedList[discIndex], specifiedType: FullType(String)) as String; switch (discValue) { - {{#mappedModels}} + {{#vendorExtensions.x-discriminator-mapped-models-nonself}} case r'{{mappingName}}': return serializers.deserialize(serialized, specifiedType: FullType({{modelName}})) as {{modelName}}; - {{/mappedModels}} + {{/vendorExtensions.x-discriminator-mapped-models-nonself}} default: return serializers.deserialize(serialized, specifiedType: FullType(${{classname}})) as ${{classname}}; } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioModelTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioModelTest.java index b23213fd74ac..1a363350346d 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioModelTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioModelTest.java @@ -387,6 +387,104 @@ public void mapModelTest() { Assert.assertEquals(cm.vars.size(), 0); } + @Test(description = "uses schema-local discriminator mapping for dart-dio") + public void localDiscriminatorUsesDeclaredMappingsOnly() { + OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/bugs/issue_15467.json"); + + final DefaultCodegen codegen = new DartDioClientCodegen(); + codegen.additionalProperties().put(CodegenConstants.SERIALIZATION_LIBRARY, DartDioClientCodegen.SERIALIZATION_LIBRARY_BUILT_VALUE); + codegen.processOpts(); + codegen.setOpenAPI(openAPI); + + final String modelName = "Animal"; + final Schema model = openAPI.getComponents().getSchemas().get(modelName); + final CodegenModel cm = codegen.fromModel(modelName, model); + + Assert.assertNotNull(cm.discriminator); + Assert.assertEquals(cm.discriminator.getMapping().size(), 4); + Assert.assertTrue(cm.discriminator.getMapping().containsKey("Bird")); + Assert.assertTrue(cm.discriminator.getMapping().containsKey("Reptile")); + Assert.assertTrue(cm.discriminator.getMapping().containsKey("Crocodile")); + Assert.assertTrue(cm.discriminator.getMapping().containsKey("Turtle")); + Assert.assertFalse(cm.discriminator.getMapping().containsKey("Lizard")); + } + + @Test(description = "does not leak sibling mappings into inherited discriminator for intermediate allOf models") + public void inheritedDiscriminatorKeepsOnlyDescendantsForIntermediateModel() { + OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/bugs/issue_15467.json"); + + final DefaultCodegen codegen = new DartDioClientCodegen(); + codegen.additionalProperties().put(CodegenConstants.SERIALIZATION_LIBRARY, DartDioClientCodegen.SERIALIZATION_LIBRARY_BUILT_VALUE); + codegen.processOpts(); + codegen.setOpenAPI(openAPI); + + final Schema reptileSchema = openAPI.getComponents().getSchemas().get("Reptile"); + final CodegenModel reptileModel = codegen.fromModel("Reptile", reptileSchema); + + Assert.assertNotNull(reptileModel.discriminator); + Assert.assertNotNull(reptileModel.discriminator.getMapping()); + Assert.assertTrue(reptileModel.discriminator.getMapping().containsKey("Crocodile")); + Assert.assertTrue(reptileModel.discriminator.getMapping().containsKey("Turtle")); + Assert.assertTrue(reptileModel.discriminator.getMapping().containsKey("Reptile")); + Assert.assertFalse(reptileModel.discriminator.getMapping().containsKey("Bird")); + + java.util.List reptileMappedModelOrder = reptileModel.discriminator.getMappedModels().stream() + .map(CodegenDiscriminator.MappedModel::getModelName) + .collect(java.util.stream.Collectors.toList()); + Assert.assertEquals(reptileMappedModelOrder.get(reptileMappedModelOrder.size() - 1), "Reptile"); + + Assert.assertEquals(reptileModel.discriminator.getVendorExtensions().get("x-has-discriminator-self-mapping"), Boolean.TRUE); + Assert.assertEquals(reptileModel.discriminator.getVendorExtensions().get("x-discriminator-self-mapping-name"), "Reptile"); + @SuppressWarnings("unchecked") + java.util.List reptileNonSelfMappedModels = + (java.util.List) reptileModel.discriminator.getVendorExtensions().get("x-discriminator-mapped-models-nonself"); + Assert.assertNotNull(reptileNonSelfMappedModels); + Assert.assertEquals( + reptileNonSelfMappedModels.stream() + .map(CodegenDiscriminator.MappedModel::getModelName) + .collect(java.util.stream.Collectors.toList()), + java.util.Arrays.asList("Crocodile", "Turtle")); + + final Schema animalSchema = openAPI.getComponents().getSchemas().get("Animal"); + final CodegenModel animalModel = codegen.fromModel("Animal", animalSchema); + Assert.assertNotNull(animalModel.discriminator); + Assert.assertNotNull(animalModel.discriminator.getMapping()); + Assert.assertTrue(animalModel.discriminator.getMapping().containsKey("Bird")); + Assert.assertTrue(animalModel.discriminator.getMapping().containsKey("Reptile")); + Assert.assertEquals(animalModel.discriminator.getVendorExtensions().get("x-has-discriminator-self-mapping"), Boolean.FALSE); + } + + @Test(description = "orders discriminator mappings so subclasses are checked before ancestor types") + public void discriminatorChecksSubclassesBeforeParentTypes() { + OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/bugs/issue_15467.json"); + + final DefaultCodegen codegen = new DartDioClientCodegen(); + codegen.additionalProperties().put(CodegenConstants.SERIALIZATION_LIBRARY, DartDioClientCodegen.SERIALIZATION_LIBRARY_BUILT_VALUE); + codegen.processOpts(); + codegen.setOpenAPI(openAPI); + + final Schema animalSchema = openAPI.getComponents().getSchemas().get("Animal"); + final CodegenModel animalModel = codegen.fromModel("Animal", animalSchema); + + Assert.assertNotNull(animalModel.discriminator); + java.util.List mappedModelOrder = animalModel.discriminator.getMappedModels().stream() + .map(CodegenDiscriminator.MappedModel::getModelName) + .collect(java.util.stream.Collectors.toList()); + + Assert.assertTrue(mappedModelOrder.indexOf("Turtle") < mappedModelOrder.indexOf("Reptile")); + Assert.assertTrue(mappedModelOrder.indexOf("Crocodile") < mappedModelOrder.indexOf("Reptile")); + + @SuppressWarnings("unchecked") + java.util.List animalNonSelfMappedModels = + (java.util.List) animalModel.discriminator.getVendorExtensions().get("x-discriminator-mapped-models-nonself"); + Assert.assertNotNull(animalNonSelfMappedModels); + java.util.List animalNonSelfMappedModelOrder = animalNonSelfMappedModels.stream() + .map(CodegenDiscriminator.MappedModel::getModelName) + .collect(java.util.stream.Collectors.toList()); + Assert.assertTrue(animalNonSelfMappedModelOrder.indexOf("Turtle") < animalNonSelfMappedModelOrder.indexOf("Reptile")); + Assert.assertTrue(animalNonSelfMappedModelOrder.indexOf("Crocodile") < animalNonSelfMappedModelOrder.indexOf("Reptile")); + } + @DataProvider(name = "modelNames") public static Object[][] modelNames() { return new Object[][]{ diff --git a/modules/openapi-generator/src/test/resources/bugs/issue_15467.json b/modules/openapi-generator/src/test/resources/bugs/issue_15467.json new file mode 100644 index 000000000000..d166013024dc --- /dev/null +++ b/modules/openapi-generator/src/test/resources/bugs/issue_15467.json @@ -0,0 +1,80 @@ +{ + "openapi": "3.0.0", + "info": { + "title": "Test API", + "version": "v1" + }, + "paths": {}, + "components": { + "schemas": { + "Animal": { + "type": "object", + "discriminator": { + "propertyName": "type", + "mapping": { + "Bird": "#/components/schemas/Bird", + "Reptile": "#/components/schemas/Reptile", + "Crocodile": "#/components/schemas/Crocodile", + "Turtle": "#/components/schemas/Turtle" + } + }, + "additionalProperties": false, + "properties": { + "id": {"type": "string", "nullable": true}, + "name": {"type": "string", "nullable": true}, + "age": {"type": "integer", "format": "int32"}, + "type": {"type": "string", "nullable": true} + } + }, + "Bird": { + "allOf": [ + {"$ref": "#/components/schemas/Animal"}, + { + "type": "object", + "additionalProperties": false, + "properties": { + "wingSpan": {"type": "number", "format": "double"} + } + } + ] + }, + "Reptile": { + "allOf": [ + {"$ref": "#/components/schemas/Animal"}, + { + "type": "object", + "additionalProperties": false, + "properties": { + "scaleColor": {"type": "string", "nullable": true} + } + } + ] + }, + "Crocodile": { + "allOf": [ + {"$ref": "#/components/schemas/Reptile"}, + { + "type": "object", + "additionalProperties": false, + "properties": { + "numberOfTeeth": {"type": "integer", "format": "int32"} + } + } + ] + }, + "Turtle": { + "allOf": [ + {"$ref": "#/components/schemas/Reptile"}, + { + "type": "object", + "additionalProperties": false, + "properties": { + "shellDiameter": {"type": "number", "format": "double"} + } + } + ] + } + } + } +} + From d9a2139fde44effa47eae65387f7a8ceb90f00bc Mon Sep 17 00:00:00 2001 From: fstotz Date: Thu, 7 May 2026 14:44:18 +0200 Subject: [PATCH 02/14] add files from build --- .../lib/src/model/bar_ref_or_value.dart | 2 ++ .../lib/src/model/entity.dart | 26 ++++++++++--------- .../lib/src/model/entity_ref.dart | 2 ++ .../lib/src/model/foo_ref_or_value.dart | 2 ++ .../lib/src/model/fruit.dart | 2 ++ .../lib/src/model/pizza.dart | 2 ++ .../lib/src/model/animal.dart | 2 ++ .../lib/src/model/parent_with_nullable.dart | 2 ++ 8 files changed, 28 insertions(+), 12 deletions(-) diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar_ref_or_value.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar_ref_or_value.dart index 31a5f74c8fd1..191068d5f56f 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar_ref_or_value.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar_ref_or_value.dart @@ -71,6 +71,8 @@ extension BarRefOrValueBuilderDiscriminatorExt on BarRefOrValueBuilder { } } + + class _$BarRefOrValueSerializer implements PrimitiveSerializer { @override final Iterable types = const [BarRefOrValue, _$BarRefOrValue]; diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/entity.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/entity.dart index 7e27fab47387..d4effc6d3d93 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/entity.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/entity.dart @@ -29,12 +29,12 @@ abstract class Entity implements Addressable, Extensible { static const String discriminatorFieldName = r'@type'; static const Map discriminatorMapping = { + r'PizzaSpeziale': PizzaSpeziale, r'Bar': Bar, r'Bar_Create': BarCreate, r'Foo': Foo, r'Pasta': Pasta, r'Pizza': Pizza, - r'PizzaSpeziale': PizzaSpeziale, }; @BuiltValueSerializer(custom: true) @@ -43,6 +43,9 @@ abstract class Entity implements Addressable, Extensible { extension EntityDiscriminatorExt on Entity { String? get discriminatorValue { + if (this is PizzaSpeziale) { + return r'PizzaSpeziale'; + } if (this is Bar) { return r'Bar'; } @@ -58,14 +61,14 @@ extension EntityDiscriminatorExt on Entity { if (this is Pizza) { return r'Pizza'; } - if (this is PizzaSpeziale) { - return r'PizzaSpeziale'; - } return null; } } extension EntityBuilderDiscriminatorExt on EntityBuilder { String? get discriminatorValue { + if (this is PizzaSpezialeBuilder) { + return r'PizzaSpeziale'; + } if (this is BarBuilder) { return r'Bar'; } @@ -81,13 +84,12 @@ extension EntityBuilderDiscriminatorExt on EntityBuilder { if (this is PizzaBuilder) { return r'Pizza'; } - if (this is PizzaSpezialeBuilder) { - return r'PizzaSpeziale'; - } return null; } } + + class _$EntitySerializer implements PrimitiveSerializer { @override final Iterable types = const [Entity]; @@ -141,6 +143,9 @@ class _$EntitySerializer implements PrimitiveSerializer { Entity object, { FullType specifiedType = FullType.unspecified, }) { + if (object is PizzaSpeziale) { + return serializers.serialize(object, specifiedType: FullType(PizzaSpeziale))!; + } if (object is Bar) { return serializers.serialize(object, specifiedType: FullType(Bar))!; } @@ -156,9 +161,6 @@ class _$EntitySerializer implements PrimitiveSerializer { if (object is Pizza) { return serializers.serialize(object, specifiedType: FullType(Pizza))!; } - if (object is PizzaSpeziale) { - return serializers.serialize(object, specifiedType: FullType(PizzaSpeziale))!; - } return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); } @@ -172,6 +174,8 @@ class _$EntitySerializer implements PrimitiveSerializer { final discIndex = serializedList.indexOf(Entity.discriminatorFieldName) + 1; final discValue = serializers.deserialize(serializedList[discIndex], specifiedType: FullType(String)) as String; switch (discValue) { + case r'PizzaSpeziale': + return serializers.deserialize(serialized, specifiedType: FullType(PizzaSpeziale)) as PizzaSpeziale; case r'Bar': return serializers.deserialize(serialized, specifiedType: FullType(Bar)) as Bar; case r'Bar_Create': @@ -182,8 +186,6 @@ class _$EntitySerializer implements PrimitiveSerializer { return serializers.deserialize(serialized, specifiedType: FullType(Pasta)) as Pasta; case r'Pizza': return serializers.deserialize(serialized, specifiedType: FullType(Pizza)) as Pizza; - case r'PizzaSpeziale': - return serializers.deserialize(serialized, specifiedType: FullType(PizzaSpeziale)) as PizzaSpeziale; default: return serializers.deserialize(serialized, specifiedType: FullType($Entity)) as $Entity; } diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/entity_ref.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/entity_ref.dart index 91fdfd017d78..e4263aca62a4 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/entity_ref.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/entity_ref.dart @@ -66,6 +66,8 @@ extension EntityRefBuilderDiscriminatorExt on EntityRefBuilder { } } + + class _$EntityRefSerializer implements PrimitiveSerializer { @override final Iterable types = const [EntityRef]; diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/foo_ref_or_value.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/foo_ref_or_value.dart index 073fb4ff9c5e..bcbfcba36cc2 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/foo_ref_or_value.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/foo_ref_or_value.dart @@ -70,6 +70,8 @@ extension FooRefOrValueBuilderDiscriminatorExt on FooRefOrValueBuilder { } } + + class _$FooRefOrValueSerializer implements PrimitiveSerializer { @override final Iterable types = const [FooRefOrValue, _$FooRefOrValue]; diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/fruit.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/fruit.dart index 31b61361de5e..ca3cb895e972 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/fruit.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/fruit.dart @@ -68,6 +68,8 @@ extension FruitBuilderDiscriminatorExt on FruitBuilder { } } + + class _$FruitSerializer implements PrimitiveSerializer { @override final Iterable types = const [Fruit, _$Fruit]; diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pizza.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pizza.dart index 6e255af0866f..c83a729a7156 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pizza.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pizza.dart @@ -51,6 +51,8 @@ extension PizzaBuilderDiscriminatorExt on PizzaBuilder { } } + + class _$PizzaSerializer implements PrimitiveSerializer { @override final Iterable types = const [Pizza]; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/animal.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/animal.dart index 20b3f9f50b71..4aa68d04f60c 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/animal.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/animal.dart @@ -57,6 +57,8 @@ extension AnimalBuilderDiscriminatorExt on AnimalBuilder { } } + + class _$AnimalSerializer implements PrimitiveSerializer { @override final Iterable types = const [Animal]; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/parent_with_nullable.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/parent_with_nullable.dart index 99300ffdfb5c..2ffb0e1362d9 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/parent_with_nullable.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/parent_with_nullable.dart @@ -49,6 +49,8 @@ extension ParentWithNullableBuilderDiscriminatorExt on ParentWithNullableBuilder } } + + class _$ParentWithNullableSerializer implements PrimitiveSerializer { @override final Iterable types = const [ParentWithNullable]; From 7a226bc3cb0da851e98c38b70f1584eaf7e9069f Mon Sep 17 00:00:00 2001 From: fstotz Date: Fri, 22 May 2026 09:35:25 +0200 Subject: [PATCH 03/14] docs(dart-dio): add javadocs for discriminator helpers --- .../languages/DartDioClientCodegen.java | 42 +++++++++++++++++-- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java index eae2b9a155a0..415088e726d5 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java @@ -585,6 +585,14 @@ private void adaptToDartInheritance(Map objs) { } } + /** + * Computes the maximum allOf inheritance distance from {@code schemaName} to + * {@code ancestorSchemaName}. + * + *

Returns {@code 0} when both schema names are equal, and {@code -1} when no + * inheritance path exists. The {@code visited} set prevents infinite recursion on + * cyclic graphs. + */ private int getSchemaInheritanceDepth(String schemaName, String ancestorSchemaName, Set visited) { if (schemaName == null || ancestorSchemaName == null) { return -1; @@ -627,9 +635,14 @@ private int getSchemaInheritanceDepth(String schemaName, String ancestorSchemaNa return maxDepth; } - /// override the default behavior of createDiscriminator - /// to remove extra mappings added as a side effect of setLegacyDiscriminatorBehavior(false) - /// this ensures 1-1 schema mapping instead of 1-many + /** + * Builds discriminator metadata and removes implicit/over-broad mappings so Dart + * generation keeps a strict one-schema-per-discriminator-entry behavior. + * + *

For schema-local discriminators, only explicitly declared mappings are kept. + * For inherited discriminators, mappings are restricted to true allOf descendants + * of the current schema. + */ @Override protected CodegenDiscriminator createDiscriminator(String schemaName, Schema schema) { CodegenDiscriminator sub = super.createDiscriminator(schemaName, schema); @@ -671,6 +684,12 @@ protected CodegenDiscriminator createDiscriminator(String schemaName, Schema sch return sub; } + /** + * Prepares discriminator vendor extensions consumed by Dart templates. + * + *

The method separates non-self mapped models and records whether the + * discriminator includes a self-mapping plus its mapping key. + */ private void prepareDiscriminatorTemplateData(CodegenDiscriminator discriminator, String schemaName, String modelName) { if (discriminator == null || discriminator.getMappedModels() == null) { return; @@ -697,6 +716,13 @@ private void prepareDiscriminatorTemplateData(CodegenDiscriminator discriminator } } + /** + * Orders discriminator mapped models by schema specificity relative to the owner + * schema (deepest descendants first). + * + *

When two mappings have the same depth, the original insertion order is + * preserved for deterministic output. + */ private void orderMappedModelsBySchemaSpecificity(CodegenDiscriminator discriminator, String ownerSchemaName) { if (discriminator.getMappedModels() == null || discriminator.getMappedModels().size() < 2) { return; @@ -727,6 +753,12 @@ private void orderMappedModelsBySchemaSpecificity(CodegenDiscriminator discrimin discriminator.setMappedModels(new LinkedHashSet<>(ordered)); } + /** + * Removes discriminator mapped models that do not satisfy the provided predicate. + * + *

Both the mapped model set and the optional mapping-name lookup map are kept + * in sync. + */ private void filterMappedModels(CodegenDiscriminator discriminator, java.util.function.Predicate keepPredicate) { for (MappedModel mappedModel : new HashSet<>(discriminator.getMappedModels())) { if (!keepPredicate.test(mappedModel)) { @@ -738,6 +770,10 @@ private void filterMappedModels(CodegenDiscriminator discriminator, java.util.fu } } + /** + * Returns the discriminator defined on the schema itself, including an inline + * allOf segment, but excluding discriminators inherited from parent schemas. + */ private Discriminator getSchemaLocalDiscriminator(Schema schema) { if (schema == null) { return null; From 6365749c33c7c0bd31e43100a9992a34b87cc7fc Mon Sep 17 00:00:00 2001 From: fstotz Date: Tue, 26 May 2026 13:22:34 +0200 Subject: [PATCH 04/14] fix possible null cast exception --- .../resources/dart/libraries/dio/api.mustache | 3 ++- .../serialization/built_value/api_util.mustache | 17 ++++++++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/api.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/api.mustache index e86a2cfb005a..f233cbe26652 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/api.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/api.mustache @@ -86,7 +86,8 @@ class {{classname}} { {{#queryParams}} {{^required}}{{^isNullable}}if ({{{paramName}}} != null) {{/isNullable}}{{/required}}r'{{baseName}}': {{#includeLibraryTemplate}}api/query_param{{/includeLibraryTemplate}}, {{/queryParams}} - };{{/hasQueryParams}}{{#hasBodyOrFormParams}} + }; + removeNullQueryParameters(_queryParameters);{{/hasQueryParams}}{{#hasBodyOrFormParams}} dynamic _bodyData; diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api_util.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api_util.mustache index 45432b0042dc..35b746d293fc 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api_util.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api_util.mustache @@ -35,7 +35,7 @@ dynamic encodeQueryParameter( FullType type, ) { if (value == null) { - return ''; + return null; } if (value is String || value is num || value is bool) { return value; @@ -49,7 +49,7 @@ dynamic encodeQueryParameter( specifiedType: type, ); if (serialized == null) { - return ''; + return null; } if (serialized is String) { return serialized; @@ -57,18 +57,29 @@ dynamic encodeQueryParameter( return serialized; } -ListParam encodeCollectionQueryParameter( +ListParam? encodeCollectionQueryParameter( Serializers serializers, dynamic value, FullType type, { ListFormat format = ListFormat.multi, }) { + if (value == null) { + return null; + } final serialized = serializers.serialize( value as Object, specifiedType: type, ); + if (serialized == null) { + return null; + } if (value is BuiltList || value is BuiltSet) { return ListParam(List.of((serialized as Iterable).cast()), format); } throw ArgumentError('Invalid value passed to encodeCollectionQueryParameter'); } + +void removeNullQueryParameters(Map queryParameters) { + queryParameters.removeWhere((_, value) => value == null); +} + From 44f785c892bdcb833888fd8792e958e75c2229c0 Mon Sep 17 00:00:00 2001 From: fstotz Date: Tue, 11 Aug 2026 11:23:25 +0200 Subject: [PATCH 05/14] fix issues with parsing of arrays of nullable objects --- .../built_value/serializers.mustache | 2 +- .../dart/dio/DartDioClientCodegenTest.java | 53 +++++++++++++++++++ ...built_value_nullable_collection_items.yaml | 46 ++++++++++++++++ 3 files changed, 100 insertions(+), 1 deletion(-) create mode 100644 modules/openapi-generator/src/test/resources/3_0/dart-dio/built_value_nullable_collection_items.yaml diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/serializers.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/serializers.mustache index 67ff3ea18cda..43aef4e8a8dd 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/serializers.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/serializers.mustache @@ -30,7 +30,7 @@ Serializers serializers = (_$serializers.toBuilder(){{#builtValueSerializers}} {{^fullTypeArgs}} {{#isArray}} const FullType(Built{{#uniqueItems}}Set{{/uniqueItems}}{{^uniqueItems}}List{{/uniqueItems}}, [FullType{{#isNullable}}.nullable{{/isNullable}}({{dataType}})]), - () => {{#uniqueItems}}Set{{/uniqueItems}}{{^uniqueItems}}List{{/uniqueItems}}Builder<{{dataType}}>(), + () => {{#uniqueItems}}Set{{/uniqueItems}}{{^uniqueItems}}List{{/uniqueItems}}Builder<{{dataType}}{{#isNullable}}?{{/isNullable}}>(), {{/isArray}} {{#isMap}} const FullType(BuiltMap, [FullType(String), FullType{{#isNullable}}.nullable{{/isNullable}}({{dataType}})]), diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioClientCodegenTest.java index 107ea5851802..541ecf99d78c 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioClientCodegenTest.java @@ -351,4 +351,57 @@ public void testNestedAdditionalPropertiesGetBuilderFactories() throws IOExcepti "const FullType(BuiltMap, [FullType(String), FullType(BuiltList, [FullType(Widget)])]),", "() => MapBuilder>(),"); } + + /** + * Regression test for nullable collection item types in serializers.dart. + * + *

When a list or set property has a nullable item type (e.g. + * {@code items: { type: number, nullable: true }}), the generated + * {@code addBuilderFactory} call must use {@code ListBuilder()} + * (or {@code SetBuilder()}) to match the emitted + * {@code FullType.nullable(double)} / {@code FullType.nullable(String)}. + * + *

Before the fix, the builder instantiation was + * {@code ListBuilder()} — without the {@code ?} — causing a + * {@code FullType} mismatch at runtime. + */ + @Test + public void testNullableCollectionItemsGetNullableBuilderFactory() throws IOException { + File output = Files.createTempDirectory("test").toFile(); + output.deleteOnExit(); + + final CodegenConfigurator configurator = new CodegenConfigurator() + .setGeneratorName("dart-dio") + .setInputSpec("src/test/resources/3_0/dart-dio/built_value_nullable_collection_items.yaml") + .setOutputDir(output.getAbsolutePath().replace("\\", "/")); + + ClientOptInput opts = configurator.toClientOptInput(); + Generator generator = new DefaultGenerator().opts(opts); + List files = generator.generate(); + files.forEach(File::deleteOnExit); + + Path serializers = output.toPath().resolve("lib/src/serializers.dart"); + + // BuiltList with nullable double items: FullType must be .nullable and + // the builder factory must carry the ? on the type argument. + TestUtils.assertFileContains(serializers, + "const FullType(BuiltList, [FullType.nullable(double)]),", + "() => ListBuilder(),"); + + // BuiltSet with nullable String items. + TestUtils.assertFileContains(serializers, + "const FullType(BuiltSet, [FullType.nullable(String)]),", + "() => SetBuilder(),"); + + // BuiltMap with nullable String values. + TestUtils.assertFileContains(serializers, + "const FullType(BuiltMap, [FullType(String), FullType.nullable(String)]),", + "() => MapBuilder(),"); + + // Negative: non-nullable builder variants must NOT appear. + TestUtils.assertFileNotContains(serializers, + "() => ListBuilder(),"); + TestUtils.assertFileNotContains(serializers, + "() => SetBuilder(),"); + } } diff --git a/modules/openapi-generator/src/test/resources/3_0/dart-dio/built_value_nullable_collection_items.yaml b/modules/openapi-generator/src/test/resources/3_0/dart-dio/built_value_nullable_collection_items.yaml new file mode 100644 index 000000000000..a9fc65f532ab --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/dart-dio/built_value_nullable_collection_items.yaml @@ -0,0 +1,46 @@ +openapi: "3.0.0" +info: + title: Built-value nullable collection item BuilderFactory test + version: "1.0.0" +paths: + /items: + get: + operationId: getItems + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/Container" +components: + schemas: + Widget: + type: object + properties: + id: + type: integer + # A BuiltList whose item type is nullable (double?). + # Before the fix, serializers.dart emitted ListBuilder() instead + # of ListBuilder(), causing a FullType mismatch at runtime. + Container: + type: object + properties: + scores: + type: array + items: + type: number + format: double + nullable: true + tags: + type: array + uniqueItems: true + items: + type: string + nullable: true + lookup: + type: object + additionalProperties: + type: string + nullable: true + From 6eed65b798e537cc87fce388715758d1c1c27d29 Mon Sep 17 00:00:00 2001 From: fstotz Date: Wed, 19 Aug 2026 12:56:45 +0200 Subject: [PATCH 06/14] run generate samples --- .../csharp/restsharp/net8/EchoApi/git_push.sh | 31 ++-- .../echo_api/go-external-refs/git_push.sh | 31 ++-- samples/client/echo_api/go/git_push.sh | 31 ++-- .../java/apache-httpclient/git_push.sh | 31 ++-- .../echo_api/java/feign-gson/git_push.sh | 31 ++-- .../client/echo_api/java/native/git_push.sh | 31 ++-- .../echo_api/java/okhttp-gson/git_push.sh | 31 ++-- .../echo_api/java/restclient/git_push.sh | 31 ++-- .../client/echo_api/java/resteasy/git_push.sh | 31 ++-- .../echo_api/java/resttemplate/git_push.sh | 31 ++-- .../client/others/crystal-qdrant/git_push.sh | 31 ++-- .../others/csharp-complex-files/git_push.sh | 31 ++-- .../git_push.sh | 31 ++-- .../git_push.sh | 31 ++-- .../go/oneof-anyof-required/git_push.sh | 31 ++-- .../go/oneof-discriminator-lookup/git_push.sh | 31 ++-- .../java/jersey2-oneOf-Mixed/git_push.sh | 31 ++-- .../java/jersey2-oneOf-duplicates/git_push.sh | 31 ++-- .../java/okhttp-gson-oneOf-array/git_push.sh | 31 ++-- .../others/java/okhttp-gson-oneOf/git_push.sh | 31 ++-- .../java/okhttp-gson-streaming/git_push.sh | 31 ++-- .../restclient-enum-in-multipart/git_push.sh | 31 ++-- .../restclient-sealedInterface/git_push.sh | 31 ++-- .../git_push.sh | 31 ++-- .../git_push.sh | 31 ++-- .../git_push.sh | 31 ++-- .../webclient-sealedInterface/git_push.sh | 31 ++-- .../webclient-sealedInterface_3_1/git_push.sh | 31 ++-- .../kotlin-integer-enum/docs/StringCode.md | 12 -- .../petstore/cpp-restsdk/client/git_push.sh | 31 ++-- samples/client/petstore/crystal/git_push.sh | 31 ++-- .../AnnotatedEnum/.openapi-generator/FILES | 3 + .../latest/AnnotatedEnum/api/openapi.yaml | 8 +- .../docs/models/StringPatternsWithOneOf.md | 9 + .../Model/StringPatternsWithOneOfTests.cs | 56 ++++++ .../Client/HostConfiguration.cs | 1 + .../Model/StringPatternsWithOneOf.cs | 162 ++++++++++++++++++ .../Model/OneOfArrayRequest.cs | 4 +- .../models/InjectedVendorExtensionsTest.md | 2 +- .../Model/InjectedVendorExtensionsTest.cs | 14 +- .../net10/Petstore-nonPublicApi/git_push.sh | 31 ++-- .../httpclient/net10/Petstore/git_push.sh | 31 ++-- .../net9/Petstore-nonPublicApi/git_push.sh | 31 ++-- .../httpclient/net9/Petstore/git_push.sh | 31 ++-- .../standard2.0/Petstore/git_push.sh | 31 ++-- .../restsharp/net10/EnumMappings/git_push.sh | 31 ++-- .../restsharp/net10/Petstore/git_push.sh | 31 ++-- .../net4.7/MultipleFrameworks/git_push.sh | 31 ++-- .../restsharp/net4.7/Petstore/git_push.sh | 31 ++-- .../restsharp/net4.8/Petstore/git_push.sh | 31 ++-- .../restsharp/net8/EnumMappings/git_push.sh | 31 ++-- .../net8/ParameterMappings/git_push.sh | 31 ++-- .../restsharp/net8/Petstore/git_push.sh | 31 ++-- .../net8/UseDateTimeForDate/git_push.sh | 31 ++-- .../net8/useVirtualForHooks/git_push.sh | 31 ++-- .../restsharp/net9/EnumMappings/git_push.sh | 31 ++-- .../ConditionalSerialization/git_push.sh | 31 ++-- .../standard2.0/Petstore/git_push.sh | 31 ++-- .../net10/Petstore/git_push.sh | 31 ++-- .../unityWebRequest/net9/Petstore/git_push.sh | 31 ++-- .../standard2.0/Petstore/git_push.sh | 31 ++-- .../petstore/go/go-petstore/git_push.sh | 31 ++-- .../petstore/haskell-http-client/git_push.sh | 31 ++-- .../apache-httpclient-jackson3/git_push.sh | 31 ++-- .../java/apache-httpclient/git_push.sh | 31 ++-- .../petstore/java/feign-hc5/git_push.sh | 31 ++-- .../java/feign-no-nullable/git_push.sh | 31 ++-- .../client/petstore/java/feign/git_push.sh | 31 ++-- .../java/google-api-client/git_push.sh | 31 ++-- .../jersey2-java8-localdatetime/git_push.sh | 31 ++-- .../petstore/java/jersey2-java8/git_push.sh | 31 ++-- .../java/jersey3-jackson3/git_push.sh | 31 ++-- .../petstore/java/jersey3-oneOf/git_push.sh | 31 ++-- .../client/petstore/java/jersey3/git_push.sh | 31 ++-- .../petstore/java/native-async/git_push.sh | 31 ++-- .../java/native-jackson3-jspecify/git_push.sh | 31 ++-- .../client/model/FileContent.java | 4 +- .../org/openapitools/client/model/Foo.java | 22 +-- .../client/model/RequiredAndNullable.java | 8 +- .../petstore/java/native-jackson3/git_push.sh | 31 ++-- .../model/AdditionalPropertiesClass.java | 16 +- .../client/model/AllOfRefToDouble.java | 2 +- .../client/model/AllOfRefToFloat.java | 2 +- .../client/model/AllOfRefToLong.java | 2 +- .../org/openapitools/client/model/Animal.java | 4 +- .../org/openapitools/client/model/Apple.java | 4 +- .../openapitools/client/model/AppleReq.java | 4 +- .../model/ArrayOfArrayOfNumberOnly.java | 2 +- .../client/model/ArrayOfNumberOnly.java | 2 +- .../openapitools/client/model/ArrayTest.java | 6 +- .../org/openapitools/client/model/Banana.java | 2 +- .../openapitools/client/model/BananaReq.java | 4 +- .../openapitools/client/model/BasquePig.java | 2 +- .../client/model/Capitalization.java | 12 +- .../org/openapitools/client/model/Cat.java | 6 +- .../openapitools/client/model/Category.java | 4 +- .../openapitools/client/model/ChildCat.java | 4 +- .../openapitools/client/model/ClassModel.java | 2 +- .../org/openapitools/client/model/Client.java | 2 +- .../client/model/ComplexQuadrilateral.java | 4 +- .../openapitools/client/model/DanishPig.java | 2 +- .../client/model/DeprecatedObject.java | 2 +- .../org/openapitools/client/model/Dog.java | 6 +- .../openapitools/client/model/Drawing.java | 8 +- .../openapitools/client/model/EnumArrays.java | 4 +- .../openapitools/client/model/EnumTest.java | 18 +- .../client/model/EquilateralTriangle.java | 4 +- .../model/FakeBigDecimalMap200Response.java | 4 +- .../client/model/FileSchemaTestClass.java | 4 +- .../org/openapitools/client/model/Foo.java | 2 +- .../client/model/FooGetDefaultResponse.java | 2 +- .../openapitools/client/model/FormatTest.java | 32 ++-- .../client/model/GrandparentAnimal.java | 2 +- .../client/model/HasOnlyReadOnly.java | 4 +- .../client/model/HealthCheckResult.java | 2 +- .../client/model/IsoscelesTriangle.java | 4 +- .../openapitools/client/model/MapTest.java | 8 +- ...ropertiesAndAdditionalPropertiesClass.java | 6 +- .../client/model/Model200Response.java | 4 +- .../client/model/ModelApiResponse.java | 6 +- .../openapitools/client/model/ModelFile.java | 2 +- .../openapitools/client/model/ModelList.java | 2 +- .../client/model/ModelReturn.java | 2 +- .../org/openapitools/client/model/Name.java | 8 +- .../client/model/NullableClass.java | 24 +-- .../openapitools/client/model/NumberOnly.java | 2 +- .../model/ObjectWithDeprecatedFields.java | 8 +- .../org/openapitools/client/model/Order.java | 12 +- .../client/model/OuterComposite.java | 6 +- .../openapitools/client/model/ParentPet.java | 2 +- .../org/openapitools/client/model/Pet.java | 12 +- .../client/model/QuadrilateralInterface.java | 2 +- .../client/model/ReadOnlyFirst.java | 4 +- .../client/model/ScaleneTriangle.java | 4 +- .../client/model/ShapeInterface.java | 2 +- .../client/model/SimpleQuadrilateral.java | 4 +- .../client/model/SpecialModelName.java | 4 +- .../org/openapitools/client/model/Tag.java | 4 +- ...neFreeformAdditionalPropertiesRequest.java | 2 +- .../client/model/TriangleInterface.java | 2 +- .../org/openapitools/client/model/User.java | 24 +-- .../org/openapitools/client/model/Whale.java | 6 +- .../org/openapitools/client/model/Zebra.java | 4 +- .../petstore/java/native-jakarta/git_push.sh | 31 ++-- .../java/native-useGzipFeature/git_push.sh | 31 ++-- .../client/ServerConfiguration.java | 72 -------- .../model/AdditionalPropertiesClass.java | 16 +- .../client/model/AllOfRefToDouble.java | 2 +- .../client/model/AllOfRefToFloat.java | 2 +- .../client/model/AllOfRefToLong.java | 2 +- .../org/openapitools/client/model/Animal.java | 4 +- .../org/openapitools/client/model/Apple.java | 4 +- .../openapitools/client/model/AppleReq.java | 4 +- .../model/ArrayOfArrayOfNumberOnly.java | 2 +- .../client/model/ArrayOfNumberOnly.java | 2 +- .../openapitools/client/model/ArrayTest.java | 6 +- .../org/openapitools/client/model/Banana.java | 2 +- .../openapitools/client/model/BananaReq.java | 4 +- .../openapitools/client/model/BasquePig.java | 2 +- .../client/model/Capitalization.java | 12 +- .../org/openapitools/client/model/Cat.java | 6 +- .../openapitools/client/model/Category.java | 4 +- .../openapitools/client/model/ChildCat.java | 4 +- .../openapitools/client/model/ClassModel.java | 2 +- .../org/openapitools/client/model/Client.java | 2 +- .../client/model/ComplexQuadrilateral.java | 4 +- .../openapitools/client/model/DanishPig.java | 2 +- .../client/model/DeprecatedObject.java | 2 +- .../org/openapitools/client/model/Dog.java | 6 +- .../openapitools/client/model/Drawing.java | 8 +- .../openapitools/client/model/EnumArrays.java | 4 +- .../openapitools/client/model/EnumTest.java | 18 +- .../client/model/EquilateralTriangle.java | 4 +- .../model/FakeBigDecimalMap200Response.java | 4 +- .../client/model/FileSchemaTestClass.java | 4 +- .../org/openapitools/client/model/Foo.java | 2 +- .../client/model/FooGetDefaultResponse.java | 2 +- .../openapitools/client/model/FormatTest.java | 32 ++-- .../client/model/GrandparentAnimal.java | 2 +- .../client/model/HasOnlyReadOnly.java | 4 +- .../client/model/HealthCheckResult.java | 2 +- .../client/model/IsoscelesTriangle.java | 4 +- .../openapitools/client/model/MapTest.java | 8 +- ...ropertiesAndAdditionalPropertiesClass.java | 6 +- .../client/model/Model200Response.java | 4 +- .../client/model/ModelApiResponse.java | 6 +- .../openapitools/client/model/ModelFile.java | 2 +- .../openapitools/client/model/ModelList.java | 2 +- .../client/model/ModelReturn.java | 2 +- .../org/openapitools/client/model/Name.java | 8 +- .../client/model/NullableClass.java | 24 +-- .../openapitools/client/model/NumberOnly.java | 2 +- .../model/ObjectWithDeprecatedFields.java | 8 +- .../org/openapitools/client/model/Order.java | 12 +- .../client/model/OuterComposite.java | 6 +- .../openapitools/client/model/ParentPet.java | 2 +- .../org/openapitools/client/model/Pet.java | 12 +- .../client/model/QuadrilateralInterface.java | 2 +- .../client/model/ReadOnlyFirst.java | 4 +- .../client/model/ScaleneTriangle.java | 4 +- .../client/model/ShapeInterface.java | 2 +- .../client/model/SimpleQuadrilateral.java | 4 +- .../client/model/SpecialModelName.java | 4 +- .../org/openapitools/client/model/Tag.java | 4 +- ...neFreeformAdditionalPropertiesRequest.java | 2 +- .../client/model/TriangleInterface.java | 2 +- .../org/openapitools/client/model/User.java | 24 +-- .../org/openapitools/client/model/Whale.java | 6 +- .../org/openapitools/client/model/Zebra.java | 4 +- .../git_push.sh | 31 ++-- .../petstore/java/okhttp-gson-3.1/git_push.sh | 31 ++-- .../okhttp-gson-awsv4signature/git_push.sh | 31 ++-- .../client/auth/HttpBearerAuth.java | 75 -------- .../okhttp-gson-group-parameter/git_push.sh | 31 ++-- .../okhttp-gson-nullable-required/git_push.sh | 31 ++-- .../okhttp-gson-parcelableModel/git_push.sh | 31 ++-- .../java/okhttp-gson-swagger1/git_push.sh | 31 ++-- .../java/okhttp-gson-swagger2/git_push.sh | 31 ++-- .../petstore/java/okhttp-gson/git_push.sh | 31 ++-- .../java/rest-assured-jackson/git_push.sh | 31 ++-- .../petstore/java/rest-assured/git_push.sh | 31 ++-- .../restclient-nullable-arrays/git_push.sh | 31 ++-- .../git_push.sh | 31 ++-- .../git_push.sh | 31 ++-- .../client/model/FileContent.java | 4 +- .../org/openapitools/client/model/Foo.java | 22 +-- .../client/model/RequiredAndNullable.java | 8 +- .../git_push.sh | 31 ++-- .../client/model/FileContent.java | 4 +- .../org/openapitools/client/model/Foo.java | 22 +-- .../client/model/RequiredAndNullable.java | 8 +- .../git_push.sh | 31 ++-- .../java/restclient-swagger2/git_push.sh | 31 ++-- .../git_push.sh | 31 ++-- .../git_push.sh | 31 ++-- .../client/petstore/java/resteasy/git_push.sh | 31 ++-- .../java/resttemplate-jakarta/git_push.sh | 31 ++-- .../git_push.sh | 31 ++-- .../git_push.sh | 31 ++-- .../client/model/FileContent.java | 4 +- .../org/openapitools/client/model/Foo.java | 22 +-- .../client/model/RequiredAndNullable.java | 8 +- .../git_push.sh | 31 ++-- .../java/resttemplate-swagger2/git_push.sh | 31 ++-- .../petstore/java/resttemplate/git_push.sh | 31 ++-- .../model/AdditionalPropertiesClass.java | 4 +- .../client/model/AllOfWithSingleRef.java | 4 +- .../org/openapitools/client/model/Animal.java | 4 +- .../model/ArrayOfArrayOfNumberOnly.java | 2 +- .../client/model/ArrayOfNumberOnly.java | 2 +- .../openapitools/client/model/ArrayTest.java | 6 +- .../client/model/Capitalization.java | 12 +- .../org/openapitools/client/model/Cat.java | 6 +- .../openapitools/client/model/Category.java | 4 +- .../client/model/ChildWithNullable.java | 6 +- .../openapitools/client/model/ClassModel.java | 2 +- .../org/openapitools/client/model/Client.java | 2 +- .../client/model/DeprecatedObject.java | 2 +- .../org/openapitools/client/model/Dog.java | 6 +- .../openapitools/client/model/EnumArrays.java | 4 +- .../openapitools/client/model/EnumTest.java | 16 +- .../model/FakeBigDecimalMap200Response.java | 4 +- .../client/model/FileSchemaTestClass.java | 4 +- .../org/openapitools/client/model/Foo.java | 2 +- .../client/model/FooGetDefaultResponse.java | 2 +- .../openapitools/client/model/FormatTest.java | 32 ++-- .../client/model/HasOnlyReadOnly.java | 4 +- .../client/model/HealthCheckResult.java | 2 +- .../openapitools/client/model/MapTest.java | 8 +- ...ropertiesAndAdditionalPropertiesClass.java | 6 +- .../client/model/Model200Response.java | 4 +- .../client/model/ModelApiResponse.java | 6 +- .../openapitools/client/model/ModelFile.java | 2 +- .../openapitools/client/model/ModelList.java | 2 +- .../client/model/ModelReturn.java | 2 +- .../org/openapitools/client/model/Name.java | 8 +- .../client/model/NullableClass.java | 24 +-- .../openapitools/client/model/NumberOnly.java | 2 +- .../model/ObjectWithDeprecatedFields.java | 8 +- .../org/openapitools/client/model/Order.java | 12 +- .../client/model/OuterComposite.java | 6 +- .../model/OuterObjectWithEnumProperty.java | 2 +- .../client/model/ParentWithNullable.java | 4 +- .../org/openapitools/client/model/Pet.java | 12 +- .../client/model/ReadOnlyFirst.java | 4 +- .../client/model/SpecialModelName.java | 2 +- .../org/openapitools/client/model/Tag.java | 4 +- ...neFreeformAdditionalPropertiesRequest.java | 2 +- .../org/openapitools/client/model/User.java | 16 +- .../java/retrofit2-play26/git_push.sh | 31 ++-- .../petstore/java/retrofit2/git_push.sh | 31 ++-- .../petstore/java/retrofit2rx3/git_push.sh | 31 ++-- .../java/vertx-no-nullable/git_push.sh | 31 ++-- .../java/vertx-supportVertxFuture/git_push.sh | 31 ++-- .../client/petstore/java/vertx/git_push.sh | 31 ++-- .../vertx5-supportVertxFuture/git_push.sh | 31 ++-- .../client/petstore/java/vertx5/git_push.sh | 31 ++-- .../java/webclient-jakarta/git_push.sh | 31 ++-- .../webclient-nullable-arrays/git_push.sh | 31 ++-- .../git_push.sh | 31 ++-- .../client/model/FileContent.java | 4 +- .../org/openapitools/client/model/Foo.java | 22 +-- .../client/model/RequiredAndNullable.java | 8 +- .../git_push.sh | 31 ++-- .../java/webclient-swagger2/git_push.sh | 31 ++-- .../git_push.sh | 31 ++-- .../petstore/java/webclient/git_push.sh | 31 ++-- .../petstore/javascript-apollo/git_push.sh | 31 ++-- .../petstore/javascript-es6/git_push.sh | 31 ++-- .../javascript-promise-es6/git_push.sh | 31 ++-- .../org/openapitools/client/models/Tag.kt | 50 ------ .../go-experimental/git_push.sh | 31 ++-- .../java/jersey2-java8/git_push.sh | 31 ++-- .../dart-dio/anyof/lib/src/api_util.dart | 17 +- .../dart-dio/oneof/lib/src/api_util.dart | 17 +- .../lib/src/api_util.dart | 17 +- .../oneof_primitive/lib/src/api_util.dart | 17 +- .../lib/src/api/pet_api.dart | 2 + .../lib/src/api/user_api.dart | 1 + .../lib/src/api_util.dart | 17 +- .../lib/src/api/fake_api.dart | 5 + .../lib/src/api/pet_api.dart | 2 + .../lib/src/api/user_api.dart | 1 + .../dart2/petstore_client_lib/git_push.sh | 31 ++-- .../petstore_client_lib_fake/git_push.sh | 31 ++-- .../git_push.sh | 31 ++-- .../petstore/go-petstore-withXml/git_push.sh | 31 ++-- .../go/go-petstore-aws-signature/git_push.sh | 31 ++-- .../petstore/go/go-petstore/git_push.sh | 31 ++-- .../git_push.sh | 31 ++-- .../java/jersey2-java8-swagger1/git_push.sh | 31 ++-- .../java/jersey2-java8-swagger2/git_push.sh | 31 ++-- .../petstore/java/jersey2-java8/git_push.sh | 31 ++-- .../cpp-restbed/generated/3_0/git_push.sh | 31 ++-- .../java/org/openapitools/model/Category.java | 1 + .../openapitools/model/ModelApiResponse.java | 1 + .../java/org/openapitools/model/Order.java | 1 + .../main/java/org/openapitools/model/Pet.java | 3 +- .../main/java/org/openapitools/model/Tag.java | 1 + .../java/org/openapitools/model/User.java | 1 + .../.openapi-generator/FILES | 4 + .../vertxweb/server/HttpServerVerticle.java | 63 +++++++ .../vertxweb/server/api/PetApiImpl.java | 51 ++++++ .../vertxweb/server/api/StoreApiImpl.java | 33 ++++ .../vertxweb/server/api/UserApiImpl.java | 50 ++++++ .../jaxrs-resteasy/eap-joda/README.md | 19 -- 346 files changed, 3249 insertions(+), 2591 deletions(-) create mode 100644 samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/docs/models/StringPatternsWithOneOf.md create mode 100644 samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/src/Org.OpenAPITools.Test/Model/StringPatternsWithOneOfTests.cs create mode 100644 samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/src/Org.OpenAPITools/Model/StringPatternsWithOneOf.cs create mode 100644 samples/server/petstore/java-vertx-web-interface-only/src/main/java/org/openapitools/vertxweb/server/HttpServerVerticle.java create mode 100644 samples/server/petstore/java-vertx-web-interface-only/src/main/java/org/openapitools/vertxweb/server/api/PetApiImpl.java create mode 100644 samples/server/petstore/java-vertx-web-interface-only/src/main/java/org/openapitools/vertxweb/server/api/StoreApiImpl.java create mode 100644 samples/server/petstore/java-vertx-web-interface-only/src/main/java/org/openapitools/vertxweb/server/api/UserApiImpl.java diff --git a/samples/client/echo_api/csharp/restsharp/net8/EchoApi/git_push.sh b/samples/client/echo_api/csharp/restsharp/net8/EchoApi/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/echo_api/csharp/restsharp/net8/EchoApi/git_push.sh +++ b/samples/client/echo_api/csharp/restsharp/net8/EchoApi/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/echo_api/go-external-refs/git_push.sh b/samples/client/echo_api/go-external-refs/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/echo_api/go-external-refs/git_push.sh +++ b/samples/client/echo_api/go-external-refs/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/echo_api/go/git_push.sh b/samples/client/echo_api/go/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/echo_api/go/git_push.sh +++ b/samples/client/echo_api/go/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/echo_api/java/apache-httpclient/git_push.sh b/samples/client/echo_api/java/apache-httpclient/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/echo_api/java/apache-httpclient/git_push.sh +++ b/samples/client/echo_api/java/apache-httpclient/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/echo_api/java/feign-gson/git_push.sh b/samples/client/echo_api/java/feign-gson/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/echo_api/java/feign-gson/git_push.sh +++ b/samples/client/echo_api/java/feign-gson/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/echo_api/java/native/git_push.sh b/samples/client/echo_api/java/native/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/echo_api/java/native/git_push.sh +++ b/samples/client/echo_api/java/native/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/echo_api/java/okhttp-gson/git_push.sh b/samples/client/echo_api/java/okhttp-gson/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/echo_api/java/okhttp-gson/git_push.sh +++ b/samples/client/echo_api/java/okhttp-gson/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/echo_api/java/restclient/git_push.sh b/samples/client/echo_api/java/restclient/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/echo_api/java/restclient/git_push.sh +++ b/samples/client/echo_api/java/restclient/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/echo_api/java/resteasy/git_push.sh b/samples/client/echo_api/java/resteasy/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/echo_api/java/resteasy/git_push.sh +++ b/samples/client/echo_api/java/resteasy/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/echo_api/java/resttemplate/git_push.sh b/samples/client/echo_api/java/resttemplate/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/echo_api/java/resttemplate/git_push.sh +++ b/samples/client/echo_api/java/resttemplate/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/others/crystal-qdrant/git_push.sh b/samples/client/others/crystal-qdrant/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/others/crystal-qdrant/git_push.sh +++ b/samples/client/others/crystal-qdrant/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/others/csharp-complex-files/git_push.sh b/samples/client/others/csharp-complex-files/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/others/csharp-complex-files/git_push.sh +++ b/samples/client/others/csharp-complex-files/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/others/go/allof_multiple_ref_and_discriminator/git_push.sh b/samples/client/others/go/allof_multiple_ref_and_discriminator/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/others/go/allof_multiple_ref_and_discriminator/git_push.sh +++ b/samples/client/others/go/allof_multiple_ref_and_discriminator/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/others/go/issue_20079_go_regex_wrongly_translated/git_push.sh b/samples/client/others/go/issue_20079_go_regex_wrongly_translated/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/others/go/issue_20079_go_regex_wrongly_translated/git_push.sh +++ b/samples/client/others/go/issue_20079_go_regex_wrongly_translated/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/others/go/oneof-anyof-required/git_push.sh b/samples/client/others/go/oneof-anyof-required/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/others/go/oneof-anyof-required/git_push.sh +++ b/samples/client/others/go/oneof-anyof-required/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/others/go/oneof-discriminator-lookup/git_push.sh b/samples/client/others/go/oneof-discriminator-lookup/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/others/go/oneof-discriminator-lookup/git_push.sh +++ b/samples/client/others/go/oneof-discriminator-lookup/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/others/java/jersey2-oneOf-Mixed/git_push.sh b/samples/client/others/java/jersey2-oneOf-Mixed/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/others/java/jersey2-oneOf-Mixed/git_push.sh +++ b/samples/client/others/java/jersey2-oneOf-Mixed/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/others/java/jersey2-oneOf-duplicates/git_push.sh b/samples/client/others/java/jersey2-oneOf-duplicates/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/others/java/jersey2-oneOf-duplicates/git_push.sh +++ b/samples/client/others/java/jersey2-oneOf-duplicates/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/others/java/okhttp-gson-oneOf-array/git_push.sh b/samples/client/others/java/okhttp-gson-oneOf-array/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/others/java/okhttp-gson-oneOf-array/git_push.sh +++ b/samples/client/others/java/okhttp-gson-oneOf-array/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/others/java/okhttp-gson-oneOf/git_push.sh b/samples/client/others/java/okhttp-gson-oneOf/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/others/java/okhttp-gson-oneOf/git_push.sh +++ b/samples/client/others/java/okhttp-gson-oneOf/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/others/java/okhttp-gson-streaming/git_push.sh b/samples/client/others/java/okhttp-gson-streaming/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/others/java/okhttp-gson-streaming/git_push.sh +++ b/samples/client/others/java/okhttp-gson-streaming/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/others/java/restclient-enum-in-multipart/git_push.sh b/samples/client/others/java/restclient-enum-in-multipart/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/others/java/restclient-enum-in-multipart/git_push.sh +++ b/samples/client/others/java/restclient-enum-in-multipart/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/others/java/restclient-sealedInterface/git_push.sh b/samples/client/others/java/restclient-sealedInterface/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/others/java/restclient-sealedInterface/git_push.sh +++ b/samples/client/others/java/restclient-sealedInterface/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/others/java/restclient-useAbstractionForFiles/git_push.sh b/samples/client/others/java/restclient-useAbstractionForFiles/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/others/java/restclient-useAbstractionForFiles/git_push.sh +++ b/samples/client/others/java/restclient-useAbstractionForFiles/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/others/java/resttemplate-list-schema-validation/git_push.sh b/samples/client/others/java/resttemplate-list-schema-validation/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/others/java/resttemplate-list-schema-validation/git_push.sh +++ b/samples/client/others/java/resttemplate-list-schema-validation/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/others/java/resttemplate-useAbstractionForFiles/git_push.sh b/samples/client/others/java/resttemplate-useAbstractionForFiles/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/others/java/resttemplate-useAbstractionForFiles/git_push.sh +++ b/samples/client/others/java/resttemplate-useAbstractionForFiles/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/others/java/webclient-sealedInterface/git_push.sh b/samples/client/others/java/webclient-sealedInterface/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/others/java/webclient-sealedInterface/git_push.sh +++ b/samples/client/others/java/webclient-sealedInterface/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/others/java/webclient-sealedInterface_3_1/git_push.sh b/samples/client/others/java/webclient-sealedInterface_3_1/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/others/java/webclient-sealedInterface_3_1/git_push.sh +++ b/samples/client/others/java/webclient-sealedInterface_3_1/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/others/kotlin-integer-enum/docs/StringCode.md b/samples/client/others/kotlin-integer-enum/docs/StringCode.md index 83b24ff278bc..e69de29bb2d1 100644 --- a/samples/client/others/kotlin-integer-enum/docs/StringCode.md +++ b/samples/client/others/kotlin-integer-enum/docs/StringCode.md @@ -1,12 +0,0 @@ - -# StringCode - -## Enum - - - * `hello` (value: `"hello"`) - - * `world` (value: `"world"`) - - - diff --git a/samples/client/petstore/cpp-restsdk/client/git_push.sh b/samples/client/petstore/cpp-restsdk/client/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/cpp-restsdk/client/git_push.sh +++ b/samples/client/petstore/cpp-restsdk/client/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/crystal/git_push.sh b/samples/client/petstore/crystal/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/crystal/git_push.sh +++ b/samples/client/petstore/crystal/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/.openapi-generator/FILES b/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/.openapi-generator/FILES index add1b2cdf6dc..50730778897c 100644 --- a/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/.openapi-generator/FILES +++ b/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/.openapi-generator/FILES @@ -17,10 +17,12 @@ docs/models/ParentWithPluralOneOfProperty.md docs/models/ParentWithPluralOneOfPropertyNumber.md docs/models/PropertiesWithAnyOf.md docs/models/SingleAnyOfTest.md +docs/models/StringPatternsWithOneOf.md docs/models/TypeIntegerWithOneOf.md docs/scripts/git_push.ps1 docs/scripts/git_push.sh src/Org.OpenAPITools.Test/Api/DependencyInjectionTests.cs +src/Org.OpenAPITools.Test/Model/StringPatternsWithOneOfTests.cs src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj src/Org.OpenAPITools.Test/README.md src/Org.OpenAPITools/Api/DefaultApi.cs @@ -61,6 +63,7 @@ src/Org.OpenAPITools/Model/ParentWithPluralOneOfProperty.cs src/Org.OpenAPITools/Model/ParentWithPluralOneOfPropertyNumber.cs src/Org.OpenAPITools/Model/PropertiesWithAnyOf.cs src/Org.OpenAPITools/Model/SingleAnyOfTest.cs +src/Org.OpenAPITools/Model/StringPatternsWithOneOf.cs src/Org.OpenAPITools/Model/TypeIntegerWithOneOf.cs src/Org.OpenAPITools/Org.OpenAPITools.csproj src/Org.OpenAPITools/README.md diff --git a/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/api/openapi.yaml b/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/api/openapi.yaml index b657d7bc953c..a3895699d9c8 100644 --- a/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/api/openapi.yaml @@ -132,7 +132,13 @@ components: - $ref: "#/components/schemas/Parent" nullable: true StringPatternsWithOneOf: - type: string + oneOf: + - description: Numeric identifier + pattern: "^\\d{1,35}$" + type: string + - description: UUID identifier + pattern: "^[0-9a-f-]{36}$" + type: string ParentWithPluralOneOfProperty_number: oneOf: - $ref: "#/components/schemas/Number" diff --git a/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/docs/models/StringPatternsWithOneOf.md b/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/docs/models/StringPatternsWithOneOf.md new file mode 100644 index 000000000000..1c8837a76f96 --- /dev/null +++ b/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/docs/models/StringPatternsWithOneOf.md @@ -0,0 +1,9 @@ +# Org.OpenAPITools.Model.StringPatternsWithOneOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/src/Org.OpenAPITools.Test/Model/StringPatternsWithOneOfTests.cs b/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/src/Org.OpenAPITools.Test/Model/StringPatternsWithOneOfTests.cs new file mode 100644 index 000000000000..1c994e15b475 --- /dev/null +++ b/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/src/Org.OpenAPITools.Test/Model/StringPatternsWithOneOfTests.cs @@ -0,0 +1,56 @@ +/* + * Example + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; + +namespace Org.OpenAPITools.Test.Model +{ + ///

+ /// Class for testing StringPatternsWithOneOf + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class StringPatternsWithOneOfTests : IDisposable + { + // TODO uncomment below to declare an instance variable for StringPatternsWithOneOf + //private StringPatternsWithOneOf instance; + + public StringPatternsWithOneOfTests() + { + // TODO uncomment below to create an instance of StringPatternsWithOneOf + //instance = new StringPatternsWithOneOf(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of StringPatternsWithOneOf + /// + [Fact] + public void StringPatternsWithOneOfInstanceTest() + { + // TODO uncomment below to test "IsType" StringPatternsWithOneOf + //Assert.IsType(instance); + } + } +} diff --git a/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/src/Org.OpenAPITools/Client/HostConfiguration.cs b/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/src/Org.OpenAPITools/Client/HostConfiguration.cs index 6965a2d5bbd6..8055e51b8ac0 100644 --- a/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/src/Org.OpenAPITools/Client/HostConfiguration.cs +++ b/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/src/Org.OpenAPITools/Client/HostConfiguration.cs @@ -59,6 +59,7 @@ public HostConfiguration(IServiceCollection services) _jsonOptions.Converters.Add(new PropertiesWithAnyOfJsonConverter()); _jsonOptions.Converters.Add(new SingleAnyOfTestJsonConverter()); _jsonOptions.Converters.Add(new SingleAnyOfTestNullableJsonConverter()); + _jsonOptions.Converters.Add(new StringPatternsWithOneOfJsonConverter()); _jsonOptions.Converters.Add(new TypeIntegerWithOneOfJsonConverter()); _jsonOptions.Converters.Add(new TypeIntegerWithOneOfNullableJsonConverter()); JsonSerializerOptionsProvider jsonSerializerOptionsProvider = new(_jsonOptions); diff --git a/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/src/Org.OpenAPITools/Model/StringPatternsWithOneOf.cs b/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/src/Org.OpenAPITools/Model/StringPatternsWithOneOf.cs new file mode 100644 index 000000000000..7a9ba3304ff4 --- /dev/null +++ b/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/src/Org.OpenAPITools/Model/StringPatternsWithOneOf.cs @@ -0,0 +1,162 @@ +// +/* + * Example + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Org.OpenAPITools.Client; + +namespace Org.OpenAPITools.Model +{ + /// + /// StringPatternsWithOneOf + /// + public partial class StringPatternsWithOneOf : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// + internal StringPatternsWithOneOf(string @string) + { + String = @string; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Numeric identifier + /// + /// Numeric identifier + public string? String { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class StringPatternsWithOneOf {\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public partial class StringPatternsWithOneOfJsonConverter : JsonConverter + { + partial void OnCreated(); + + /// + /// Initializes a new instance of the class. + /// + public StringPatternsWithOneOfJsonConverter() + { + OnCreated(); + } + + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override StringPatternsWithOneOf Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + string? varString = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + default: + break; + } + } + } + + if (varString != null) + return new StringPatternsWithOneOf(varString); + + throw new JsonException(); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, StringPatternsWithOneOf stringPatternsWithOneOf, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, stringPatternsWithOneOf, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, StringPatternsWithOneOf stringPatternsWithOneOf, JsonSerializerOptions jsonSerializerOptions) + { + + } + } +} diff --git a/samples/client/petstore/csharp/generichost/latest/OneOfList/src/Org.OpenAPITools/Model/OneOfArrayRequest.cs b/samples/client/petstore/csharp/generichost/latest/OneOfList/src/Org.OpenAPITools/Model/OneOfArrayRequest.cs index 8ce7469d7bca..61f8810965b6 100644 --- a/samples/client/petstore/csharp/generichost/latest/OneOfList/src/Org.OpenAPITools/Model/OneOfArrayRequest.cs +++ b/samples/client/petstore/csharp/generichost/latest/OneOfList/src/Org.OpenAPITools/Model/OneOfArrayRequest.cs @@ -34,7 +34,7 @@ public partial class OneOfArrayRequest : IValidatableObject /// Initializes a new instance of the class. /// /// - public OneOfArrayRequest(List list) + internal OneOfArrayRequest(List list) { List = list; OnCreated(); @@ -44,7 +44,7 @@ public OneOfArrayRequest(List list) /// Initializes a new instance of the class. /// /// - public OneOfArrayRequest(List list1) + internal OneOfArrayRequest(List list1) { List1 = list1; OnCreated(); diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/docs/models/InjectedVendorExtensionsTest.md b/samples/client/petstore/csharp/generichost/net10/Petstore/docs/models/InjectedVendorExtensionsTest.md index 4a695b7bf84c..0ae371b94664 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/docs/models/InjectedVendorExtensionsTest.md +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/docs/models/InjectedVendorExtensionsTest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **PotentiallyOverriddenPropertyAccessor** | **string** | | [optional] **PotentiallyOverriddenPropertyToInternal** | **string** | | [optional] [readonly] **PotentiallyOverriddenPropertyToPrivate** | **string** | | [optional] [readonly] -**PotentiallyOverriddenPropertyToPublic** | **string** | | [optional] +**PotentiallyOverriddenPropertyToPublic** | **string** | | [optional] [readonly] **UnalteredProperty** | **string** | | [optional] [readonly] **UnalteredPropertyAccessor** | **string** | | [optional] diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs index f8b20bd77658..fbd98eae40a9 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs @@ -63,46 +63,46 @@ public InjectedVendorExtensionsTest(Option potentiallyOverriddenProperty /// Gets or Sets PotentiallyOverriddenPropertyAccessor /// [JsonPropertyName("potentiallyOverriddenPropertyAccessor")] - internal string PotentiallyOverriddenPropertyAccessor { get { return this.PotentiallyOverriddenPropertyAccessorOption.Value; } set { this.PotentiallyOverriddenPropertyAccessorOption = new(value); } } + public string PotentiallyOverriddenPropertyAccessor { get { return this.PotentiallyOverriddenPropertyAccessorOption.Value; } set { this.PotentiallyOverriddenPropertyAccessorOption = new(value); } } /// /// Used to track the state of PotentiallyOverriddenPropertyToInternal /// [JsonIgnore] [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option PotentiallyOverriddenPropertyToInternalOption { get; private set; } + public Option PotentiallyOverriddenPropertyToInternalOption { get; } /// /// Gets or Sets PotentiallyOverriddenPropertyToInternal /// [JsonPropertyName("potentiallyOverriddenPropertyToInternal")] - public string PotentiallyOverriddenPropertyToInternal { get { return this.PotentiallyOverriddenPropertyToInternalOption.Value; } internal set { this.PotentiallyOverriddenPropertyToInternalOption = new(value); } } + public string PotentiallyOverriddenPropertyToInternal { get { return this.PotentiallyOverriddenPropertyToInternalOption.Value; } } /// /// Used to track the state of PotentiallyOverriddenPropertyToPrivate /// [JsonIgnore] [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option PotentiallyOverriddenPropertyToPrivateOption { get; private set; } + public Option PotentiallyOverriddenPropertyToPrivateOption { get; } /// /// Gets or Sets PotentiallyOverriddenPropertyToPrivate /// [JsonPropertyName("potentiallyOverriddenPropertyToPrivate")] - public string PotentiallyOverriddenPropertyToPrivate { get { return this.PotentiallyOverriddenPropertyToPrivateOption.Value; } private set { this.PotentiallyOverriddenPropertyToPrivateOption = new(value); } } + public string PotentiallyOverriddenPropertyToPrivate { get { return this.PotentiallyOverriddenPropertyToPrivateOption.Value; } } /// /// Used to track the state of PotentiallyOverriddenPropertyToPublic /// [JsonIgnore] [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option PotentiallyOverriddenPropertyToPublicOption { get; private set; } + public Option PotentiallyOverriddenPropertyToPublicOption { get; } /// /// Gets or Sets PotentiallyOverriddenPropertyToPublic /// [JsonPropertyName("potentiallyOverriddenPropertyToPublic")] - public string PotentiallyOverriddenPropertyToPublic { get { return this.PotentiallyOverriddenPropertyToPublicOption.Value; } set { this.PotentiallyOverriddenPropertyToPublicOption = new(value); } } + public string PotentiallyOverriddenPropertyToPublic { get { return this.PotentiallyOverriddenPropertyToPublicOption.Value; } } /// /// Used to track the state of UnalteredProperty diff --git a/samples/client/petstore/csharp/httpclient/net10/Petstore-nonPublicApi/git_push.sh b/samples/client/petstore/csharp/httpclient/net10/Petstore-nonPublicApi/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/csharp/httpclient/net10/Petstore-nonPublicApi/git_push.sh +++ b/samples/client/petstore/csharp/httpclient/net10/Petstore-nonPublicApi/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/csharp/httpclient/net10/Petstore/git_push.sh b/samples/client/petstore/csharp/httpclient/net10/Petstore/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/csharp/httpclient/net10/Petstore/git_push.sh +++ b/samples/client/petstore/csharp/httpclient/net10/Petstore/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore-nonPublicApi/git_push.sh b/samples/client/petstore/csharp/httpclient/net9/Petstore-nonPublicApi/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/csharp/httpclient/net9/Petstore-nonPublicApi/git_push.sh +++ b/samples/client/petstore/csharp/httpclient/net9/Petstore-nonPublicApi/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/git_push.sh b/samples/client/petstore/csharp/httpclient/net9/Petstore/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/csharp/httpclient/net9/Petstore/git_push.sh +++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/git_push.sh b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/git_push.sh +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/csharp/restsharp/net10/EnumMappings/git_push.sh b/samples/client/petstore/csharp/restsharp/net10/EnumMappings/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/csharp/restsharp/net10/EnumMappings/git_push.sh +++ b/samples/client/petstore/csharp/restsharp/net10/EnumMappings/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/csharp/restsharp/net10/Petstore/git_push.sh b/samples/client/petstore/csharp/restsharp/net10/Petstore/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/csharp/restsharp/net10/Petstore/git_push.sh +++ b/samples/client/petstore/csharp/restsharp/net10/Petstore/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/git_push.sh b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/git_push.sh +++ b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/git_push.sh b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/git_push.sh +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/git_push.sh b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/git_push.sh +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/csharp/restsharp/net8/EnumMappings/git_push.sh b/samples/client/petstore/csharp/restsharp/net8/EnumMappings/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/csharp/restsharp/net8/EnumMappings/git_push.sh +++ b/samples/client/petstore/csharp/restsharp/net8/EnumMappings/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/csharp/restsharp/net8/ParameterMappings/git_push.sh b/samples/client/petstore/csharp/restsharp/net8/ParameterMappings/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/csharp/restsharp/net8/ParameterMappings/git_push.sh +++ b/samples/client/petstore/csharp/restsharp/net8/ParameterMappings/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/csharp/restsharp/net8/Petstore/git_push.sh b/samples/client/petstore/csharp/restsharp/net8/Petstore/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/csharp/restsharp/net8/Petstore/git_push.sh +++ b/samples/client/petstore/csharp/restsharp/net8/Petstore/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/csharp/restsharp/net8/UseDateTimeForDate/git_push.sh b/samples/client/petstore/csharp/restsharp/net8/UseDateTimeForDate/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/csharp/restsharp/net8/UseDateTimeForDate/git_push.sh +++ b/samples/client/petstore/csharp/restsharp/net8/UseDateTimeForDate/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/csharp/restsharp/net8/useVirtualForHooks/git_push.sh b/samples/client/petstore/csharp/restsharp/net8/useVirtualForHooks/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/csharp/restsharp/net8/useVirtualForHooks/git_push.sh +++ b/samples/client/petstore/csharp/restsharp/net8/useVirtualForHooks/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/csharp/restsharp/net9/EnumMappings/git_push.sh b/samples/client/petstore/csharp/restsharp/net9/EnumMappings/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/csharp/restsharp/net9/EnumMappings/git_push.sh +++ b/samples/client/petstore/csharp/restsharp/net9/EnumMappings/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/git_push.sh b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/git_push.sh +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/git_push.sh b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/git_push.sh +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/csharp/unityWebRequest/net10/Petstore/git_push.sh b/samples/client/petstore/csharp/unityWebRequest/net10/Petstore/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/csharp/unityWebRequest/net10/Petstore/git_push.sh +++ b/samples/client/petstore/csharp/unityWebRequest/net10/Petstore/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/csharp/unityWebRequest/net9/Petstore/git_push.sh b/samples/client/petstore/csharp/unityWebRequest/net9/Petstore/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/csharp/unityWebRequest/net9/Petstore/git_push.sh +++ b/samples/client/petstore/csharp/unityWebRequest/net9/Petstore/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/git_push.sh b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/git_push.sh +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/go/go-petstore/git_push.sh b/samples/client/petstore/go/go-petstore/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/go/go-petstore/git_push.sh +++ b/samples/client/petstore/go/go-petstore/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/haskell-http-client/git_push.sh b/samples/client/petstore/haskell-http-client/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/haskell-http-client/git_push.sh +++ b/samples/client/petstore/haskell-http-client/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/git_push.sh b/samples/client/petstore/java/apache-httpclient-jackson3/git_push.sh index a35991cd51a1..f53a75d4fabe 100755 --- a/samples/client/petstore/java/apache-httpclient-jackson3/git_push.sh +++ b/samples/client/petstore/java/apache-httpclient-jackson3/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/apache-httpclient/git_push.sh b/samples/client/petstore/java/apache-httpclient/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/apache-httpclient/git_push.sh +++ b/samples/client/petstore/java/apache-httpclient/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/feign-hc5/git_push.sh b/samples/client/petstore/java/feign-hc5/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/feign-hc5/git_push.sh +++ b/samples/client/petstore/java/feign-hc5/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/feign-no-nullable/git_push.sh b/samples/client/petstore/java/feign-no-nullable/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/feign-no-nullable/git_push.sh +++ b/samples/client/petstore/java/feign-no-nullable/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/feign/git_push.sh b/samples/client/petstore/java/feign/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/feign/git_push.sh +++ b/samples/client/petstore/java/feign/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/google-api-client/git_push.sh b/samples/client/petstore/java/google-api-client/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/google-api-client/git_push.sh +++ b/samples/client/petstore/java/google-api-client/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/git_push.sh b/samples/client/petstore/java/jersey2-java8-localdatetime/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/git_push.sh +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/jersey2-java8/git_push.sh b/samples/client/petstore/java/jersey2-java8/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/jersey2-java8/git_push.sh +++ b/samples/client/petstore/java/jersey2-java8/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/jersey3-jackson3/git_push.sh b/samples/client/petstore/java/jersey3-jackson3/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/jersey3-jackson3/git_push.sh +++ b/samples/client/petstore/java/jersey3-jackson3/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/jersey3-oneOf/git_push.sh b/samples/client/petstore/java/jersey3-oneOf/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/jersey3-oneOf/git_push.sh +++ b/samples/client/petstore/java/jersey3-oneOf/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/jersey3/git_push.sh b/samples/client/petstore/java/jersey3/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/jersey3/git_push.sh +++ b/samples/client/petstore/java/jersey3/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/native-async/git_push.sh b/samples/client/petstore/java/native-async/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/native-async/git_push.sh +++ b/samples/client/petstore/java/native-async/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/native-jackson3-jspecify/git_push.sh b/samples/client/petstore/java/native-jackson3-jspecify/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/native-jackson3-jspecify/git_push.sh +++ b/samples/client/petstore/java/native-jackson3-jspecify/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/native-jackson3-jspecify/src/main/java/org/openapitools/client/model/FileContent.java b/samples/client/petstore/java/native-jackson3-jspecify/src/main/java/org/openapitools/client/model/FileContent.java index adbcdd81a78a..de61822827ad 100644 --- a/samples/client/petstore/java/native-jackson3-jspecify/src/main/java/org/openapitools/client/model/FileContent.java +++ b/samples/client/petstore/java/native-jackson3-jspecify/src/main/java/org/openapitools/client/model/FileContent.java @@ -243,11 +243,11 @@ public FileContent.Builder name(String name) { this.instance.name = name; return this; } - public FileContent.Builder size(@Nullable Integer size) { + public FileContent.Builder size(Integer size) { this.instance.size = size; return this; } - public FileContent.Builder virusScan(@Nullable VirusScanEnum virusScan) { + public FileContent.Builder virusScan(VirusScanEnum virusScan) { this.instance.virusScan = virusScan; return this; } diff --git a/samples/client/petstore/java/native-jackson3-jspecify/src/main/java/org/openapitools/client/model/Foo.java b/samples/client/petstore/java/native-jackson3-jspecify/src/main/java/org/openapitools/client/model/Foo.java index 0be0ec1d16c1..5e512e3675f9 100644 --- a/samples/client/petstore/java/native-jackson3-jspecify/src/main/java/org/openapitools/client/model/Foo.java +++ b/samples/client/petstore/java/native-jackson3-jspecify/src/main/java/org/openapitools/client/model/Foo.java @@ -619,31 +619,31 @@ protected Builder(Foo instance) { this.instance = instance; } - public Foo.Builder dt(java.time.@Nullable Instant dt) { + public Foo.Builder dt(java.time.Instant dt) { this.instance.dt = dt; return this; } - public Foo.Builder nullableDt(java.time.@Nullable Instant nullableDt) { + public Foo.Builder nullableDt(java.time.Instant nullableDt) { this.instance.nullableDt = nullableDt; return this; } - public Foo.Builder binary(@Nullable File binary) { + public Foo.Builder binary(File binary) { this.instance.binary = binary; return this; } - public Foo.Builder nullableBinary(@Nullable File nullableBinary) { + public Foo.Builder nullableBinary(File nullableBinary) { this.instance.nullableBinary = nullableBinary; return this; } - public Foo.Builder listOfDt(@Nullable List listOfDt) { + public Foo.Builder listOfDt(List listOfDt) { this.instance.listOfDt = listOfDt; return this; } - public Foo.Builder listMinIntems(@Nullable List listMinIntems) { + public Foo.Builder listMinIntems(List listMinIntems) { this.instance.listMinIntems = listMinIntems; return this; } - public Foo.Builder nullableListMinIntems(@Nullable List nullableListMinIntems) { + public Foo.Builder nullableListMinIntems(List nullableListMinIntems) { this.instance.nullableListMinIntems = nullableListMinIntems; return this; } @@ -651,15 +651,15 @@ public Foo.Builder requiredDt(java.time.Instant requiredDt) { this.instance.requiredDt = requiredDt; return this; } - public Foo.Builder number(java.math.@Nullable BigDecimal number) { + public Foo.Builder number(java.math.BigDecimal number) { this.instance.number = number; return this; } - public Foo.Builder nullableNumber(java.math.@Nullable BigDecimal nullableNumber) { + public Foo.Builder nullableNumber(java.math.BigDecimal nullableNumber) { this.instance.nullableNumber = nullableNumber; return this; } - public Foo.Builder color(@Nullable String color) { + public Foo.Builder color(String color) { this.instance.color = color; return this; } @@ -667,7 +667,7 @@ public Foo.Builder requiredColor(String requiredColor) { this.instance.requiredColor = requiredColor; return this; } - public Foo.Builder nullableColor(@Nullable String nullableColor) { + public Foo.Builder nullableColor(String nullableColor) { this.instance.nullableColor = nullableColor; return this; } diff --git a/samples/client/petstore/java/native-jackson3-jspecify/src/main/java/org/openapitools/client/model/RequiredAndNullable.java b/samples/client/petstore/java/native-jackson3-jspecify/src/main/java/org/openapitools/client/model/RequiredAndNullable.java index 53202eaf7653..f7f28580b35a 100644 --- a/samples/client/petstore/java/native-jackson3-jspecify/src/main/java/org/openapitools/client/model/RequiredAndNullable.java +++ b/samples/client/petstore/java/native-jackson3-jspecify/src/main/java/org/openapitools/client/model/RequiredAndNullable.java @@ -307,15 +307,15 @@ protected Builder(RequiredAndNullable instance) { this.instance = instance; } - public RequiredAndNullable.Builder str(@Nullable String str) { + public RequiredAndNullable.Builder str(String str) { this.instance.str = str; return this; } - public RequiredAndNullable.Builder _file(@Nullable File _file) { + public RequiredAndNullable.Builder _file(File _file) { this.instance._file = _file; return this; } - public RequiredAndNullable.Builder color(@Nullable String color) { + public RequiredAndNullable.Builder color(String color) { this.instance.color = color; return this; } @@ -323,7 +323,7 @@ public RequiredAndNullable.Builder onlyRequired(String onlyRequired) { this.instance.onlyRequired = onlyRequired; return this; } - public RequiredAndNullable.Builder _list(@Nullable List _list) { + public RequiredAndNullable.Builder _list(List _list) { this.instance._list = _list; return this; } diff --git a/samples/client/petstore/java/native-jackson3/git_push.sh b/samples/client/petstore/java/native-jackson3/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/native-jackson3/git_push.sh +++ b/samples/client/petstore/java/native-jackson3/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 10712b9f9c0f..eac762840515 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -446,35 +446,35 @@ protected Builder(AdditionalPropertiesClass instance) { this.instance = instance; } - public AdditionalPropertiesClass.Builder mapProperty(Map mapProperty) { + public AdditionalPropertiesClass.Builder mapProperty(.annotation.Nullable Map mapProperty) { this.instance.mapProperty = mapProperty; return this; } - public AdditionalPropertiesClass.Builder mapOfMapProperty(Map> mapOfMapProperty) { + public AdditionalPropertiesClass.Builder mapOfMapProperty(.annotation.Nullable Map> mapOfMapProperty) { this.instance.mapOfMapProperty = mapOfMapProperty; return this; } - public AdditionalPropertiesClass.Builder anytype1(Object anytype1) { + public AdditionalPropertiesClass.Builder anytype1(.annotation.Nullable Object anytype1) { this.instance.anytype1 = anytype1; return this; } - public AdditionalPropertiesClass.Builder mapWithUndeclaredPropertiesAnytype1(Object mapWithUndeclaredPropertiesAnytype1) { + public AdditionalPropertiesClass.Builder mapWithUndeclaredPropertiesAnytype1(.annotation.Nullable Object mapWithUndeclaredPropertiesAnytype1) { this.instance.mapWithUndeclaredPropertiesAnytype1 = mapWithUndeclaredPropertiesAnytype1; return this; } - public AdditionalPropertiesClass.Builder mapWithUndeclaredPropertiesAnytype2(Object mapWithUndeclaredPropertiesAnytype2) { + public AdditionalPropertiesClass.Builder mapWithUndeclaredPropertiesAnytype2(.annotation.Nullable Object mapWithUndeclaredPropertiesAnytype2) { this.instance.mapWithUndeclaredPropertiesAnytype2 = mapWithUndeclaredPropertiesAnytype2; return this; } - public AdditionalPropertiesClass.Builder mapWithUndeclaredPropertiesAnytype3(Map mapWithUndeclaredPropertiesAnytype3) { + public AdditionalPropertiesClass.Builder mapWithUndeclaredPropertiesAnytype3(.annotation.Nullable Map mapWithUndeclaredPropertiesAnytype3) { this.instance.mapWithUndeclaredPropertiesAnytype3 = mapWithUndeclaredPropertiesAnytype3; return this; } - public AdditionalPropertiesClass.Builder emptyMap(Object emptyMap) { + public AdditionalPropertiesClass.Builder emptyMap(.annotation.Nullable Object emptyMap) { this.instance.emptyMap = emptyMap; return this; } - public AdditionalPropertiesClass.Builder mapWithUndeclaredPropertiesString(Map mapWithUndeclaredPropertiesString) { + public AdditionalPropertiesClass.Builder mapWithUndeclaredPropertiesString(.annotation.Nullable Map mapWithUndeclaredPropertiesString) { this.instance.mapWithUndeclaredPropertiesString = mapWithUndeclaredPropertiesString; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/AllOfRefToDouble.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/AllOfRefToDouble.java index 950bb59fb5b8..614531924cc9 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/AllOfRefToDouble.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/AllOfRefToDouble.java @@ -151,7 +151,7 @@ protected Builder(AllOfRefToDouble instance) { this.instance = instance; } - public AllOfRefToDouble.Builder height(Double height) { + public AllOfRefToDouble.Builder height(.annotation.Nullable Double height) { this.instance.height = height; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/AllOfRefToFloat.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/AllOfRefToFloat.java index 44687f8ccec3..6dc3f5b232a9 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/AllOfRefToFloat.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/AllOfRefToFloat.java @@ -151,7 +151,7 @@ protected Builder(AllOfRefToFloat instance) { this.instance = instance; } - public AllOfRefToFloat.Builder weight(Float weight) { + public AllOfRefToFloat.Builder weight(.annotation.Nullable Float weight) { this.instance.weight = weight; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/AllOfRefToLong.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/AllOfRefToLong.java index e7452789f273..3e5ef01e2967 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/AllOfRefToLong.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/AllOfRefToLong.java @@ -151,7 +151,7 @@ protected Builder(AllOfRefToLong instance) { this.instance = instance; } - public AllOfRefToLong.Builder id(Long id) { + public AllOfRefToLong.Builder id(.annotation.Nullable Long id) { this.instance.id = id; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Animal.java index 0ccf32fbeb00..72c75bf621b8 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Animal.java @@ -208,11 +208,11 @@ protected Builder(Animal instance) { this.instance = instance; } - public Animal.Builder className(String className) { + public Animal.Builder className(.annotation.Nonnull String className) { this.instance.className = className; return this; } - public Animal.Builder color(String color) { + public Animal.Builder color(.annotation.Nullable String color) { this.instance.color = color; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Apple.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Apple.java index 0b4b53547a20..da6d7d83c5cd 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Apple.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Apple.java @@ -187,11 +187,11 @@ protected Builder(Apple instance) { this.instance = instance; } - public Apple.Builder cultivar(String cultivar) { + public Apple.Builder cultivar(.annotation.Nullable String cultivar) { this.instance.cultivar = cultivar; return this; } - public Apple.Builder origin(String origin) { + public Apple.Builder origin(.annotation.Nullable String origin) { this.instance.origin = origin; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/AppleReq.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/AppleReq.java index f6d6ce511aad..3b5fd69687b2 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/AppleReq.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/AppleReq.java @@ -187,11 +187,11 @@ protected Builder(AppleReq instance) { this.instance = instance; } - public AppleReq.Builder cultivar(String cultivar) { + public AppleReq.Builder cultivar(.annotation.Nonnull String cultivar) { this.instance.cultivar = cultivar; return this; } - public AppleReq.Builder mealy(Boolean mealy) { + public AppleReq.Builder mealy(.annotation.Nullable Boolean mealy) { this.instance.mealy = mealy; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index 71adea7af00f..bfc4b28b260e 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -168,7 +168,7 @@ protected Builder(ArrayOfArrayOfNumberOnly instance) { this.instance = instance; } - public ArrayOfArrayOfNumberOnly.Builder arrayArrayNumber(List> arrayArrayNumber) { + public ArrayOfArrayOfNumberOnly.Builder arrayArrayNumber(.annotation.Nullable List> arrayArrayNumber) { this.instance.arrayArrayNumber = arrayArrayNumber; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index 6e9cd80dd08a..98946254ead9 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -168,7 +168,7 @@ protected Builder(ArrayOfNumberOnly instance) { this.instance = instance; } - public ArrayOfNumberOnly.Builder arrayNumber(List arrayNumber) { + public ArrayOfNumberOnly.Builder arrayNumber(.annotation.Nullable List arrayNumber) { this.instance.arrayNumber = arrayNumber; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ArrayTest.java index 0177c25f6e09..d1af3932de34 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -262,15 +262,15 @@ protected Builder(ArrayTest instance) { this.instance = instance; } - public ArrayTest.Builder arrayOfString(List arrayOfString) { + public ArrayTest.Builder arrayOfString(.annotation.Nullable List arrayOfString) { this.instance.arrayOfString = arrayOfString; return this; } - public ArrayTest.Builder arrayArrayOfInteger(List> arrayArrayOfInteger) { + public ArrayTest.Builder arrayArrayOfInteger(.annotation.Nullable List> arrayArrayOfInteger) { this.instance.arrayArrayOfInteger = arrayArrayOfInteger; return this; } - public ArrayTest.Builder arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest.Builder arrayArrayOfModel(.annotation.Nullable List> arrayArrayOfModel) { this.instance.arrayArrayOfModel = arrayArrayOfModel; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Banana.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Banana.java index 22c7aac756fe..b2873dd3de70 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Banana.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Banana.java @@ -153,7 +153,7 @@ protected Builder(Banana instance) { this.instance = instance; } - public Banana.Builder lengthCm(BigDecimal lengthCm) { + public Banana.Builder lengthCm(.annotation.Nullable BigDecimal lengthCm) { this.instance.lengthCm = lengthCm; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/BananaReq.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/BananaReq.java index b59b514ac92d..6332ebd6b485 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/BananaReq.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/BananaReq.java @@ -188,11 +188,11 @@ protected Builder(BananaReq instance) { this.instance = instance; } - public BananaReq.Builder lengthCm(BigDecimal lengthCm) { + public BananaReq.Builder lengthCm(.annotation.Nonnull BigDecimal lengthCm) { this.instance.lengthCm = lengthCm; return this; } - public BananaReq.Builder sweet(Boolean sweet) { + public BananaReq.Builder sweet(.annotation.Nullable Boolean sweet) { this.instance.sweet = sweet; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/BasquePig.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/BasquePig.java index db090bdbad2e..6e5b1f411e12 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/BasquePig.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/BasquePig.java @@ -151,7 +151,7 @@ protected Builder(BasquePig instance) { this.instance = instance; } - public BasquePig.Builder className(String className) { + public BasquePig.Builder className(.annotation.Nonnull String className) { this.instance.className = className; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Capitalization.java index 480aa7baf033..72a54af70ae1 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Capitalization.java @@ -326,27 +326,27 @@ protected Builder(Capitalization instance) { this.instance = instance; } - public Capitalization.Builder smallCamel(String smallCamel) { + public Capitalization.Builder smallCamel(.annotation.Nullable String smallCamel) { this.instance.smallCamel = smallCamel; return this; } - public Capitalization.Builder capitalCamel(String capitalCamel) { + public Capitalization.Builder capitalCamel(.annotation.Nullable String capitalCamel) { this.instance.capitalCamel = capitalCamel; return this; } - public Capitalization.Builder smallSnake(String smallSnake) { + public Capitalization.Builder smallSnake(.annotation.Nullable String smallSnake) { this.instance.smallSnake = smallSnake; return this; } - public Capitalization.Builder capitalSnake(String capitalSnake) { + public Capitalization.Builder capitalSnake(.annotation.Nullable String capitalSnake) { this.instance.capitalSnake = capitalSnake; return this; } - public Capitalization.Builder scAETHFlowPoints(String scAETHFlowPoints) { + public Capitalization.Builder scAETHFlowPoints(.annotation.Nullable String scAETHFlowPoints) { this.instance.scAETHFlowPoints = scAETHFlowPoints; return this; } - public Capitalization.Builder ATT_NAME(String ATT_NAME) { + public Capitalization.Builder ATT_NAME(.annotation.Nullable String ATT_NAME) { this.instance.ATT_NAME = ATT_NAME; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Cat.java index c49cf1409e43..8c52a93a1654 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Cat.java @@ -193,17 +193,17 @@ protected Builder(Cat instance) { this.instance = instance; } - public Cat.Builder declawed(Boolean declawed) { + public Cat.Builder declawed(.annotation.Nullable Boolean declawed) { this.instance.declawed = declawed; return this; } - public Cat.Builder className(String className) { // inherited: true + public Cat.Builder className(.annotation.Nonnull String className) { // inherited: true super.className(className); return this; } - public Cat.Builder color(String color) { // inherited: true + public Cat.Builder color(.annotation.Nullable String color) { // inherited: true super.color(color); return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Category.java index 586f8c538835..1533f8008eed 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Category.java @@ -186,11 +186,11 @@ protected Builder(Category instance) { this.instance = instance; } - public Category.Builder id(Long id) { + public Category.Builder id(.annotation.Nullable Long id) { this.instance.id = id; return this; } - public Category.Builder name(String name) { + public Category.Builder name(.annotation.Nonnull String name) { this.instance.name = name; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ChildCat.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ChildCat.java index db598978a6bb..3bad23e6080f 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ChildCat.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ChildCat.java @@ -219,11 +219,11 @@ protected Builder(ChildCat instance) { this.instance = instance; } - public ChildCat.Builder name(String name) { + public ChildCat.Builder name(.annotation.Nullable String name) { this.instance.name = name; return this; } - public ChildCat.Builder petType(String petType) { + public ChildCat.Builder petType(.annotation.Nullable String petType) { this.instance.petType = petType; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ClassModel.java index 9b64df95827c..56e1055cb044 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ClassModel.java @@ -151,7 +151,7 @@ protected Builder(ClassModel instance) { this.instance = instance; } - public ClassModel.Builder propertyClass(String propertyClass) { + public ClassModel.Builder propertyClass(.annotation.Nullable String propertyClass) { this.instance.propertyClass = propertyClass; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Client.java index ed3c5193487c..4a4a7a4a534a 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Client.java @@ -151,7 +151,7 @@ protected Builder(Client instance) { this.instance = instance; } - public Client.Builder client(String client) { + public Client.Builder client(.annotation.Nullable String client) { this.instance.client = client; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java index 8ce42f4fe56e..83ff3a946129 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java @@ -186,11 +186,11 @@ protected Builder(ComplexQuadrilateral instance) { this.instance = instance; } - public ComplexQuadrilateral.Builder shapeType(String shapeType) { + public ComplexQuadrilateral.Builder shapeType(.annotation.Nonnull String shapeType) { this.instance.shapeType = shapeType; return this; } - public ComplexQuadrilateral.Builder quadrilateralType(String quadrilateralType) { + public ComplexQuadrilateral.Builder quadrilateralType(.annotation.Nonnull String quadrilateralType) { this.instance.quadrilateralType = quadrilateralType; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/DanishPig.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/DanishPig.java index 6a3e50cbf1ac..48ddbe99d175 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/DanishPig.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/DanishPig.java @@ -151,7 +151,7 @@ protected Builder(DanishPig instance) { this.instance = instance; } - public DanishPig.Builder className(String className) { + public DanishPig.Builder className(.annotation.Nonnull String className) { this.instance.className = className; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/DeprecatedObject.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/DeprecatedObject.java index 288235211f1a..f3ba56842c41 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/DeprecatedObject.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/DeprecatedObject.java @@ -153,7 +153,7 @@ protected Builder(DeprecatedObject instance) { this.instance = instance; } - public DeprecatedObject.Builder name(String name) { + public DeprecatedObject.Builder name(.annotation.Nullable String name) { this.instance.name = name; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Dog.java index 13f512e63b4f..68eeab45a58c 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Dog.java @@ -192,17 +192,17 @@ protected Builder(Dog instance) { this.instance = instance; } - public Dog.Builder breed(String breed) { + public Dog.Builder breed(.annotation.Nullable String breed) { this.instance.breed = breed; return this; } - public Dog.Builder className(String className) { // inherited: true + public Dog.Builder className(.annotation.Nonnull String className) { // inherited: true super.className(className); return this; } - public Dog.Builder color(String color) { // inherited: true + public Dog.Builder color(.annotation.Nullable String color) { // inherited: true super.color(color); return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Drawing.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Drawing.java index 7927be3d9376..f91c7ad877d6 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Drawing.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Drawing.java @@ -323,19 +323,19 @@ protected Builder(Drawing instance) { this.instance = instance; } - public Drawing.Builder mainShape(Shape mainShape) { + public Drawing.Builder mainShape(.annotation.Nullable Shape mainShape) { this.instance.mainShape = mainShape; return this; } - public Drawing.Builder shapeOrNull(ShapeOrNull shapeOrNull) { + public Drawing.Builder shapeOrNull(.annotation.Nullable ShapeOrNull shapeOrNull) { this.instance.shapeOrNull = shapeOrNull; return this; } - public Drawing.Builder nullableShape(NullableShape nullableShape) { + public Drawing.Builder nullableShape(.annotation.Nullable NullableShape nullableShape) { this.instance.nullableShape = nullableShape; return this; } - public Drawing.Builder shapes(List shapes) { + public Drawing.Builder shapes(.annotation.Nullable List shapes) { this.instance.shapes = shapes; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/EnumArrays.java index 0f003bb4a63b..f2d6007626ae 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -270,11 +270,11 @@ protected Builder(EnumArrays instance) { this.instance = instance; } - public EnumArrays.Builder justSymbol(JustSymbolEnum justSymbol) { + public EnumArrays.Builder justSymbol(.annotation.Nullable JustSymbolEnum justSymbol) { this.instance.justSymbol = justSymbol; return this; } - public EnumArrays.Builder arrayEnum(List arrayEnum) { + public EnumArrays.Builder arrayEnum(.annotation.Nullable List arrayEnum) { this.instance.arrayEnum = arrayEnum; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/EnumTest.java index 2dbc83418f3f..80ddfe3da608 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/EnumTest.java @@ -615,39 +615,39 @@ protected Builder(EnumTest instance) { this.instance = instance; } - public EnumTest.Builder enumString(EnumStringEnum enumString) { + public EnumTest.Builder enumString(.annotation.Nullable EnumStringEnum enumString) { this.instance.enumString = enumString; return this; } - public EnumTest.Builder enumStringRequired(EnumStringRequiredEnum enumStringRequired) { + public EnumTest.Builder enumStringRequired(.annotation.Nonnull EnumStringRequiredEnum enumStringRequired) { this.instance.enumStringRequired = enumStringRequired; return this; } - public EnumTest.Builder enumInteger(EnumIntegerEnum enumInteger) { + public EnumTest.Builder enumInteger(.annotation.Nullable EnumIntegerEnum enumInteger) { this.instance.enumInteger = enumInteger; return this; } - public EnumTest.Builder enumIntegerOnly(EnumIntegerOnlyEnum enumIntegerOnly) { + public EnumTest.Builder enumIntegerOnly(.annotation.Nullable EnumIntegerOnlyEnum enumIntegerOnly) { this.instance.enumIntegerOnly = enumIntegerOnly; return this; } - public EnumTest.Builder enumNumber(EnumNumberEnum enumNumber) { + public EnumTest.Builder enumNumber(.annotation.Nullable EnumNumberEnum enumNumber) { this.instance.enumNumber = enumNumber; return this; } - public EnumTest.Builder outerEnum(OuterEnum outerEnum) { + public EnumTest.Builder outerEnum(.annotation.Nullable OuterEnum outerEnum) { this.instance.outerEnum = outerEnum; return this; } - public EnumTest.Builder outerEnumInteger(OuterEnumInteger outerEnumInteger) { + public EnumTest.Builder outerEnumInteger(.annotation.Nullable OuterEnumInteger outerEnumInteger) { this.instance.outerEnumInteger = outerEnumInteger; return this; } - public EnumTest.Builder outerEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) { + public EnumTest.Builder outerEnumDefaultValue(.annotation.Nullable OuterEnumDefaultValue outerEnumDefaultValue) { this.instance.outerEnumDefaultValue = outerEnumDefaultValue; return this; } - public EnumTest.Builder outerEnumIntegerDefaultValue(OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) { + public EnumTest.Builder outerEnumIntegerDefaultValue(.annotation.Nullable OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) { this.instance.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/EquilateralTriangle.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/EquilateralTriangle.java index 00ad0b2c3846..30bf4c6507e9 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/EquilateralTriangle.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/EquilateralTriangle.java @@ -186,11 +186,11 @@ protected Builder(EquilateralTriangle instance) { this.instance = instance; } - public EquilateralTriangle.Builder shapeType(String shapeType) { + public EquilateralTriangle.Builder shapeType(.annotation.Nonnull String shapeType) { this.instance.shapeType = shapeType; return this; } - public EquilateralTriangle.Builder triangleType(String triangleType) { + public EquilateralTriangle.Builder triangleType(.annotation.Nonnull String triangleType) { this.instance.triangleType = triangleType; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java index e614facce5c0..2db6a029bac5 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java @@ -202,11 +202,11 @@ protected Builder(FakeBigDecimalMap200Response instance) { this.instance = instance; } - public FakeBigDecimalMap200Response.Builder someId(BigDecimal someId) { + public FakeBigDecimalMap200Response.Builder someId(.annotation.Nullable BigDecimal someId) { this.instance.someId = someId; return this; } - public FakeBigDecimalMap200Response.Builder someMap(Map someMap) { + public FakeBigDecimalMap200Response.Builder someMap(.annotation.Nullable Map someMap) { this.instance.someMap = someMap; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 6b508d2cfd9a..a289fbc1f9ce 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -202,11 +202,11 @@ protected Builder(FileSchemaTestClass instance) { this.instance = instance; } - public FileSchemaTestClass.Builder _file(ModelFile _file) { + public FileSchemaTestClass.Builder _file(.annotation.Nullable ModelFile _file) { this.instance._file = _file; return this; } - public FileSchemaTestClass.Builder files(List files) { + public FileSchemaTestClass.Builder files(.annotation.Nullable List files) { this.instance.files = files; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Foo.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Foo.java index 09dc9ca3e2ae..6fe769842016 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Foo.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Foo.java @@ -151,7 +151,7 @@ protected Builder(Foo instance) { this.instance = instance; } - public Foo.Builder bar(String bar) { + public Foo.Builder bar(.annotation.Nullable String bar) { this.instance.bar = bar; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java index dcee9e7ef88d..3c5f66d3350a 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java @@ -153,7 +153,7 @@ protected Builder(FooGetDefaultResponse instance) { this.instance = instance; } - public FooGetDefaultResponse.Builder string(Foo string) { + public FooGetDefaultResponse.Builder string(.annotation.Nullable Foo string) { this.instance.string = string; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/FormatTest.java index 90598c74de3f..88ea68cb714b 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/FormatTest.java @@ -692,67 +692,67 @@ protected Builder(FormatTest instance) { this.instance = instance; } - public FormatTest.Builder integer(Integer integer) { + public FormatTest.Builder integer(.annotation.Nullable Integer integer) { this.instance.integer = integer; return this; } - public FormatTest.Builder int32(Integer int32) { + public FormatTest.Builder int32(.annotation.Nullable Integer int32) { this.instance.int32 = int32; return this; } - public FormatTest.Builder int64(Long int64) { + public FormatTest.Builder int64(.annotation.Nullable Long int64) { this.instance.int64 = int64; return this; } - public FormatTest.Builder number(BigDecimal number) { + public FormatTest.Builder number(.annotation.Nonnull BigDecimal number) { this.instance.number = number; return this; } - public FormatTest.Builder _float(Float _float) { + public FormatTest.Builder _float(.annotation.Nullable Float _float) { this.instance._float = _float; return this; } - public FormatTest.Builder _double(Double _double) { + public FormatTest.Builder _double(.annotation.Nullable Double _double) { this.instance._double = _double; return this; } - public FormatTest.Builder decimal(BigDecimal decimal) { + public FormatTest.Builder decimal(.annotation.Nullable BigDecimal decimal) { this.instance.decimal = decimal; return this; } - public FormatTest.Builder string(String string) { + public FormatTest.Builder string(.annotation.Nullable String string) { this.instance.string = string; return this; } - public FormatTest.Builder _byte(byte[] _byte) { + public FormatTest.Builder _byte(.annotation.Nonnull byte[] _byte) { this.instance._byte = _byte; return this; } - public FormatTest.Builder binary(File binary) { + public FormatTest.Builder binary(.annotation.Nullable File binary) { this.instance.binary = binary; return this; } - public FormatTest.Builder date(LocalDate date) { + public FormatTest.Builder date(.annotation.Nonnull LocalDate date) { this.instance.date = date; return this; } - public FormatTest.Builder dateTime(OffsetDateTime dateTime) { + public FormatTest.Builder dateTime(.annotation.Nullable OffsetDateTime dateTime) { this.instance.dateTime = dateTime; return this; } - public FormatTest.Builder uuid(UUID uuid) { + public FormatTest.Builder uuid(.annotation.Nullable UUID uuid) { this.instance.uuid = uuid; return this; } - public FormatTest.Builder password(String password) { + public FormatTest.Builder password(.annotation.Nonnull String password) { this.instance.password = password; return this; } - public FormatTest.Builder patternWithDigits(String patternWithDigits) { + public FormatTest.Builder patternWithDigits(.annotation.Nullable String patternWithDigits) { this.instance.patternWithDigits = patternWithDigits; return this; } - public FormatTest.Builder patternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) { + public FormatTest.Builder patternWithDigitsAndDelimiter(.annotation.Nullable String patternWithDigitsAndDelimiter) { this.instance.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/GrandparentAnimal.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/GrandparentAnimal.java index 0f2427e6bac8..3005fb22efa0 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/GrandparentAnimal.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/GrandparentAnimal.java @@ -173,7 +173,7 @@ protected Builder(GrandparentAnimal instance) { this.instance = instance; } - public GrandparentAnimal.Builder petType(String petType) { + public GrandparentAnimal.Builder petType(.annotation.Nonnull String petType) { this.instance.petType = petType; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index c1ebd7c7410f..583ed0e768ee 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -177,11 +177,11 @@ protected Builder(HasOnlyReadOnly instance) { this.instance = instance; } - public HasOnlyReadOnly.Builder bar(String bar) { + public HasOnlyReadOnly.Builder bar(.annotation.Nullable String bar) { this.instance.bar = bar; return this; } - public HasOnlyReadOnly.Builder foo(String foo) { + public HasOnlyReadOnly.Builder foo(.annotation.Nullable String foo) { this.instance.foo = foo; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/HealthCheckResult.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/HealthCheckResult.java index 07e85d730454..0403eb7c8bf4 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/HealthCheckResult.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/HealthCheckResult.java @@ -151,7 +151,7 @@ protected Builder(HealthCheckResult instance) { this.instance = instance; } - public HealthCheckResult.Builder nullableMessage(String nullableMessage) { + public HealthCheckResult.Builder nullableMessage(.annotation.Nullable String nullableMessage) { this.instance.nullableMessage = nullableMessage; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/IsoscelesTriangle.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/IsoscelesTriangle.java index 8d3f3b2f81d9..acf078bfaa8b 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/IsoscelesTriangle.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/IsoscelesTriangle.java @@ -186,11 +186,11 @@ protected Builder(IsoscelesTriangle instance) { this.instance = instance; } - public IsoscelesTriangle.Builder shapeType(String shapeType) { + public IsoscelesTriangle.Builder shapeType(.annotation.Nonnull String shapeType) { this.instance.shapeType = shapeType; return this; } - public IsoscelesTriangle.Builder triangleType(String triangleType) { + public IsoscelesTriangle.Builder triangleType(.annotation.Nonnull String triangleType) { this.instance.triangleType = triangleType; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/MapTest.java index 5a3498b25cd0..299f76a9ba83 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/MapTest.java @@ -341,19 +341,19 @@ protected Builder(MapTest instance) { this.instance = instance; } - public MapTest.Builder mapMapOfString(Map> mapMapOfString) { + public MapTest.Builder mapMapOfString(.annotation.Nullable Map> mapMapOfString) { this.instance.mapMapOfString = mapMapOfString; return this; } - public MapTest.Builder mapOfEnumString(Map mapOfEnumString) { + public MapTest.Builder mapOfEnumString(.annotation.Nullable Map mapOfEnumString) { this.instance.mapOfEnumString = mapOfEnumString; return this; } - public MapTest.Builder directMap(Map directMap) { + public MapTest.Builder directMap(.annotation.Nullable Map directMap) { this.instance.directMap = directMap; return this; } - public MapTest.Builder indirectMap(Map indirectMap) { + public MapTest.Builder indirectMap(.annotation.Nullable Map indirectMap) { this.instance.indirectMap = indirectMap; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 3820f86e9f7c..93a5ab6615da 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -239,15 +239,15 @@ protected Builder(MixedPropertiesAndAdditionalPropertiesClass instance) { this.instance = instance; } - public MixedPropertiesAndAdditionalPropertiesClass.Builder uuid(UUID uuid) { + public MixedPropertiesAndAdditionalPropertiesClass.Builder uuid(.annotation.Nullable UUID uuid) { this.instance.uuid = uuid; return this; } - public MixedPropertiesAndAdditionalPropertiesClass.Builder dateTime(OffsetDateTime dateTime) { + public MixedPropertiesAndAdditionalPropertiesClass.Builder dateTime(.annotation.Nullable OffsetDateTime dateTime) { this.instance.dateTime = dateTime; return this; } - public MixedPropertiesAndAdditionalPropertiesClass.Builder map(Map map) { + public MixedPropertiesAndAdditionalPropertiesClass.Builder map(.annotation.Nullable Map map) { this.instance.map = map; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Model200Response.java index ecb066765fe5..4b29d7aed3f9 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Model200Response.java @@ -187,11 +187,11 @@ protected Builder(Model200Response instance) { this.instance = instance; } - public Model200Response.Builder name(Integer name) { + public Model200Response.Builder name(.annotation.Nullable Integer name) { this.instance.name = name; return this; } - public Model200Response.Builder propertyClass(String propertyClass) { + public Model200Response.Builder propertyClass(.annotation.Nullable String propertyClass) { this.instance.propertyClass = propertyClass; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 76faf44224c4..95cc24aa2a7e 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -222,15 +222,15 @@ protected Builder(ModelApiResponse instance) { this.instance = instance; } - public ModelApiResponse.Builder code(Integer code) { + public ModelApiResponse.Builder code(.annotation.Nullable Integer code) { this.instance.code = code; return this; } - public ModelApiResponse.Builder type(String type) { + public ModelApiResponse.Builder type(.annotation.Nullable String type) { this.instance.type = type; return this; } - public ModelApiResponse.Builder message(String message) { + public ModelApiResponse.Builder message(.annotation.Nullable String message) { this.instance.message = message; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ModelFile.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ModelFile.java index 2dcaff602131..333204ac0850 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ModelFile.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ModelFile.java @@ -152,7 +152,7 @@ protected Builder(ModelFile instance) { this.instance = instance; } - public ModelFile.Builder sourceURI(String sourceURI) { + public ModelFile.Builder sourceURI(.annotation.Nullable String sourceURI) { this.instance.sourceURI = sourceURI; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ModelList.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ModelList.java index 1c641c1462f5..32553bd95401 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ModelList.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ModelList.java @@ -152,7 +152,7 @@ protected Builder(ModelList instance) { this.instance = instance; } - public ModelList.Builder _123list(String _123list) { + public ModelList.Builder _123list(.annotation.Nullable String _123list) { this.instance._123list = _123list; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ModelReturn.java index 264a6d166064..b53a1767f101 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -152,7 +152,7 @@ protected Builder(ModelReturn instance) { this.instance = instance; } - public ModelReturn.Builder _return(Integer _return) { + public ModelReturn.Builder _return(.annotation.Nullable Integer _return) { this.instance._return = _return; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Name.java index 53e61cac8828..0b076b56c53e 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Name.java @@ -246,19 +246,19 @@ protected Builder(Name instance) { this.instance = instance; } - public Name.Builder name(Integer name) { + public Name.Builder name(.annotation.Nonnull Integer name) { this.instance.name = name; return this; } - public Name.Builder snakeCase(Integer snakeCase) { + public Name.Builder snakeCase(.annotation.Nullable Integer snakeCase) { this.instance.snakeCase = snakeCase; return this; } - public Name.Builder property(String property) { + public Name.Builder property(.annotation.Nullable String property) { this.instance.property = property; return this; } - public Name.Builder _123number(Integer _123number) { + public Name.Builder _123number(.annotation.Nullable Integer _123number) { this.instance._123number = _123number; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/NullableClass.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/NullableClass.java index bd90a104ce0f..174aec902f21 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/NullableClass.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/NullableClass.java @@ -663,51 +663,51 @@ protected Builder(NullableClass instance) { this.instance = instance; } - public NullableClass.Builder integerProp(Integer integerProp) { + public NullableClass.Builder integerProp(.annotation.Nullable Integer integerProp) { this.instance.integerProp = integerProp; return this; } - public NullableClass.Builder numberProp(BigDecimal numberProp) { + public NullableClass.Builder numberProp(.annotation.Nullable BigDecimal numberProp) { this.instance.numberProp = numberProp; return this; } - public NullableClass.Builder booleanProp(Boolean booleanProp) { + public NullableClass.Builder booleanProp(.annotation.Nullable Boolean booleanProp) { this.instance.booleanProp = booleanProp; return this; } - public NullableClass.Builder stringProp(String stringProp) { + public NullableClass.Builder stringProp(.annotation.Nullable String stringProp) { this.instance.stringProp = stringProp; return this; } - public NullableClass.Builder dateProp(LocalDate dateProp) { + public NullableClass.Builder dateProp(.annotation.Nullable LocalDate dateProp) { this.instance.dateProp = dateProp; return this; } - public NullableClass.Builder datetimeProp(OffsetDateTime datetimeProp) { + public NullableClass.Builder datetimeProp(.annotation.Nullable OffsetDateTime datetimeProp) { this.instance.datetimeProp = datetimeProp; return this; } - public NullableClass.Builder arrayNullableProp(List arrayNullableProp) { + public NullableClass.Builder arrayNullableProp(.annotation.Nullable List arrayNullableProp) { this.instance.arrayNullableProp = arrayNullableProp; return this; } - public NullableClass.Builder arrayAndItemsNullableProp(List arrayAndItemsNullableProp) { + public NullableClass.Builder arrayAndItemsNullableProp(.annotation.Nullable List arrayAndItemsNullableProp) { this.instance.arrayAndItemsNullableProp = arrayAndItemsNullableProp; return this; } - public NullableClass.Builder arrayItemsNullable(List arrayItemsNullable) { + public NullableClass.Builder arrayItemsNullable(.annotation.Nullable List arrayItemsNullable) { this.instance.arrayItemsNullable = arrayItemsNullable; return this; } - public NullableClass.Builder objectNullableProp(Map objectNullableProp) { + public NullableClass.Builder objectNullableProp(.annotation.Nullable Map objectNullableProp) { this.instance.objectNullableProp = objectNullableProp; return this; } - public NullableClass.Builder objectAndItemsNullableProp(Map objectAndItemsNullableProp) { + public NullableClass.Builder objectAndItemsNullableProp(.annotation.Nullable Map objectAndItemsNullableProp) { this.instance.objectAndItemsNullableProp = objectAndItemsNullableProp; return this; } - public NullableClass.Builder objectItemsNullable(Map objectItemsNullable) { + public NullableClass.Builder objectItemsNullable(.annotation.Nullable Map objectItemsNullable) { this.instance.objectItemsNullable = objectItemsNullable; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/NumberOnly.java index 64c62b2dae0b..069d54e9fc12 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -152,7 +152,7 @@ protected Builder(NumberOnly instance) { this.instance = instance; } - public NumberOnly.Builder justNumber(BigDecimal justNumber) { + public NumberOnly.Builder justNumber(.annotation.Nullable BigDecimal justNumber) { this.instance.justNumber = justNumber; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java index dc3833479d46..ff01eb413d3e 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java @@ -278,19 +278,19 @@ protected Builder(ObjectWithDeprecatedFields instance) { this.instance = instance; } - public ObjectWithDeprecatedFields.Builder uuid(String uuid) { + public ObjectWithDeprecatedFields.Builder uuid(.annotation.Nullable String uuid) { this.instance.uuid = uuid; return this; } - public ObjectWithDeprecatedFields.Builder id(BigDecimal id) { + public ObjectWithDeprecatedFields.Builder id(.annotation.Nullable BigDecimal id) { this.instance.id = id; return this; } - public ObjectWithDeprecatedFields.Builder deprecatedRef(DeprecatedObject deprecatedRef) { + public ObjectWithDeprecatedFields.Builder deprecatedRef(.annotation.Nullable DeprecatedObject deprecatedRef) { this.instance.deprecatedRef = deprecatedRef; return this; } - public ObjectWithDeprecatedFields.Builder bars(List bars) { + public ObjectWithDeprecatedFields.Builder bars(.annotation.Nullable List bars) { this.instance.bars = bars; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Order.java index ccaa845a3099..dfe8c2f0d30d 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Order.java @@ -364,27 +364,27 @@ protected Builder(Order instance) { this.instance = instance; } - public Order.Builder id(Long id) { + public Order.Builder id(.annotation.Nullable Long id) { this.instance.id = id; return this; } - public Order.Builder petId(Long petId) { + public Order.Builder petId(.annotation.Nullable Long petId) { this.instance.petId = petId; return this; } - public Order.Builder quantity(Integer quantity) { + public Order.Builder quantity(.annotation.Nullable Integer quantity) { this.instance.quantity = quantity; return this; } - public Order.Builder shipDate(OffsetDateTime shipDate) { + public Order.Builder shipDate(.annotation.Nullable OffsetDateTime shipDate) { this.instance.shipDate = shipDate; return this; } - public Order.Builder status(StatusEnum status) { + public Order.Builder status(.annotation.Nullable StatusEnum status) { this.instance.status = status; return this; } - public Order.Builder complete(Boolean complete) { + public Order.Builder complete(.annotation.Nullable Boolean complete) { this.instance.complete = complete; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/OuterComposite.java index 992cc1d43551..d4383f5759fe 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -222,15 +222,15 @@ protected Builder(OuterComposite instance) { this.instance = instance; } - public OuterComposite.Builder myNumber(BigDecimal myNumber) { + public OuterComposite.Builder myNumber(.annotation.Nullable BigDecimal myNumber) { this.instance.myNumber = myNumber; return this; } - public OuterComposite.Builder myString(String myString) { + public OuterComposite.Builder myString(.annotation.Nullable String myString) { this.instance.myString = myString; return this; } - public OuterComposite.Builder myBoolean(Boolean myBoolean) { + public OuterComposite.Builder myBoolean(.annotation.Nullable Boolean myBoolean) { this.instance.myBoolean = myBoolean; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ParentPet.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ParentPet.java index 91bfcfc1f3a5..49757ed2e18b 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ParentPet.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ParentPet.java @@ -151,7 +151,7 @@ protected Builder(ParentPet instance) { } - public ParentPet.Builder petType(String petType) { // inherited: true + public ParentPet.Builder petType(.annotation.Nonnull String petType) { // inherited: true super.petType(petType); return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Pet.java index b00fac78c5f8..594b1ea4a63f 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Pet.java @@ -392,27 +392,27 @@ protected Builder(Pet instance) { this.instance = instance; } - public Pet.Builder id(Long id) { + public Pet.Builder id(.annotation.Nullable Long id) { this.instance.id = id; return this; } - public Pet.Builder category(Category category) { + public Pet.Builder category(.annotation.Nullable Category category) { this.instance.category = category; return this; } - public Pet.Builder name(String name) { + public Pet.Builder name(.annotation.Nonnull String name) { this.instance.name = name; return this; } - public Pet.Builder photoUrls(List photoUrls) { + public Pet.Builder photoUrls(.annotation.Nonnull List photoUrls) { this.instance.photoUrls = photoUrls; return this; } - public Pet.Builder tags(List tags) { + public Pet.Builder tags(.annotation.Nullable List tags) { this.instance.tags = tags; return this; } - public Pet.Builder status(StatusEnum status) { + public Pet.Builder status(.annotation.Nullable StatusEnum status) { this.instance.status = status; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java index abe1ae566901..0bb1ebdf6b4b 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java @@ -151,7 +151,7 @@ protected Builder(QuadrilateralInterface instance) { this.instance = instance; } - public QuadrilateralInterface.Builder quadrilateralType(String quadrilateralType) { + public QuadrilateralInterface.Builder quadrilateralType(.annotation.Nonnull String quadrilateralType) { this.instance.quadrilateralType = quadrilateralType; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index 9708cc602094..8090dcbcab63 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -184,11 +184,11 @@ protected Builder(ReadOnlyFirst instance) { this.instance = instance; } - public ReadOnlyFirst.Builder bar(String bar) { + public ReadOnlyFirst.Builder bar(.annotation.Nullable String bar) { this.instance.bar = bar; return this; } - public ReadOnlyFirst.Builder baz(String baz) { + public ReadOnlyFirst.Builder baz(.annotation.Nullable String baz) { this.instance.baz = baz; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ScaleneTriangle.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ScaleneTriangle.java index b59477331c47..36b8752eead0 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ScaleneTriangle.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ScaleneTriangle.java @@ -186,11 +186,11 @@ protected Builder(ScaleneTriangle instance) { this.instance = instance; } - public ScaleneTriangle.Builder shapeType(String shapeType) { + public ScaleneTriangle.Builder shapeType(.annotation.Nonnull String shapeType) { this.instance.shapeType = shapeType; return this; } - public ScaleneTriangle.Builder triangleType(String triangleType) { + public ScaleneTriangle.Builder triangleType(.annotation.Nonnull String triangleType) { this.instance.triangleType = triangleType; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ShapeInterface.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ShapeInterface.java index af6d502112ed..e1f53d8c6aaf 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ShapeInterface.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ShapeInterface.java @@ -151,7 +151,7 @@ protected Builder(ShapeInterface instance) { this.instance = instance; } - public ShapeInterface.Builder shapeType(String shapeType) { + public ShapeInterface.Builder shapeType(.annotation.Nonnull String shapeType) { this.instance.shapeType = shapeType; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java index dd52c0e4a240..54c721d66ea6 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java @@ -186,11 +186,11 @@ protected Builder(SimpleQuadrilateral instance) { this.instance = instance; } - public SimpleQuadrilateral.Builder shapeType(String shapeType) { + public SimpleQuadrilateral.Builder shapeType(.annotation.Nonnull String shapeType) { this.instance.shapeType = shapeType; return this; } - public SimpleQuadrilateral.Builder quadrilateralType(String quadrilateralType) { + public SimpleQuadrilateral.Builder quadrilateralType(.annotation.Nonnull String quadrilateralType) { this.instance.quadrilateralType = quadrilateralType; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/SpecialModelName.java index f50d14a4114e..7f91aeaefdca 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -187,11 +187,11 @@ protected Builder(SpecialModelName instance) { this.instance = instance; } - public SpecialModelName.Builder $specialPropertyName(Long $specialPropertyName) { + public SpecialModelName.Builder $specialPropertyName(.annotation.Nullable Long $specialPropertyName) { this.instance.$specialPropertyName = $specialPropertyName; return this; } - public SpecialModelName.Builder specialModelName(String specialModelName) { + public SpecialModelName.Builder specialModelName(.annotation.Nullable String specialModelName) { this.instance.specialModelName = specialModelName; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Tag.java index 7622555ba015..c97572aac21b 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Tag.java @@ -186,11 +186,11 @@ protected Builder(Tag instance) { this.instance = instance; } - public Tag.Builder id(Long id) { + public Tag.Builder id(.annotation.Nullable Long id) { this.instance.id = id; return this; } - public Tag.Builder name(String name) { + public Tag.Builder name(.annotation.Nullable String name) { this.instance.name = name; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java index 57573b14117e..53f3de5d9e3d 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java @@ -200,7 +200,7 @@ protected Builder(TestInlineFreeformAdditionalPropertiesRequest instance) { this.instance = instance; } - public TestInlineFreeformAdditionalPropertiesRequest.Builder someProperty(String someProperty) { + public TestInlineFreeformAdditionalPropertiesRequest.Builder someProperty(.annotation.Nullable String someProperty) { this.instance.someProperty = someProperty; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/TriangleInterface.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/TriangleInterface.java index 4d8e5fcc0c5a..c14fa6ebeae2 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/TriangleInterface.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/TriangleInterface.java @@ -151,7 +151,7 @@ protected Builder(TriangleInterface instance) { this.instance = instance; } - public TriangleInterface.Builder triangleType(String triangleType) { + public TriangleInterface.Builder triangleType(.annotation.Nonnull String triangleType) { this.instance.triangleType = triangleType; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/User.java index 1b556540570e..c23b7868d596 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/User.java @@ -536,51 +536,51 @@ protected Builder(User instance) { this.instance = instance; } - public User.Builder id(Long id) { + public User.Builder id(.annotation.Nullable Long id) { this.instance.id = id; return this; } - public User.Builder username(String username) { + public User.Builder username(.annotation.Nullable String username) { this.instance.username = username; return this; } - public User.Builder firstName(String firstName) { + public User.Builder firstName(.annotation.Nullable String firstName) { this.instance.firstName = firstName; return this; } - public User.Builder lastName(String lastName) { + public User.Builder lastName(.annotation.Nullable String lastName) { this.instance.lastName = lastName; return this; } - public User.Builder email(String email) { + public User.Builder email(.annotation.Nullable String email) { this.instance.email = email; return this; } - public User.Builder password(String password) { + public User.Builder password(.annotation.Nullable String password) { this.instance.password = password; return this; } - public User.Builder phone(String phone) { + public User.Builder phone(.annotation.Nullable String phone) { this.instance.phone = phone; return this; } - public User.Builder userStatus(Integer userStatus) { + public User.Builder userStatus(.annotation.Nullable Integer userStatus) { this.instance.userStatus = userStatus; return this; } - public User.Builder objectWithNoDeclaredProps(Object objectWithNoDeclaredProps) { + public User.Builder objectWithNoDeclaredProps(.annotation.Nullable Object objectWithNoDeclaredProps) { this.instance.objectWithNoDeclaredProps = objectWithNoDeclaredProps; return this; } - public User.Builder objectWithNoDeclaredPropsNullable(Object objectWithNoDeclaredPropsNullable) { + public User.Builder objectWithNoDeclaredPropsNullable(.annotation.Nullable Object objectWithNoDeclaredPropsNullable) { this.instance.objectWithNoDeclaredPropsNullable = objectWithNoDeclaredPropsNullable; return this; } - public User.Builder anyTypeProp(Object anyTypeProp) { + public User.Builder anyTypeProp(.annotation.Nullable Object anyTypeProp) { this.instance.anyTypeProp = anyTypeProp; return this; } - public User.Builder anyTypePropNullable(Object anyTypePropNullable) { + public User.Builder anyTypePropNullable(.annotation.Nullable Object anyTypePropNullable) { this.instance.anyTypePropNullable = anyTypePropNullable; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Whale.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Whale.java index 27fe86483e0e..6b5e75bc994b 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Whale.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Whale.java @@ -222,15 +222,15 @@ protected Builder(Whale instance) { this.instance = instance; } - public Whale.Builder hasBaleen(Boolean hasBaleen) { + public Whale.Builder hasBaleen(.annotation.Nullable Boolean hasBaleen) { this.instance.hasBaleen = hasBaleen; return this; } - public Whale.Builder hasTeeth(Boolean hasTeeth) { + public Whale.Builder hasTeeth(.annotation.Nullable Boolean hasTeeth) { this.instance.hasTeeth = hasTeeth; return this; } - public Whale.Builder className(String className) { + public Whale.Builder className(.annotation.Nonnull String className) { this.instance.className = className; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Zebra.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Zebra.java index 2741cd52c14f..32a6002496bc 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Zebra.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Zebra.java @@ -272,11 +272,11 @@ protected Builder(Zebra instance) { this.instance = instance; } - public Zebra.Builder type(TypeEnum type) { + public Zebra.Builder type(.annotation.Nullable TypeEnum type) { this.instance.type = type; return this; } - public Zebra.Builder className(String className) { + public Zebra.Builder className(.annotation.Nonnull String className) { this.instance.className = className; return this; } diff --git a/samples/client/petstore/java/native-jakarta/git_push.sh b/samples/client/petstore/java/native-jakarta/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/native-jakarta/git_push.sh +++ b/samples/client/petstore/java/native-jakarta/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/native-useGzipFeature/git_push.sh b/samples/client/petstore/java/native-useGzipFeature/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/native-useGzipFeature/git_push.sh +++ b/samples/client/petstore/java/native-useGzipFeature/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/ServerConfiguration.java index 66eef5d718f2..e69de29bb2d1 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/ServerConfiguration.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/ServerConfiguration.java @@ -1,72 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client; - -import java.util.Map; - -/** - * Representing a Server configuration. - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.25.0-SNAPSHOT") -public class ServerConfiguration { - public String URL; - public String description; - public Map variables; - - /** - * @param URL A URL to the target host. - * @param description A description of the host designated by the URL. - * @param variables A map between a variable name and its value. The value is used for substitution in the server's URL template. - */ - public ServerConfiguration(String URL, String description, Map variables) { - this.URL = URL; - this.description = description; - this.variables = variables; - } - - /** - * Format URL template using given variables. - * - * @param variables A map between a variable name and its value. - * @return Formatted URL. - */ - public String URL(Map variables) { - String url = this.URL; - - // go through variables and replace placeholders - for (Map.Entry variable: this.variables.entrySet()) { - String name = variable.getKey(); - ServerVariable serverVariable = variable.getValue(); - String value = serverVariable.defaultValue; - - if (variables != null && variables.containsKey(name)) { - value = variables.get(name); - if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { - throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); - } - } - url = url.replace("{" + name + "}", value); - } - return url; - } - - /** - * Format URL template using default server variables. - * - * @return Formatted URL. - */ - public String URL() { - return URL(null); - } -} diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index de2ec70ff657..d7306e670546 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -469,15 +469,15 @@ protected Builder(AdditionalPropertiesClass instance) { this.instance = instance; } - public AdditionalPropertiesClass.Builder mapProperty(Map mapProperty) { + public AdditionalPropertiesClass.Builder mapProperty(.annotation.Nullable Map mapProperty) { this.instance.mapProperty = mapProperty; return this; } - public AdditionalPropertiesClass.Builder mapOfMapProperty(Map> mapOfMapProperty) { + public AdditionalPropertiesClass.Builder mapOfMapProperty(.annotation.Nullable Map> mapOfMapProperty) { this.instance.mapOfMapProperty = mapOfMapProperty; return this; } - public AdditionalPropertiesClass.Builder anytype1(Object anytype1) { + public AdditionalPropertiesClass.Builder anytype1(.annotation.Nullable Object anytype1) { this.instance.anytype1 = JsonNullable.of(anytype1); return this; } @@ -485,23 +485,23 @@ public AdditionalPropertiesClass.Builder anytype1(JsonNullable anytype1) this.instance.anytype1 = anytype1; return this; } - public AdditionalPropertiesClass.Builder mapWithUndeclaredPropertiesAnytype1(Object mapWithUndeclaredPropertiesAnytype1) { + public AdditionalPropertiesClass.Builder mapWithUndeclaredPropertiesAnytype1(.annotation.Nullable Object mapWithUndeclaredPropertiesAnytype1) { this.instance.mapWithUndeclaredPropertiesAnytype1 = mapWithUndeclaredPropertiesAnytype1; return this; } - public AdditionalPropertiesClass.Builder mapWithUndeclaredPropertiesAnytype2(Object mapWithUndeclaredPropertiesAnytype2) { + public AdditionalPropertiesClass.Builder mapWithUndeclaredPropertiesAnytype2(.annotation.Nullable Object mapWithUndeclaredPropertiesAnytype2) { this.instance.mapWithUndeclaredPropertiesAnytype2 = mapWithUndeclaredPropertiesAnytype2; return this; } - public AdditionalPropertiesClass.Builder mapWithUndeclaredPropertiesAnytype3(Map mapWithUndeclaredPropertiesAnytype3) { + public AdditionalPropertiesClass.Builder mapWithUndeclaredPropertiesAnytype3(.annotation.Nullable Map mapWithUndeclaredPropertiesAnytype3) { this.instance.mapWithUndeclaredPropertiesAnytype3 = mapWithUndeclaredPropertiesAnytype3; return this; } - public AdditionalPropertiesClass.Builder emptyMap(Object emptyMap) { + public AdditionalPropertiesClass.Builder emptyMap(.annotation.Nullable Object emptyMap) { this.instance.emptyMap = emptyMap; return this; } - public AdditionalPropertiesClass.Builder mapWithUndeclaredPropertiesString(Map mapWithUndeclaredPropertiesString) { + public AdditionalPropertiesClass.Builder mapWithUndeclaredPropertiesString(.annotation.Nullable Map mapWithUndeclaredPropertiesString) { this.instance.mapWithUndeclaredPropertiesString = mapWithUndeclaredPropertiesString; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AllOfRefToDouble.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AllOfRefToDouble.java index 72d94bfb1aac..0c0300fb104c 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AllOfRefToDouble.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AllOfRefToDouble.java @@ -152,7 +152,7 @@ protected Builder(AllOfRefToDouble instance) { this.instance = instance; } - public AllOfRefToDouble.Builder height(Double height) { + public AllOfRefToDouble.Builder height(.annotation.Nullable Double height) { this.instance.height = height; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AllOfRefToFloat.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AllOfRefToFloat.java index 1def0c41ea6e..5b6644c2904e 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AllOfRefToFloat.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AllOfRefToFloat.java @@ -152,7 +152,7 @@ protected Builder(AllOfRefToFloat instance) { this.instance = instance; } - public AllOfRefToFloat.Builder weight(Float weight) { + public AllOfRefToFloat.Builder weight(.annotation.Nullable Float weight) { this.instance.weight = weight; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AllOfRefToLong.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AllOfRefToLong.java index 79ef965f8481..13cc3ba9d307 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AllOfRefToLong.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AllOfRefToLong.java @@ -152,7 +152,7 @@ protected Builder(AllOfRefToLong instance) { this.instance = instance; } - public AllOfRefToLong.Builder id(Long id) { + public AllOfRefToLong.Builder id(.annotation.Nullable Long id) { this.instance.id = id; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Animal.java index e7c9fa66016d..8932606c81c1 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Animal.java @@ -209,11 +209,11 @@ protected Builder(Animal instance) { this.instance = instance; } - public Animal.Builder className(String className) { + public Animal.Builder className(.annotation.Nonnull String className) { this.instance.className = className; return this; } - public Animal.Builder color(String color) { + public Animal.Builder color(.annotation.Nullable String color) { this.instance.color = color; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Apple.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Apple.java index 0b4b53547a20..da6d7d83c5cd 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Apple.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Apple.java @@ -187,11 +187,11 @@ protected Builder(Apple instance) { this.instance = instance; } - public Apple.Builder cultivar(String cultivar) { + public Apple.Builder cultivar(.annotation.Nullable String cultivar) { this.instance.cultivar = cultivar; return this; } - public Apple.Builder origin(String origin) { + public Apple.Builder origin(.annotation.Nullable String origin) { this.instance.origin = origin; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AppleReq.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AppleReq.java index f6d6ce511aad..3b5fd69687b2 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AppleReq.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AppleReq.java @@ -187,11 +187,11 @@ protected Builder(AppleReq instance) { this.instance = instance; } - public AppleReq.Builder cultivar(String cultivar) { + public AppleReq.Builder cultivar(.annotation.Nonnull String cultivar) { this.instance.cultivar = cultivar; return this; } - public AppleReq.Builder mealy(Boolean mealy) { + public AppleReq.Builder mealy(.annotation.Nullable Boolean mealy) { this.instance.mealy = mealy; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index 15ede6766927..ac77825cf836 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -169,7 +169,7 @@ protected Builder(ArrayOfArrayOfNumberOnly instance) { this.instance = instance; } - public ArrayOfArrayOfNumberOnly.Builder arrayArrayNumber(List> arrayArrayNumber) { + public ArrayOfArrayOfNumberOnly.Builder arrayArrayNumber(.annotation.Nullable List> arrayArrayNumber) { this.instance.arrayArrayNumber = arrayArrayNumber; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index 8abcfdb4057c..dd18f5d7d857 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -169,7 +169,7 @@ protected Builder(ArrayOfNumberOnly instance) { this.instance = instance; } - public ArrayOfNumberOnly.Builder arrayNumber(List arrayNumber) { + public ArrayOfNumberOnly.Builder arrayNumber(.annotation.Nullable List arrayNumber) { this.instance.arrayNumber = arrayNumber; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ArrayTest.java index e7aa10848fbb..7824fe6269d8 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -263,15 +263,15 @@ protected Builder(ArrayTest instance) { this.instance = instance; } - public ArrayTest.Builder arrayOfString(List arrayOfString) { + public ArrayTest.Builder arrayOfString(.annotation.Nullable List arrayOfString) { this.instance.arrayOfString = arrayOfString; return this; } - public ArrayTest.Builder arrayArrayOfInteger(List> arrayArrayOfInteger) { + public ArrayTest.Builder arrayArrayOfInteger(.annotation.Nullable List> arrayArrayOfInteger) { this.instance.arrayArrayOfInteger = arrayArrayOfInteger; return this; } - public ArrayTest.Builder arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest.Builder arrayArrayOfModel(.annotation.Nullable List> arrayArrayOfModel) { this.instance.arrayArrayOfModel = arrayArrayOfModel; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Banana.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Banana.java index 22c7aac756fe..b2873dd3de70 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Banana.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Banana.java @@ -153,7 +153,7 @@ protected Builder(Banana instance) { this.instance = instance; } - public Banana.Builder lengthCm(BigDecimal lengthCm) { + public Banana.Builder lengthCm(.annotation.Nullable BigDecimal lengthCm) { this.instance.lengthCm = lengthCm; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/BananaReq.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/BananaReq.java index b59b514ac92d..6332ebd6b485 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/BananaReq.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/BananaReq.java @@ -188,11 +188,11 @@ protected Builder(BananaReq instance) { this.instance = instance; } - public BananaReq.Builder lengthCm(BigDecimal lengthCm) { + public BananaReq.Builder lengthCm(.annotation.Nonnull BigDecimal lengthCm) { this.instance.lengthCm = lengthCm; return this; } - public BananaReq.Builder sweet(Boolean sweet) { + public BananaReq.Builder sweet(.annotation.Nullable Boolean sweet) { this.instance.sweet = sweet; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/BasquePig.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/BasquePig.java index f27ec30bebc6..bd35d75ee36d 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/BasquePig.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/BasquePig.java @@ -152,7 +152,7 @@ protected Builder(BasquePig instance) { this.instance = instance; } - public BasquePig.Builder className(String className) { + public BasquePig.Builder className(.annotation.Nonnull String className) { this.instance.className = className; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Capitalization.java index 39819b34e472..7c4b5e835ec9 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Capitalization.java @@ -327,27 +327,27 @@ protected Builder(Capitalization instance) { this.instance = instance; } - public Capitalization.Builder smallCamel(String smallCamel) { + public Capitalization.Builder smallCamel(.annotation.Nullable String smallCamel) { this.instance.smallCamel = smallCamel; return this; } - public Capitalization.Builder capitalCamel(String capitalCamel) { + public Capitalization.Builder capitalCamel(.annotation.Nullable String capitalCamel) { this.instance.capitalCamel = capitalCamel; return this; } - public Capitalization.Builder smallSnake(String smallSnake) { + public Capitalization.Builder smallSnake(.annotation.Nullable String smallSnake) { this.instance.smallSnake = smallSnake; return this; } - public Capitalization.Builder capitalSnake(String capitalSnake) { + public Capitalization.Builder capitalSnake(.annotation.Nullable String capitalSnake) { this.instance.capitalSnake = capitalSnake; return this; } - public Capitalization.Builder scAETHFlowPoints(String scAETHFlowPoints) { + public Capitalization.Builder scAETHFlowPoints(.annotation.Nullable String scAETHFlowPoints) { this.instance.scAETHFlowPoints = scAETHFlowPoints; return this; } - public Capitalization.Builder ATT_NAME(String ATT_NAME) { + public Capitalization.Builder ATT_NAME(.annotation.Nullable String ATT_NAME) { this.instance.ATT_NAME = ATT_NAME; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Cat.java index 3d5657de1dec..bc7ee0ea5e7d 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Cat.java @@ -194,17 +194,17 @@ protected Builder(Cat instance) { this.instance = instance; } - public Cat.Builder declawed(Boolean declawed) { + public Cat.Builder declawed(.annotation.Nullable Boolean declawed) { this.instance.declawed = declawed; return this; } - public Cat.Builder className(String className) { // inherited: true + public Cat.Builder className(.annotation.Nonnull String className) { // inherited: true super.className(className); return this; } - public Cat.Builder color(String color) { // inherited: true + public Cat.Builder color(.annotation.Nullable String color) { // inherited: true super.color(color); return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Category.java index abbdd18d57da..85eff1e7e8b0 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Category.java @@ -187,11 +187,11 @@ protected Builder(Category instance) { this.instance = instance; } - public Category.Builder id(Long id) { + public Category.Builder id(.annotation.Nullable Long id) { this.instance.id = id; return this; } - public Category.Builder name(String name) { + public Category.Builder name(.annotation.Nonnull String name) { this.instance.name = name; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ChildCat.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ChildCat.java index 83478757e92e..9fef108867fc 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ChildCat.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ChildCat.java @@ -220,11 +220,11 @@ protected Builder(ChildCat instance) { this.instance = instance; } - public ChildCat.Builder name(String name) { + public ChildCat.Builder name(.annotation.Nullable String name) { this.instance.name = name; return this; } - public ChildCat.Builder petType(String petType) { + public ChildCat.Builder petType(.annotation.Nullable String petType) { this.instance.petType = petType; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ClassModel.java index 549b765474e6..cdc6a5229606 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ClassModel.java @@ -152,7 +152,7 @@ protected Builder(ClassModel instance) { this.instance = instance; } - public ClassModel.Builder propertyClass(String propertyClass) { + public ClassModel.Builder propertyClass(.annotation.Nullable String propertyClass) { this.instance.propertyClass = propertyClass; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Client.java index 924cf7f1ff99..ac3ad0f61723 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Client.java @@ -152,7 +152,7 @@ protected Builder(Client instance) { this.instance = instance; } - public Client.Builder client(String client) { + public Client.Builder client(.annotation.Nullable String client) { this.instance.client = client; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java index 22a04f2e017f..89e93a2fbe47 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java @@ -187,11 +187,11 @@ protected Builder(ComplexQuadrilateral instance) { this.instance = instance; } - public ComplexQuadrilateral.Builder shapeType(String shapeType) { + public ComplexQuadrilateral.Builder shapeType(.annotation.Nonnull String shapeType) { this.instance.shapeType = shapeType; return this; } - public ComplexQuadrilateral.Builder quadrilateralType(String quadrilateralType) { + public ComplexQuadrilateral.Builder quadrilateralType(.annotation.Nonnull String quadrilateralType) { this.instance.quadrilateralType = quadrilateralType; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/DanishPig.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/DanishPig.java index 7d49c20a5559..19cbf55f5b6e 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/DanishPig.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/DanishPig.java @@ -152,7 +152,7 @@ protected Builder(DanishPig instance) { this.instance = instance; } - public DanishPig.Builder className(String className) { + public DanishPig.Builder className(.annotation.Nonnull String className) { this.instance.className = className; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/DeprecatedObject.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/DeprecatedObject.java index 66a13d0d6f0c..34ea268f5278 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/DeprecatedObject.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/DeprecatedObject.java @@ -154,7 +154,7 @@ protected Builder(DeprecatedObject instance) { this.instance = instance; } - public DeprecatedObject.Builder name(String name) { + public DeprecatedObject.Builder name(.annotation.Nullable String name) { this.instance.name = name; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Dog.java index e5fdf8ade86b..6a93620ede9f 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Dog.java @@ -193,17 +193,17 @@ protected Builder(Dog instance) { this.instance = instance; } - public Dog.Builder breed(String breed) { + public Dog.Builder breed(.annotation.Nullable String breed) { this.instance.breed = breed; return this; } - public Dog.Builder className(String className) { // inherited: true + public Dog.Builder className(.annotation.Nonnull String className) { // inherited: true super.className(className); return this; } - public Dog.Builder color(String color) { // inherited: true + public Dog.Builder color(.annotation.Nullable String color) { // inherited: true super.color(color); return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Drawing.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Drawing.java index dae37f481a87..bad9583814e1 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Drawing.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Drawing.java @@ -346,15 +346,15 @@ protected Builder(Drawing instance) { this.instance = instance; } - public Drawing.Builder mainShape(Shape mainShape) { + public Drawing.Builder mainShape(.annotation.Nullable Shape mainShape) { this.instance.mainShape = mainShape; return this; } - public Drawing.Builder shapeOrNull(ShapeOrNull shapeOrNull) { + public Drawing.Builder shapeOrNull(.annotation.Nullable ShapeOrNull shapeOrNull) { this.instance.shapeOrNull = shapeOrNull; return this; } - public Drawing.Builder nullableShape(NullableShape nullableShape) { + public Drawing.Builder nullableShape(.annotation.Nullable NullableShape nullableShape) { this.instance.nullableShape = JsonNullable.of(nullableShape); return this; } @@ -362,7 +362,7 @@ public Drawing.Builder nullableShape(JsonNullable nullableShape) this.instance.nullableShape = nullableShape; return this; } - public Drawing.Builder shapes(List shapes) { + public Drawing.Builder shapes(.annotation.Nullable List shapes) { this.instance.shapes = shapes; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EnumArrays.java index 51007e9492f6..87e6411a8d4a 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -271,11 +271,11 @@ protected Builder(EnumArrays instance) { this.instance = instance; } - public EnumArrays.Builder justSymbol(JustSymbolEnum justSymbol) { + public EnumArrays.Builder justSymbol(.annotation.Nullable JustSymbolEnum justSymbol) { this.instance.justSymbol = justSymbol; return this; } - public EnumArrays.Builder arrayEnum(List arrayEnum) { + public EnumArrays.Builder arrayEnum(.annotation.Nullable List arrayEnum) { this.instance.arrayEnum = arrayEnum; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EnumTest.java index 79a0a41d004d..85df87833506 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EnumTest.java @@ -637,27 +637,27 @@ protected Builder(EnumTest instance) { this.instance = instance; } - public EnumTest.Builder enumString(EnumStringEnum enumString) { + public EnumTest.Builder enumString(.annotation.Nullable EnumStringEnum enumString) { this.instance.enumString = enumString; return this; } - public EnumTest.Builder enumStringRequired(EnumStringRequiredEnum enumStringRequired) { + public EnumTest.Builder enumStringRequired(.annotation.Nonnull EnumStringRequiredEnum enumStringRequired) { this.instance.enumStringRequired = enumStringRequired; return this; } - public EnumTest.Builder enumInteger(EnumIntegerEnum enumInteger) { + public EnumTest.Builder enumInteger(.annotation.Nullable EnumIntegerEnum enumInteger) { this.instance.enumInteger = enumInteger; return this; } - public EnumTest.Builder enumIntegerOnly(EnumIntegerOnlyEnum enumIntegerOnly) { + public EnumTest.Builder enumIntegerOnly(.annotation.Nullable EnumIntegerOnlyEnum enumIntegerOnly) { this.instance.enumIntegerOnly = enumIntegerOnly; return this; } - public EnumTest.Builder enumNumber(EnumNumberEnum enumNumber) { + public EnumTest.Builder enumNumber(.annotation.Nullable EnumNumberEnum enumNumber) { this.instance.enumNumber = enumNumber; return this; } - public EnumTest.Builder outerEnum(OuterEnum outerEnum) { + public EnumTest.Builder outerEnum(.annotation.Nullable OuterEnum outerEnum) { this.instance.outerEnum = JsonNullable.of(outerEnum); return this; } @@ -665,15 +665,15 @@ public EnumTest.Builder outerEnum(JsonNullable outerEnum) { this.instance.outerEnum = outerEnum; return this; } - public EnumTest.Builder outerEnumInteger(OuterEnumInteger outerEnumInteger) { + public EnumTest.Builder outerEnumInteger(.annotation.Nullable OuterEnumInteger outerEnumInteger) { this.instance.outerEnumInteger = outerEnumInteger; return this; } - public EnumTest.Builder outerEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) { + public EnumTest.Builder outerEnumDefaultValue(.annotation.Nullable OuterEnumDefaultValue outerEnumDefaultValue) { this.instance.outerEnumDefaultValue = outerEnumDefaultValue; return this; } - public EnumTest.Builder outerEnumIntegerDefaultValue(OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) { + public EnumTest.Builder outerEnumIntegerDefaultValue(.annotation.Nullable OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) { this.instance.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EquilateralTriangle.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EquilateralTriangle.java index 9a6e47fd513b..4026d1174628 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EquilateralTriangle.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EquilateralTriangle.java @@ -187,11 +187,11 @@ protected Builder(EquilateralTriangle instance) { this.instance = instance; } - public EquilateralTriangle.Builder shapeType(String shapeType) { + public EquilateralTriangle.Builder shapeType(.annotation.Nonnull String shapeType) { this.instance.shapeType = shapeType; return this; } - public EquilateralTriangle.Builder triangleType(String triangleType) { + public EquilateralTriangle.Builder triangleType(.annotation.Nonnull String triangleType) { this.instance.triangleType = triangleType; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java index e614facce5c0..2db6a029bac5 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java @@ -202,11 +202,11 @@ protected Builder(FakeBigDecimalMap200Response instance) { this.instance = instance; } - public FakeBigDecimalMap200Response.Builder someId(BigDecimal someId) { + public FakeBigDecimalMap200Response.Builder someId(.annotation.Nullable BigDecimal someId) { this.instance.someId = someId; return this; } - public FakeBigDecimalMap200Response.Builder someMap(Map someMap) { + public FakeBigDecimalMap200Response.Builder someMap(.annotation.Nullable Map someMap) { this.instance.someMap = someMap; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index d2c43b30b05c..839a77774140 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -203,11 +203,11 @@ protected Builder(FileSchemaTestClass instance) { this.instance = instance; } - public FileSchemaTestClass.Builder _file(ModelFile _file) { + public FileSchemaTestClass.Builder _file(.annotation.Nullable ModelFile _file) { this.instance._file = _file; return this; } - public FileSchemaTestClass.Builder files(List files) { + public FileSchemaTestClass.Builder files(.annotation.Nullable List files) { this.instance.files = files; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Foo.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Foo.java index 04cc9397fb66..ffdaa332f82d 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Foo.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Foo.java @@ -152,7 +152,7 @@ protected Builder(Foo instance) { this.instance = instance; } - public Foo.Builder bar(String bar) { + public Foo.Builder bar(.annotation.Nullable String bar) { this.instance.bar = bar; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java index dcee9e7ef88d..3c5f66d3350a 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java @@ -153,7 +153,7 @@ protected Builder(FooGetDefaultResponse instance) { this.instance = instance; } - public FooGetDefaultResponse.Builder string(Foo string) { + public FooGetDefaultResponse.Builder string(.annotation.Nullable Foo string) { this.instance.string = string; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FormatTest.java index 90598c74de3f..88ea68cb714b 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FormatTest.java @@ -692,67 +692,67 @@ protected Builder(FormatTest instance) { this.instance = instance; } - public FormatTest.Builder integer(Integer integer) { + public FormatTest.Builder integer(.annotation.Nullable Integer integer) { this.instance.integer = integer; return this; } - public FormatTest.Builder int32(Integer int32) { + public FormatTest.Builder int32(.annotation.Nullable Integer int32) { this.instance.int32 = int32; return this; } - public FormatTest.Builder int64(Long int64) { + public FormatTest.Builder int64(.annotation.Nullable Long int64) { this.instance.int64 = int64; return this; } - public FormatTest.Builder number(BigDecimal number) { + public FormatTest.Builder number(.annotation.Nonnull BigDecimal number) { this.instance.number = number; return this; } - public FormatTest.Builder _float(Float _float) { + public FormatTest.Builder _float(.annotation.Nullable Float _float) { this.instance._float = _float; return this; } - public FormatTest.Builder _double(Double _double) { + public FormatTest.Builder _double(.annotation.Nullable Double _double) { this.instance._double = _double; return this; } - public FormatTest.Builder decimal(BigDecimal decimal) { + public FormatTest.Builder decimal(.annotation.Nullable BigDecimal decimal) { this.instance.decimal = decimal; return this; } - public FormatTest.Builder string(String string) { + public FormatTest.Builder string(.annotation.Nullable String string) { this.instance.string = string; return this; } - public FormatTest.Builder _byte(byte[] _byte) { + public FormatTest.Builder _byte(.annotation.Nonnull byte[] _byte) { this.instance._byte = _byte; return this; } - public FormatTest.Builder binary(File binary) { + public FormatTest.Builder binary(.annotation.Nullable File binary) { this.instance.binary = binary; return this; } - public FormatTest.Builder date(LocalDate date) { + public FormatTest.Builder date(.annotation.Nonnull LocalDate date) { this.instance.date = date; return this; } - public FormatTest.Builder dateTime(OffsetDateTime dateTime) { + public FormatTest.Builder dateTime(.annotation.Nullable OffsetDateTime dateTime) { this.instance.dateTime = dateTime; return this; } - public FormatTest.Builder uuid(UUID uuid) { + public FormatTest.Builder uuid(.annotation.Nullable UUID uuid) { this.instance.uuid = uuid; return this; } - public FormatTest.Builder password(String password) { + public FormatTest.Builder password(.annotation.Nonnull String password) { this.instance.password = password; return this; } - public FormatTest.Builder patternWithDigits(String patternWithDigits) { + public FormatTest.Builder patternWithDigits(.annotation.Nullable String patternWithDigits) { this.instance.patternWithDigits = patternWithDigits; return this; } - public FormatTest.Builder patternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) { + public FormatTest.Builder patternWithDigitsAndDelimiter(.annotation.Nullable String patternWithDigitsAndDelimiter) { this.instance.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/GrandparentAnimal.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/GrandparentAnimal.java index d9ae136260f7..e93211c35fbd 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/GrandparentAnimal.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/GrandparentAnimal.java @@ -174,7 +174,7 @@ protected Builder(GrandparentAnimal instance) { this.instance = instance; } - public GrandparentAnimal.Builder petType(String petType) { + public GrandparentAnimal.Builder petType(.annotation.Nonnull String petType) { this.instance.petType = petType; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index c1ebd7c7410f..583ed0e768ee 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -177,11 +177,11 @@ protected Builder(HasOnlyReadOnly instance) { this.instance = instance; } - public HasOnlyReadOnly.Builder bar(String bar) { + public HasOnlyReadOnly.Builder bar(.annotation.Nullable String bar) { this.instance.bar = bar; return this; } - public HasOnlyReadOnly.Builder foo(String foo) { + public HasOnlyReadOnly.Builder foo(.annotation.Nullable String foo) { this.instance.foo = foo; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/HealthCheckResult.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/HealthCheckResult.java index 858ea584d117..fd924edb4b28 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/HealthCheckResult.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/HealthCheckResult.java @@ -174,7 +174,7 @@ protected Builder(HealthCheckResult instance) { this.instance = instance; } - public HealthCheckResult.Builder nullableMessage(String nullableMessage) { + public HealthCheckResult.Builder nullableMessage(.annotation.Nullable String nullableMessage) { this.instance.nullableMessage = JsonNullable.of(nullableMessage); return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/IsoscelesTriangle.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/IsoscelesTriangle.java index a23e04252990..1184799e6015 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/IsoscelesTriangle.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/IsoscelesTriangle.java @@ -187,11 +187,11 @@ protected Builder(IsoscelesTriangle instance) { this.instance = instance; } - public IsoscelesTriangle.Builder shapeType(String shapeType) { + public IsoscelesTriangle.Builder shapeType(.annotation.Nonnull String shapeType) { this.instance.shapeType = shapeType; return this; } - public IsoscelesTriangle.Builder triangleType(String triangleType) { + public IsoscelesTriangle.Builder triangleType(.annotation.Nonnull String triangleType) { this.instance.triangleType = triangleType; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/MapTest.java index 96336a90f0d1..b4b4dcabe238 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/MapTest.java @@ -342,19 +342,19 @@ protected Builder(MapTest instance) { this.instance = instance; } - public MapTest.Builder mapMapOfString(Map> mapMapOfString) { + public MapTest.Builder mapMapOfString(.annotation.Nullable Map> mapMapOfString) { this.instance.mapMapOfString = mapMapOfString; return this; } - public MapTest.Builder mapOfEnumString(Map mapOfEnumString) { + public MapTest.Builder mapOfEnumString(.annotation.Nullable Map mapOfEnumString) { this.instance.mapOfEnumString = mapOfEnumString; return this; } - public MapTest.Builder directMap(Map directMap) { + public MapTest.Builder directMap(.annotation.Nullable Map directMap) { this.instance.directMap = directMap; return this; } - public MapTest.Builder indirectMap(Map indirectMap) { + public MapTest.Builder indirectMap(.annotation.Nullable Map indirectMap) { this.instance.indirectMap = indirectMap; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index def61869fea4..56045c8850e3 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -240,15 +240,15 @@ protected Builder(MixedPropertiesAndAdditionalPropertiesClass instance) { this.instance = instance; } - public MixedPropertiesAndAdditionalPropertiesClass.Builder uuid(UUID uuid) { + public MixedPropertiesAndAdditionalPropertiesClass.Builder uuid(.annotation.Nullable UUID uuid) { this.instance.uuid = uuid; return this; } - public MixedPropertiesAndAdditionalPropertiesClass.Builder dateTime(OffsetDateTime dateTime) { + public MixedPropertiesAndAdditionalPropertiesClass.Builder dateTime(.annotation.Nullable OffsetDateTime dateTime) { this.instance.dateTime = dateTime; return this; } - public MixedPropertiesAndAdditionalPropertiesClass.Builder map(Map map) { + public MixedPropertiesAndAdditionalPropertiesClass.Builder map(.annotation.Nullable Map map) { this.instance.map = map; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Model200Response.java index ecb066765fe5..4b29d7aed3f9 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Model200Response.java @@ -187,11 +187,11 @@ protected Builder(Model200Response instance) { this.instance = instance; } - public Model200Response.Builder name(Integer name) { + public Model200Response.Builder name(.annotation.Nullable Integer name) { this.instance.name = name; return this; } - public Model200Response.Builder propertyClass(String propertyClass) { + public Model200Response.Builder propertyClass(.annotation.Nullable String propertyClass) { this.instance.propertyClass = propertyClass; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 76faf44224c4..95cc24aa2a7e 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -222,15 +222,15 @@ protected Builder(ModelApiResponse instance) { this.instance = instance; } - public ModelApiResponse.Builder code(Integer code) { + public ModelApiResponse.Builder code(.annotation.Nullable Integer code) { this.instance.code = code; return this; } - public ModelApiResponse.Builder type(String type) { + public ModelApiResponse.Builder type(.annotation.Nullable String type) { this.instance.type = type; return this; } - public ModelApiResponse.Builder message(String message) { + public ModelApiResponse.Builder message(.annotation.Nullable String message) { this.instance.message = message; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelFile.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelFile.java index 2dcaff602131..333204ac0850 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelFile.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelFile.java @@ -152,7 +152,7 @@ protected Builder(ModelFile instance) { this.instance = instance; } - public ModelFile.Builder sourceURI(String sourceURI) { + public ModelFile.Builder sourceURI(.annotation.Nullable String sourceURI) { this.instance.sourceURI = sourceURI; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelList.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelList.java index 1c641c1462f5..32553bd95401 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelList.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelList.java @@ -152,7 +152,7 @@ protected Builder(ModelList instance) { this.instance = instance; } - public ModelList.Builder _123list(String _123list) { + public ModelList.Builder _123list(.annotation.Nullable String _123list) { this.instance._123list = _123list; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelReturn.java index 264a6d166064..b53a1767f101 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -152,7 +152,7 @@ protected Builder(ModelReturn instance) { this.instance = instance; } - public ModelReturn.Builder _return(Integer _return) { + public ModelReturn.Builder _return(.annotation.Nullable Integer _return) { this.instance._return = _return; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Name.java index 8c1a3c0a9168..14b75487d9ed 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Name.java @@ -247,19 +247,19 @@ protected Builder(Name instance) { this.instance = instance; } - public Name.Builder name(Integer name) { + public Name.Builder name(.annotation.Nonnull Integer name) { this.instance.name = name; return this; } - public Name.Builder snakeCase(Integer snakeCase) { + public Name.Builder snakeCase(.annotation.Nullable Integer snakeCase) { this.instance.snakeCase = snakeCase; return this; } - public Name.Builder property(String property) { + public Name.Builder property(.annotation.Nullable String property) { this.instance.property = property; return this; } - public Name.Builder _123number(Integer _123number) { + public Name.Builder _123number(.annotation.Nullable Integer _123number) { this.instance._123number = _123number; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/NullableClass.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/NullableClass.java index 6569aaded6ce..68415991e5af 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/NullableClass.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/NullableClass.java @@ -765,7 +765,7 @@ protected Builder(NullableClass instance) { this.instance = instance; } - public NullableClass.Builder integerProp(Integer integerProp) { + public NullableClass.Builder integerProp(.annotation.Nullable Integer integerProp) { this.instance.integerProp = JsonNullable.of(integerProp); return this; } @@ -773,7 +773,7 @@ public NullableClass.Builder integerProp(JsonNullable integerProp) { this.instance.integerProp = integerProp; return this; } - public NullableClass.Builder numberProp(BigDecimal numberProp) { + public NullableClass.Builder numberProp(.annotation.Nullable BigDecimal numberProp) { this.instance.numberProp = JsonNullable.of(numberProp); return this; } @@ -781,7 +781,7 @@ public NullableClass.Builder numberProp(JsonNullable numberProp) { this.instance.numberProp = numberProp; return this; } - public NullableClass.Builder booleanProp(Boolean booleanProp) { + public NullableClass.Builder booleanProp(.annotation.Nullable Boolean booleanProp) { this.instance.booleanProp = JsonNullable.of(booleanProp); return this; } @@ -789,7 +789,7 @@ public NullableClass.Builder booleanProp(JsonNullable booleanProp) { this.instance.booleanProp = booleanProp; return this; } - public NullableClass.Builder stringProp(String stringProp) { + public NullableClass.Builder stringProp(.annotation.Nullable String stringProp) { this.instance.stringProp = JsonNullable.of(stringProp); return this; } @@ -797,7 +797,7 @@ public NullableClass.Builder stringProp(JsonNullable stringProp) { this.instance.stringProp = stringProp; return this; } - public NullableClass.Builder dateProp(LocalDate dateProp) { + public NullableClass.Builder dateProp(.annotation.Nullable LocalDate dateProp) { this.instance.dateProp = JsonNullable.of(dateProp); return this; } @@ -805,7 +805,7 @@ public NullableClass.Builder dateProp(JsonNullable dateProp) { this.instance.dateProp = dateProp; return this; } - public NullableClass.Builder datetimeProp(OffsetDateTime datetimeProp) { + public NullableClass.Builder datetimeProp(.annotation.Nullable OffsetDateTime datetimeProp) { this.instance.datetimeProp = JsonNullable.of(datetimeProp); return this; } @@ -813,7 +813,7 @@ public NullableClass.Builder datetimeProp(JsonNullable datetimeP this.instance.datetimeProp = datetimeProp; return this; } - public NullableClass.Builder arrayNullableProp(List arrayNullableProp) { + public NullableClass.Builder arrayNullableProp(.annotation.Nullable List arrayNullableProp) { this.instance.arrayNullableProp = JsonNullable.>of(arrayNullableProp); return this; } @@ -821,7 +821,7 @@ public NullableClass.Builder arrayNullableProp(JsonNullable> arrayN this.instance.arrayNullableProp = arrayNullableProp; return this; } - public NullableClass.Builder arrayAndItemsNullableProp(List arrayAndItemsNullableProp) { + public NullableClass.Builder arrayAndItemsNullableProp(.annotation.Nullable List arrayAndItemsNullableProp) { this.instance.arrayAndItemsNullableProp = JsonNullable.>of(arrayAndItemsNullableProp); return this; } @@ -829,11 +829,11 @@ public NullableClass.Builder arrayAndItemsNullableProp(JsonNullable this.instance.arrayAndItemsNullableProp = arrayAndItemsNullableProp; return this; } - public NullableClass.Builder arrayItemsNullable(List arrayItemsNullable) { + public NullableClass.Builder arrayItemsNullable(.annotation.Nullable List arrayItemsNullable) { this.instance.arrayItemsNullable = arrayItemsNullable; return this; } - public NullableClass.Builder objectNullableProp(Map objectNullableProp) { + public NullableClass.Builder objectNullableProp(.annotation.Nullable Map objectNullableProp) { this.instance.objectNullableProp = JsonNullable.>of(objectNullableProp); return this; } @@ -841,7 +841,7 @@ public NullableClass.Builder objectNullableProp(JsonNullable this.instance.objectNullableProp = objectNullableProp; return this; } - public NullableClass.Builder objectAndItemsNullableProp(Map objectAndItemsNullableProp) { + public NullableClass.Builder objectAndItemsNullableProp(.annotation.Nullable Map objectAndItemsNullableProp) { this.instance.objectAndItemsNullableProp = JsonNullable.>of(objectAndItemsNullableProp); return this; } @@ -849,7 +849,7 @@ public NullableClass.Builder objectAndItemsNullableProp(JsonNullable objectItemsNullable) { + public NullableClass.Builder objectItemsNullable(.annotation.Nullable Map objectItemsNullable) { this.instance.objectItemsNullable = objectItemsNullable; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/NumberOnly.java index e65f78226378..0193072086d1 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -153,7 +153,7 @@ protected Builder(NumberOnly instance) { this.instance = instance; } - public NumberOnly.Builder justNumber(BigDecimal justNumber) { + public NumberOnly.Builder justNumber(.annotation.Nullable BigDecimal justNumber) { this.instance.justNumber = justNumber; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java index 7502eed1c39c..5c18e344ecc3 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java @@ -279,19 +279,19 @@ protected Builder(ObjectWithDeprecatedFields instance) { this.instance = instance; } - public ObjectWithDeprecatedFields.Builder uuid(String uuid) { + public ObjectWithDeprecatedFields.Builder uuid(.annotation.Nullable String uuid) { this.instance.uuid = uuid; return this; } - public ObjectWithDeprecatedFields.Builder id(BigDecimal id) { + public ObjectWithDeprecatedFields.Builder id(.annotation.Nullable BigDecimal id) { this.instance.id = id; return this; } - public ObjectWithDeprecatedFields.Builder deprecatedRef(DeprecatedObject deprecatedRef) { + public ObjectWithDeprecatedFields.Builder deprecatedRef(.annotation.Nullable DeprecatedObject deprecatedRef) { this.instance.deprecatedRef = deprecatedRef; return this; } - public ObjectWithDeprecatedFields.Builder bars(List bars) { + public ObjectWithDeprecatedFields.Builder bars(.annotation.Nullable List bars) { this.instance.bars = bars; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Order.java index adf6c74405eb..8e8c7f89fbdd 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Order.java @@ -365,27 +365,27 @@ protected Builder(Order instance) { this.instance = instance; } - public Order.Builder id(Long id) { + public Order.Builder id(.annotation.Nullable Long id) { this.instance.id = id; return this; } - public Order.Builder petId(Long petId) { + public Order.Builder petId(.annotation.Nullable Long petId) { this.instance.petId = petId; return this; } - public Order.Builder quantity(Integer quantity) { + public Order.Builder quantity(.annotation.Nullable Integer quantity) { this.instance.quantity = quantity; return this; } - public Order.Builder shipDate(OffsetDateTime shipDate) { + public Order.Builder shipDate(.annotation.Nullable OffsetDateTime shipDate) { this.instance.shipDate = shipDate; return this; } - public Order.Builder status(StatusEnum status) { + public Order.Builder status(.annotation.Nullable StatusEnum status) { this.instance.status = status; return this; } - public Order.Builder complete(Boolean complete) { + public Order.Builder complete(.annotation.Nullable Boolean complete) { this.instance.complete = complete; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterComposite.java index efcb70ac783a..6f68cfeeaa49 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -223,15 +223,15 @@ protected Builder(OuterComposite instance) { this.instance = instance; } - public OuterComposite.Builder myNumber(BigDecimal myNumber) { + public OuterComposite.Builder myNumber(.annotation.Nullable BigDecimal myNumber) { this.instance.myNumber = myNumber; return this; } - public OuterComposite.Builder myString(String myString) { + public OuterComposite.Builder myString(.annotation.Nullable String myString) { this.instance.myString = myString; return this; } - public OuterComposite.Builder myBoolean(Boolean myBoolean) { + public OuterComposite.Builder myBoolean(.annotation.Nullable Boolean myBoolean) { this.instance.myBoolean = myBoolean; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ParentPet.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ParentPet.java index 94d852271e5a..da67647f4e05 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ParentPet.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ParentPet.java @@ -152,7 +152,7 @@ protected Builder(ParentPet instance) { } - public ParentPet.Builder petType(String petType) { // inherited: true + public ParentPet.Builder petType(.annotation.Nonnull String petType) { // inherited: true super.petType(petType); return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Pet.java index 38a64a1abf66..6b36c1de1383 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Pet.java @@ -393,27 +393,27 @@ protected Builder(Pet instance) { this.instance = instance; } - public Pet.Builder id(Long id) { + public Pet.Builder id(.annotation.Nullable Long id) { this.instance.id = id; return this; } - public Pet.Builder category(Category category) { + public Pet.Builder category(.annotation.Nullable Category category) { this.instance.category = category; return this; } - public Pet.Builder name(String name) { + public Pet.Builder name(.annotation.Nonnull String name) { this.instance.name = name; return this; } - public Pet.Builder photoUrls(List photoUrls) { + public Pet.Builder photoUrls(.annotation.Nonnull List photoUrls) { this.instance.photoUrls = photoUrls; return this; } - public Pet.Builder tags(List tags) { + public Pet.Builder tags(.annotation.Nullable List tags) { this.instance.tags = tags; return this; } - public Pet.Builder status(StatusEnum status) { + public Pet.Builder status(.annotation.Nullable StatusEnum status) { this.instance.status = status; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java index ddda7f7cef92..08780a788255 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java @@ -152,7 +152,7 @@ protected Builder(QuadrilateralInterface instance) { this.instance = instance; } - public QuadrilateralInterface.Builder quadrilateralType(String quadrilateralType) { + public QuadrilateralInterface.Builder quadrilateralType(.annotation.Nonnull String quadrilateralType) { this.instance.quadrilateralType = quadrilateralType; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index 9281997a1969..ef4dd8860515 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -185,11 +185,11 @@ protected Builder(ReadOnlyFirst instance) { this.instance = instance; } - public ReadOnlyFirst.Builder bar(String bar) { + public ReadOnlyFirst.Builder bar(.annotation.Nullable String bar) { this.instance.bar = bar; return this; } - public ReadOnlyFirst.Builder baz(String baz) { + public ReadOnlyFirst.Builder baz(.annotation.Nullable String baz) { this.instance.baz = baz; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ScaleneTriangle.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ScaleneTriangle.java index 82f984e9818f..7ab05c9f14b1 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ScaleneTriangle.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ScaleneTriangle.java @@ -187,11 +187,11 @@ protected Builder(ScaleneTriangle instance) { this.instance = instance; } - public ScaleneTriangle.Builder shapeType(String shapeType) { + public ScaleneTriangle.Builder shapeType(.annotation.Nonnull String shapeType) { this.instance.shapeType = shapeType; return this; } - public ScaleneTriangle.Builder triangleType(String triangleType) { + public ScaleneTriangle.Builder triangleType(.annotation.Nonnull String triangleType) { this.instance.triangleType = triangleType; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ShapeInterface.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ShapeInterface.java index b49236122522..b59f0264b5f7 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ShapeInterface.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ShapeInterface.java @@ -152,7 +152,7 @@ protected Builder(ShapeInterface instance) { this.instance = instance; } - public ShapeInterface.Builder shapeType(String shapeType) { + public ShapeInterface.Builder shapeType(.annotation.Nonnull String shapeType) { this.instance.shapeType = shapeType; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java index 4fd6fd223789..8342f9fd8ba1 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java @@ -187,11 +187,11 @@ protected Builder(SimpleQuadrilateral instance) { this.instance = instance; } - public SimpleQuadrilateral.Builder shapeType(String shapeType) { + public SimpleQuadrilateral.Builder shapeType(.annotation.Nonnull String shapeType) { this.instance.shapeType = shapeType; return this; } - public SimpleQuadrilateral.Builder quadrilateralType(String quadrilateralType) { + public SimpleQuadrilateral.Builder quadrilateralType(.annotation.Nonnull String quadrilateralType) { this.instance.quadrilateralType = quadrilateralType; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/SpecialModelName.java index f50d14a4114e..7f91aeaefdca 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -187,11 +187,11 @@ protected Builder(SpecialModelName instance) { this.instance = instance; } - public SpecialModelName.Builder $specialPropertyName(Long $specialPropertyName) { + public SpecialModelName.Builder $specialPropertyName(.annotation.Nullable Long $specialPropertyName) { this.instance.$specialPropertyName = $specialPropertyName; return this; } - public SpecialModelName.Builder specialModelName(String specialModelName) { + public SpecialModelName.Builder specialModelName(.annotation.Nullable String specialModelName) { this.instance.specialModelName = specialModelName; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Tag.java index 0f39e5849db0..bbfdfa9fa9d5 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Tag.java @@ -187,11 +187,11 @@ protected Builder(Tag instance) { this.instance = instance; } - public Tag.Builder id(Long id) { + public Tag.Builder id(.annotation.Nullable Long id) { this.instance.id = id; return this; } - public Tag.Builder name(String name) { + public Tag.Builder name(.annotation.Nullable String name) { this.instance.name = name; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java index 57573b14117e..53f3de5d9e3d 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java @@ -200,7 +200,7 @@ protected Builder(TestInlineFreeformAdditionalPropertiesRequest instance) { this.instance = instance; } - public TestInlineFreeformAdditionalPropertiesRequest.Builder someProperty(String someProperty) { + public TestInlineFreeformAdditionalPropertiesRequest.Builder someProperty(.annotation.Nullable String someProperty) { this.instance.someProperty = someProperty; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/TriangleInterface.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/TriangleInterface.java index de4bb88b95ea..94ca0221fab2 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/TriangleInterface.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/TriangleInterface.java @@ -152,7 +152,7 @@ protected Builder(TriangleInterface instance) { this.instance = instance; } - public TriangleInterface.Builder triangleType(String triangleType) { + public TriangleInterface.Builder triangleType(.annotation.Nonnull String triangleType) { this.instance.triangleType = triangleType; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/User.java index 392e98c5cc00..b1ac94f25339 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/User.java @@ -573,43 +573,43 @@ protected Builder(User instance) { this.instance = instance; } - public User.Builder id(Long id) { + public User.Builder id(.annotation.Nullable Long id) { this.instance.id = id; return this; } - public User.Builder username(String username) { + public User.Builder username(.annotation.Nullable String username) { this.instance.username = username; return this; } - public User.Builder firstName(String firstName) { + public User.Builder firstName(.annotation.Nullable String firstName) { this.instance.firstName = firstName; return this; } - public User.Builder lastName(String lastName) { + public User.Builder lastName(.annotation.Nullable String lastName) { this.instance.lastName = lastName; return this; } - public User.Builder email(String email) { + public User.Builder email(.annotation.Nullable String email) { this.instance.email = email; return this; } - public User.Builder password(String password) { + public User.Builder password(.annotation.Nullable String password) { this.instance.password = password; return this; } - public User.Builder phone(String phone) { + public User.Builder phone(.annotation.Nullable String phone) { this.instance.phone = phone; return this; } - public User.Builder userStatus(Integer userStatus) { + public User.Builder userStatus(.annotation.Nullable Integer userStatus) { this.instance.userStatus = userStatus; return this; } - public User.Builder objectWithNoDeclaredProps(Object objectWithNoDeclaredProps) { + public User.Builder objectWithNoDeclaredProps(.annotation.Nullable Object objectWithNoDeclaredProps) { this.instance.objectWithNoDeclaredProps = objectWithNoDeclaredProps; return this; } - public User.Builder objectWithNoDeclaredPropsNullable(Object objectWithNoDeclaredPropsNullable) { + public User.Builder objectWithNoDeclaredPropsNullable(.annotation.Nullable Object objectWithNoDeclaredPropsNullable) { this.instance.objectWithNoDeclaredPropsNullable = JsonNullable.of(objectWithNoDeclaredPropsNullable); return this; } @@ -617,7 +617,7 @@ public User.Builder objectWithNoDeclaredPropsNullable(JsonNullable objec this.instance.objectWithNoDeclaredPropsNullable = objectWithNoDeclaredPropsNullable; return this; } - public User.Builder anyTypeProp(Object anyTypeProp) { + public User.Builder anyTypeProp(.annotation.Nullable Object anyTypeProp) { this.instance.anyTypeProp = JsonNullable.of(anyTypeProp); return this; } @@ -625,7 +625,7 @@ public User.Builder anyTypeProp(JsonNullable anyTypeProp) { this.instance.anyTypeProp = anyTypeProp; return this; } - public User.Builder anyTypePropNullable(Object anyTypePropNullable) { + public User.Builder anyTypePropNullable(.annotation.Nullable Object anyTypePropNullable) { this.instance.anyTypePropNullable = JsonNullable.of(anyTypePropNullable); return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Whale.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Whale.java index 27fe86483e0e..6b5e75bc994b 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Whale.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Whale.java @@ -222,15 +222,15 @@ protected Builder(Whale instance) { this.instance = instance; } - public Whale.Builder hasBaleen(Boolean hasBaleen) { + public Whale.Builder hasBaleen(.annotation.Nullable Boolean hasBaleen) { this.instance.hasBaleen = hasBaleen; return this; } - public Whale.Builder hasTeeth(Boolean hasTeeth) { + public Whale.Builder hasTeeth(.annotation.Nullable Boolean hasTeeth) { this.instance.hasTeeth = hasTeeth; return this; } - public Whale.Builder className(String className) { + public Whale.Builder className(.annotation.Nonnull String className) { this.instance.className = className; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Zebra.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Zebra.java index 2741cd52c14f..32a6002496bc 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Zebra.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Zebra.java @@ -272,11 +272,11 @@ protected Builder(Zebra instance) { this.instance = instance; } - public Zebra.Builder type(TypeEnum type) { + public Zebra.Builder type(.annotation.Nullable TypeEnum type) { this.instance.type = type; return this; } - public Zebra.Builder className(String className) { + public Zebra.Builder className(.annotation.Nonnull String className) { this.instance.className = className; return this; } diff --git a/samples/client/petstore/java/okhttp-gson-3.1-duplicated-operationid/git_push.sh b/samples/client/petstore/java/okhttp-gson-3.1-duplicated-operationid/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1-duplicated-operationid/git_push.sh +++ b/samples/client/petstore/java/okhttp-gson-3.1-duplicated-operationid/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/okhttp-gson-3.1/git_push.sh b/samples/client/petstore/java/okhttp-gson-3.1/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/git_push.sh +++ b/samples/client/petstore/java/okhttp-gson-3.1/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/okhttp-gson-awsv4signature/git_push.sh b/samples/client/petstore/java/okhttp-gson-awsv4signature/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/okhttp-gson-awsv4signature/git_push.sh +++ b/samples/client/petstore/java/okhttp-gson-awsv4signature/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java index 6ae354daf9f4..e69de29bb2d1 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java @@ -1,75 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.auth; - -import org.openapitools.client.ApiException; -import org.openapitools.client.Pair; - -import java.net.URI; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.function.Supplier; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.25.0-SNAPSHOT") -public class HttpBearerAuth implements Authentication { - private final String scheme; - private Supplier tokenSupplier; - - public HttpBearerAuth(String scheme) { - this.scheme = scheme; - } - - /** - * Gets the token, which together with the scheme, will be sent as the value of the Authorization header. - * - * @return The bearer token - */ - public String getBearerToken() { - return tokenSupplier.get(); - } - - /** - * Sets the token, which together with the scheme, will be sent as the value of the Authorization header. - * - * @param bearerToken The bearer token to send in the Authorization header - */ - public void setBearerToken(String bearerToken) { - this.tokenSupplier = () -> bearerToken; - } - - /** - * Sets the supplier of tokens, which together with the scheme, will be sent as the value of the Authorization header. - * - * @param tokenSupplier The supplier of bearer tokens to send in the Authorization header - */ - public void setBearerToken(Supplier tokenSupplier) { - this.tokenSupplier = tokenSupplier; - } - - @Override - public void applyToParams(List queryParams, Map headerParams, Map cookieParams, - String payload, String method, URI uri) throws ApiException { - String bearerToken = Optional.ofNullable(tokenSupplier).map(Supplier::get).orElse(null); - if (bearerToken == null) { - return; - } - - headerParams.put("Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken); - } - - private static String upperCaseBearer(String scheme) { - return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme; - } -} diff --git a/samples/client/petstore/java/okhttp-gson-group-parameter/git_push.sh b/samples/client/petstore/java/okhttp-gson-group-parameter/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/okhttp-gson-group-parameter/git_push.sh +++ b/samples/client/petstore/java/okhttp-gson-group-parameter/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/okhttp-gson-nullable-required/git_push.sh b/samples/client/petstore/java/okhttp-gson-nullable-required/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/okhttp-gson-nullable-required/git_push.sh +++ b/samples/client/petstore/java/okhttp-gson-nullable-required/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/git_push.sh b/samples/client/petstore/java/okhttp-gson-parcelableModel/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/git_push.sh +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/git_push.sh b/samples/client/petstore/java/okhttp-gson-swagger1/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger1/git_push.sh +++ b/samples/client/petstore/java/okhttp-gson-swagger1/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/okhttp-gson-swagger2/git_push.sh b/samples/client/petstore/java/okhttp-gson-swagger2/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger2/git_push.sh +++ b/samples/client/petstore/java/okhttp-gson-swagger2/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/okhttp-gson/git_push.sh b/samples/client/petstore/java/okhttp-gson/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/okhttp-gson/git_push.sh +++ b/samples/client/petstore/java/okhttp-gson/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/rest-assured-jackson/git_push.sh b/samples/client/petstore/java/rest-assured-jackson/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/rest-assured-jackson/git_push.sh +++ b/samples/client/petstore/java/rest-assured-jackson/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/rest-assured/git_push.sh b/samples/client/petstore/java/rest-assured/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/rest-assured/git_push.sh +++ b/samples/client/petstore/java/rest-assured/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/restclient-nullable-arrays/git_push.sh b/samples/client/petstore/java/restclient-nullable-arrays/git_push.sh index a35991cd51a1..f53a75d4fabe 100755 --- a/samples/client/petstore/java/restclient-nullable-arrays/git_push.sh +++ b/samples/client/petstore/java/restclient-nullable-arrays/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson2/git_push.sh b/samples/client/petstore/java/restclient-springBoot4-jackson2/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/restclient-springBoot4-jackson2/git_push.sh +++ b/samples/client/petstore/java/restclient-springBoot4-jackson2/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/git_push.sh b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/git_push.sh +++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/src/main/java/org/openapitools/client/model/FileContent.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/src/main/java/org/openapitools/client/model/FileContent.java index b0f00682525b..a96749d9ef05 100644 --- a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/src/main/java/org/openapitools/client/model/FileContent.java +++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/src/main/java/org/openapitools/client/model/FileContent.java @@ -195,11 +195,11 @@ public FileContent.Builder name(String name) { this.instance.name = name; return this; } - public FileContent.Builder size(@Nullable Integer size) { + public FileContent.Builder size(Integer size) { this.instance.size = size; return this; } - public FileContent.Builder virusScan(@Nullable VirusScanEnum virusScan) { + public FileContent.Builder virusScan(VirusScanEnum virusScan) { this.instance.virusScan = virusScan; return this; } diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/src/main/java/org/openapitools/client/model/Foo.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/src/main/java/org/openapitools/client/model/Foo.java index e5cc9c951158..7d14872465f0 100644 --- a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/src/main/java/org/openapitools/client/model/Foo.java +++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/src/main/java/org/openapitools/client/model/Foo.java @@ -603,11 +603,11 @@ protected Builder(Foo instance) { this.instance = instance; } - public Foo.Builder dt(java.time.@Nullable Instant dt) { + public Foo.Builder dt(java.time.Instant dt) { this.instance.dt = dt; return this; } - public Foo.Builder nullableDt(java.time.@Nullable Instant nullableDt) { + public Foo.Builder nullableDt(java.time.Instant nullableDt) { this.instance.nullableDt = JsonNullable.of(nullableDt); return this; } @@ -615,11 +615,11 @@ public Foo.Builder nullableDt(JsonNullable nullableDt) { this.instance.nullableDt = nullableDt; return this; } - public Foo.Builder binary(@Nullable File binary) { + public Foo.Builder binary(File binary) { this.instance.binary = binary; return this; } - public Foo.Builder nullableBinary(@Nullable File nullableBinary) { + public Foo.Builder nullableBinary(File nullableBinary) { this.instance.nullableBinary = JsonNullable.of(nullableBinary); return this; } @@ -627,15 +627,15 @@ public Foo.Builder nullableBinary(JsonNullable nullableBinary) { this.instance.nullableBinary = nullableBinary; return this; } - public Foo.Builder listOfDt(@Nullable List listOfDt) { + public Foo.Builder listOfDt(List listOfDt) { this.instance.listOfDt = listOfDt; return this; } - public Foo.Builder listMinIntems(@Nullable List listMinIntems) { + public Foo.Builder listMinIntems(List listMinIntems) { this.instance.listMinIntems = listMinIntems; return this; } - public Foo.Builder nullableListMinIntems(@Nullable List nullableListMinIntems) { + public Foo.Builder nullableListMinIntems(List nullableListMinIntems) { this.instance.nullableListMinIntems = JsonNullable.>of(nullableListMinIntems); return this; } @@ -647,11 +647,11 @@ public Foo.Builder requiredDt(java.time.Instant requiredDt) { this.instance.requiredDt = requiredDt; return this; } - public Foo.Builder number(java.math.@Nullable BigDecimal number) { + public Foo.Builder number(java.math.BigDecimal number) { this.instance.number = number; return this; } - public Foo.Builder nullableNumber(java.math.@Nullable BigDecimal nullableNumber) { + public Foo.Builder nullableNumber(java.math.BigDecimal nullableNumber) { this.instance.nullableNumber = JsonNullable.of(nullableNumber); return this; } @@ -659,7 +659,7 @@ public Foo.Builder nullableNumber(JsonNullable nullableNum this.instance.nullableNumber = nullableNumber; return this; } - public Foo.Builder color(@Nullable String color) { + public Foo.Builder color(String color) { this.instance.color = color; return this; } @@ -667,7 +667,7 @@ public Foo.Builder requiredColor(String requiredColor) { this.instance.requiredColor = requiredColor; return this; } - public Foo.Builder nullableColor(@Nullable String nullableColor) { + public Foo.Builder nullableColor(String nullableColor) { this.instance.nullableColor = JsonNullable.of(nullableColor); return this; } diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/src/main/java/org/openapitools/client/model/RequiredAndNullable.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/src/main/java/org/openapitools/client/model/RequiredAndNullable.java index 55653e9e6161..52e671d1cee2 100644 --- a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/src/main/java/org/openapitools/client/model/RequiredAndNullable.java +++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/src/main/java/org/openapitools/client/model/RequiredAndNullable.java @@ -262,15 +262,15 @@ protected Builder(RequiredAndNullable instance) { this.instance = instance; } - public RequiredAndNullable.Builder str(@Nullable String str) { + public RequiredAndNullable.Builder str(String str) { this.instance.str = str; return this; } - public RequiredAndNullable.Builder _file(@Nullable File _file) { + public RequiredAndNullable.Builder _file(File _file) { this.instance._file = _file; return this; } - public RequiredAndNullable.Builder color(@Nullable String color) { + public RequiredAndNullable.Builder color(String color) { this.instance.color = color; return this; } @@ -278,7 +278,7 @@ public RequiredAndNullable.Builder onlyRequired(String onlyRequired) { this.instance.onlyRequired = onlyRequired; return this; } - public RequiredAndNullable.Builder _list(@Nullable List _list) { + public RequiredAndNullable.Builder _list(List _list) { this.instance._list = _list; return this; } diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/git_push.sh b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/git_push.sh +++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/FileContent.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/FileContent.java index b0f00682525b..a96749d9ef05 100644 --- a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/FileContent.java +++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/FileContent.java @@ -195,11 +195,11 @@ public FileContent.Builder name(String name) { this.instance.name = name; return this; } - public FileContent.Builder size(@Nullable Integer size) { + public FileContent.Builder size(Integer size) { this.instance.size = size; return this; } - public FileContent.Builder virusScan(@Nullable VirusScanEnum virusScan) { + public FileContent.Builder virusScan(VirusScanEnum virusScan) { this.instance.virusScan = virusScan; return this; } diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/Foo.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/Foo.java index ef899ba2185c..1371c0badfc0 100644 --- a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/Foo.java +++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/Foo.java @@ -544,31 +544,31 @@ protected Builder(Foo instance) { this.instance = instance; } - public Foo.Builder dt(java.time.@Nullable Instant dt) { + public Foo.Builder dt(java.time.Instant dt) { this.instance.dt = dt; return this; } - public Foo.Builder nullableDt(java.time.@Nullable Instant nullableDt) { + public Foo.Builder nullableDt(java.time.Instant nullableDt) { this.instance.nullableDt = nullableDt; return this; } - public Foo.Builder binary(@Nullable File binary) { + public Foo.Builder binary(File binary) { this.instance.binary = binary; return this; } - public Foo.Builder nullableBinary(@Nullable File nullableBinary) { + public Foo.Builder nullableBinary(File nullableBinary) { this.instance.nullableBinary = nullableBinary; return this; } - public Foo.Builder listOfDt(@Nullable List listOfDt) { + public Foo.Builder listOfDt(List listOfDt) { this.instance.listOfDt = listOfDt; return this; } - public Foo.Builder listMinIntems(@Nullable List listMinIntems) { + public Foo.Builder listMinIntems(List listMinIntems) { this.instance.listMinIntems = listMinIntems; return this; } - public Foo.Builder nullableListMinIntems(@Nullable List nullableListMinIntems) { + public Foo.Builder nullableListMinIntems(List nullableListMinIntems) { this.instance.nullableListMinIntems = nullableListMinIntems; return this; } @@ -576,15 +576,15 @@ public Foo.Builder requiredDt(java.time.Instant requiredDt) { this.instance.requiredDt = requiredDt; return this; } - public Foo.Builder number(java.math.@Nullable BigDecimal number) { + public Foo.Builder number(java.math.BigDecimal number) { this.instance.number = number; return this; } - public Foo.Builder nullableNumber(java.math.@Nullable BigDecimal nullableNumber) { + public Foo.Builder nullableNumber(java.math.BigDecimal nullableNumber) { this.instance.nullableNumber = nullableNumber; return this; } - public Foo.Builder color(@Nullable String color) { + public Foo.Builder color(String color) { this.instance.color = color; return this; } @@ -592,7 +592,7 @@ public Foo.Builder requiredColor(String requiredColor) { this.instance.requiredColor = requiredColor; return this; } - public Foo.Builder nullableColor(@Nullable String nullableColor) { + public Foo.Builder nullableColor(String nullableColor) { this.instance.nullableColor = nullableColor; return this; } diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/RequiredAndNullable.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/RequiredAndNullable.java index 55653e9e6161..52e671d1cee2 100644 --- a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/RequiredAndNullable.java +++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/RequiredAndNullable.java @@ -262,15 +262,15 @@ protected Builder(RequiredAndNullable instance) { this.instance = instance; } - public RequiredAndNullable.Builder str(@Nullable String str) { + public RequiredAndNullable.Builder str(String str) { this.instance.str = str; return this; } - public RequiredAndNullable.Builder _file(@Nullable File _file) { + public RequiredAndNullable.Builder _file(File _file) { this.instance._file = _file; return this; } - public RequiredAndNullable.Builder color(@Nullable String color) { + public RequiredAndNullable.Builder color(String color) { this.instance.color = color; return this; } @@ -278,7 +278,7 @@ public RequiredAndNullable.Builder onlyRequired(String onlyRequired) { this.instance.onlyRequired = onlyRequired; return this; } - public RequiredAndNullable.Builder _list(@Nullable List _list) { + public RequiredAndNullable.Builder _list(List _list) { this.instance._list = _list; return this; } diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3/git_push.sh b/samples/client/petstore/java/restclient-springBoot4-jackson3/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/restclient-springBoot4-jackson3/git_push.sh +++ b/samples/client/petstore/java/restclient-springBoot4-jackson3/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/restclient-swagger2/git_push.sh b/samples/client/petstore/java/restclient-swagger2/git_push.sh index a35991cd51a1..f53a75d4fabe 100755 --- a/samples/client/petstore/java/restclient-swagger2/git_push.sh +++ b/samples/client/petstore/java/restclient-swagger2/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/restclient-useSingleRequestParameter-static/git_push.sh b/samples/client/petstore/java/restclient-useSingleRequestParameter-static/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/restclient-useSingleRequestParameter-static/git_push.sh +++ b/samples/client/petstore/java/restclient-useSingleRequestParameter-static/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/restclient-useSingleRequestParameter/git_push.sh b/samples/client/petstore/java/restclient-useSingleRequestParameter/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/restclient-useSingleRequestParameter/git_push.sh +++ b/samples/client/petstore/java/restclient-useSingleRequestParameter/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/resteasy/git_push.sh b/samples/client/petstore/java/resteasy/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/resteasy/git_push.sh +++ b/samples/client/petstore/java/resteasy/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/resttemplate-jakarta/git_push.sh b/samples/client/petstore/java/resttemplate-jakarta/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/resttemplate-jakarta/git_push.sh +++ b/samples/client/petstore/java/resttemplate-jakarta/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/resttemplate-springBoot4-jackson2/git_push.sh b/samples/client/petstore/java/resttemplate-springBoot4-jackson2/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/resttemplate-springBoot4-jackson2/git_push.sh +++ b/samples/client/petstore/java/resttemplate-springBoot4-jackson2/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/resttemplate-springBoot4-jackson3-jspecify/git_push.sh b/samples/client/petstore/java/resttemplate-springBoot4-jackson3-jspecify/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/resttemplate-springBoot4-jackson3-jspecify/git_push.sh +++ b/samples/client/petstore/java/resttemplate-springBoot4-jackson3-jspecify/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/resttemplate-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/FileContent.java b/samples/client/petstore/java/resttemplate-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/FileContent.java index b0f00682525b..a96749d9ef05 100644 --- a/samples/client/petstore/java/resttemplate-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/FileContent.java +++ b/samples/client/petstore/java/resttemplate-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/FileContent.java @@ -195,11 +195,11 @@ public FileContent.Builder name(String name) { this.instance.name = name; return this; } - public FileContent.Builder size(@Nullable Integer size) { + public FileContent.Builder size(Integer size) { this.instance.size = size; return this; } - public FileContent.Builder virusScan(@Nullable VirusScanEnum virusScan) { + public FileContent.Builder virusScan(VirusScanEnum virusScan) { this.instance.virusScan = virusScan; return this; } diff --git a/samples/client/petstore/java/resttemplate-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/Foo.java b/samples/client/petstore/java/resttemplate-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/Foo.java index ef899ba2185c..1371c0badfc0 100644 --- a/samples/client/petstore/java/resttemplate-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/Foo.java +++ b/samples/client/petstore/java/resttemplate-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/Foo.java @@ -544,31 +544,31 @@ protected Builder(Foo instance) { this.instance = instance; } - public Foo.Builder dt(java.time.@Nullable Instant dt) { + public Foo.Builder dt(java.time.Instant dt) { this.instance.dt = dt; return this; } - public Foo.Builder nullableDt(java.time.@Nullable Instant nullableDt) { + public Foo.Builder nullableDt(java.time.Instant nullableDt) { this.instance.nullableDt = nullableDt; return this; } - public Foo.Builder binary(@Nullable File binary) { + public Foo.Builder binary(File binary) { this.instance.binary = binary; return this; } - public Foo.Builder nullableBinary(@Nullable File nullableBinary) { + public Foo.Builder nullableBinary(File nullableBinary) { this.instance.nullableBinary = nullableBinary; return this; } - public Foo.Builder listOfDt(@Nullable List listOfDt) { + public Foo.Builder listOfDt(List listOfDt) { this.instance.listOfDt = listOfDt; return this; } - public Foo.Builder listMinIntems(@Nullable List listMinIntems) { + public Foo.Builder listMinIntems(List listMinIntems) { this.instance.listMinIntems = listMinIntems; return this; } - public Foo.Builder nullableListMinIntems(@Nullable List nullableListMinIntems) { + public Foo.Builder nullableListMinIntems(List nullableListMinIntems) { this.instance.nullableListMinIntems = nullableListMinIntems; return this; } @@ -576,15 +576,15 @@ public Foo.Builder requiredDt(java.time.Instant requiredDt) { this.instance.requiredDt = requiredDt; return this; } - public Foo.Builder number(java.math.@Nullable BigDecimal number) { + public Foo.Builder number(java.math.BigDecimal number) { this.instance.number = number; return this; } - public Foo.Builder nullableNumber(java.math.@Nullable BigDecimal nullableNumber) { + public Foo.Builder nullableNumber(java.math.BigDecimal nullableNumber) { this.instance.nullableNumber = nullableNumber; return this; } - public Foo.Builder color(@Nullable String color) { + public Foo.Builder color(String color) { this.instance.color = color; return this; } @@ -592,7 +592,7 @@ public Foo.Builder requiredColor(String requiredColor) { this.instance.requiredColor = requiredColor; return this; } - public Foo.Builder nullableColor(@Nullable String nullableColor) { + public Foo.Builder nullableColor(String nullableColor) { this.instance.nullableColor = nullableColor; return this; } diff --git a/samples/client/petstore/java/resttemplate-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/RequiredAndNullable.java b/samples/client/petstore/java/resttemplate-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/RequiredAndNullable.java index 55653e9e6161..52e671d1cee2 100644 --- a/samples/client/petstore/java/resttemplate-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/RequiredAndNullable.java +++ b/samples/client/petstore/java/resttemplate-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/RequiredAndNullable.java @@ -262,15 +262,15 @@ protected Builder(RequiredAndNullable instance) { this.instance = instance; } - public RequiredAndNullable.Builder str(@Nullable String str) { + public RequiredAndNullable.Builder str(String str) { this.instance.str = str; return this; } - public RequiredAndNullable.Builder _file(@Nullable File _file) { + public RequiredAndNullable.Builder _file(File _file) { this.instance._file = _file; return this; } - public RequiredAndNullable.Builder color(@Nullable String color) { + public RequiredAndNullable.Builder color(String color) { this.instance.color = color; return this; } @@ -278,7 +278,7 @@ public RequiredAndNullable.Builder onlyRequired(String onlyRequired) { this.instance.onlyRequired = onlyRequired; return this; } - public RequiredAndNullable.Builder _list(@Nullable List _list) { + public RequiredAndNullable.Builder _list(List _list) { this.instance._list = _list; return this; } diff --git a/samples/client/petstore/java/resttemplate-springBoot4-jackson3/git_push.sh b/samples/client/petstore/java/resttemplate-springBoot4-jackson3/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/resttemplate-springBoot4-jackson3/git_push.sh +++ b/samples/client/petstore/java/resttemplate-springBoot4-jackson3/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/resttemplate-swagger2/git_push.sh b/samples/client/petstore/java/resttemplate-swagger2/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/resttemplate-swagger2/git_push.sh +++ b/samples/client/petstore/java/resttemplate-swagger2/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/resttemplate/git_push.sh b/samples/client/petstore/java/resttemplate/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/resttemplate/git_push.sh +++ b/samples/client/petstore/java/resttemplate/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 0f65806d8c3d..5d1a152b181d 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -169,11 +169,11 @@ protected Builder(AdditionalPropertiesClass instance) { this.instance = instance; } - public AdditionalPropertiesClass.Builder mapProperty(Map mapProperty) { + public AdditionalPropertiesClass.Builder mapProperty(.annotation.Nullable Map mapProperty) { this.instance.mapProperty = mapProperty; return this; } - public AdditionalPropertiesClass.Builder mapOfMapProperty(Map> mapOfMapProperty) { + public AdditionalPropertiesClass.Builder mapOfMapProperty(.annotation.Nullable Map> mapOfMapProperty) { this.instance.mapOfMapProperty = mapOfMapProperty; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java index 2dc96b24c019..50d847512cad 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java @@ -152,11 +152,11 @@ protected Builder(AllOfWithSingleRef instance) { this.instance = instance; } - public AllOfWithSingleRef.Builder username(String username) { + public AllOfWithSingleRef.Builder username(.annotation.Nullable String username) { this.instance.username = username; return this; } - public AllOfWithSingleRef.Builder singleRefType(SingleRefType singleRefType) { + public AllOfWithSingleRef.Builder singleRefType(.annotation.Nullable SingleRefType singleRefType) { this.instance.singleRefType = singleRefType; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Animal.java index bc426078b815..071cf0af0e43 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Animal.java @@ -164,11 +164,11 @@ protected Builder(Animal instance) { this.instance = instance; } - public Animal.Builder className(String className) { + public Animal.Builder className(.annotation.Nonnull String className) { this.instance.className = className; return this; } - public Animal.Builder color(String color) { + public Animal.Builder color(.annotation.Nullable String color) { this.instance.color = color; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index a84b55d58fb7..cc3fd4127ad0 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -130,7 +130,7 @@ protected Builder(ArrayOfArrayOfNumberOnly instance) { this.instance = instance; } - public ArrayOfArrayOfNumberOnly.Builder arrayArrayNumber(List> arrayArrayNumber) { + public ArrayOfArrayOfNumberOnly.Builder arrayArrayNumber(.annotation.Nullable List> arrayArrayNumber) { this.instance.arrayArrayNumber = arrayArrayNumber; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index 97964d91bd16..c718c52cd465 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -130,7 +130,7 @@ protected Builder(ArrayOfNumberOnly instance) { this.instance = instance; } - public ArrayOfNumberOnly.Builder arrayNumber(List arrayNumber) { + public ArrayOfNumberOnly.Builder arrayNumber(.annotation.Nullable List arrayNumber) { this.instance.arrayNumber = arrayNumber; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayTest.java index de75936524de..93abb14d4456 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -212,15 +212,15 @@ protected Builder(ArrayTest instance) { this.instance = instance; } - public ArrayTest.Builder arrayOfString(List arrayOfString) { + public ArrayTest.Builder arrayOfString(.annotation.Nullable List arrayOfString) { this.instance.arrayOfString = arrayOfString; return this; } - public ArrayTest.Builder arrayArrayOfInteger(List> arrayArrayOfInteger) { + public ArrayTest.Builder arrayArrayOfInteger(.annotation.Nullable List> arrayArrayOfInteger) { this.instance.arrayArrayOfInteger = arrayArrayOfInteger; return this; } - public ArrayTest.Builder arrayArrayOfModel(List> arrayArrayOfModel) { + public ArrayTest.Builder arrayArrayOfModel(.annotation.Nullable List> arrayArrayOfModel) { this.instance.arrayArrayOfModel = arrayArrayOfModel; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Capitalization.java index faa935b6705d..b6e4f65c4f3f 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Capitalization.java @@ -283,27 +283,27 @@ protected Builder(Capitalization instance) { this.instance = instance; } - public Capitalization.Builder smallCamel(String smallCamel) { + public Capitalization.Builder smallCamel(.annotation.Nullable String smallCamel) { this.instance.smallCamel = smallCamel; return this; } - public Capitalization.Builder capitalCamel(String capitalCamel) { + public Capitalization.Builder capitalCamel(.annotation.Nullable String capitalCamel) { this.instance.capitalCamel = capitalCamel; return this; } - public Capitalization.Builder smallSnake(String smallSnake) { + public Capitalization.Builder smallSnake(.annotation.Nullable String smallSnake) { this.instance.smallSnake = smallSnake; return this; } - public Capitalization.Builder capitalSnake(String capitalSnake) { + public Capitalization.Builder capitalSnake(.annotation.Nullable String capitalSnake) { this.instance.capitalSnake = capitalSnake; return this; } - public Capitalization.Builder scAETHFlowPoints(String scAETHFlowPoints) { + public Capitalization.Builder scAETHFlowPoints(.annotation.Nullable String scAETHFlowPoints) { this.instance.scAETHFlowPoints = scAETHFlowPoints; return this; } - public Capitalization.Builder ATT_NAME(String ATT_NAME) { + public Capitalization.Builder ATT_NAME(.annotation.Nullable String ATT_NAME) { this.instance.ATT_NAME = ATT_NAME; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Cat.java index 278d26e9e079..c3dd7fd591e1 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Cat.java @@ -145,17 +145,17 @@ protected Builder(Cat instance) { this.instance = instance; } - public Cat.Builder declawed(Boolean declawed) { + public Cat.Builder declawed(.annotation.Nullable Boolean declawed) { this.instance.declawed = declawed; return this; } - public Cat.Builder className(String className) { // inherited: true + public Cat.Builder className(.annotation.Nonnull String className) { // inherited: true super.className(className); return this; } - public Cat.Builder color(String color) { // inherited: true + public Cat.Builder color(.annotation.Nullable String color) { // inherited: true super.color(color); return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Category.java index 4dde8649ac28..88abcdf20dfc 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Category.java @@ -151,11 +151,11 @@ protected Builder(Category instance) { this.instance = instance; } - public Category.Builder id(Long id) { + public Category.Builder id(.annotation.Nullable Long id) { this.instance.id = id; return this; } - public Category.Builder name(String name) { + public Category.Builder name(.annotation.Nonnull String name) { this.instance.name = name; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ChildWithNullable.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ChildWithNullable.java index b056f8e4513a..8fb171486b6a 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ChildWithNullable.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ChildWithNullable.java @@ -157,17 +157,17 @@ protected Builder(ChildWithNullable instance) { this.instance = instance; } - public ChildWithNullable.Builder otherProperty(String otherProperty) { + public ChildWithNullable.Builder otherProperty(.annotation.Nullable String otherProperty) { this.instance.otherProperty = otherProperty; return this; } - public ChildWithNullable.Builder type(TypeEnum type) { // inherited: true + public ChildWithNullable.Builder type(.annotation.Nullable TypeEnum type) { // inherited: true super.type(type); return this; } - public ChildWithNullable.Builder nullableProperty(String nullableProperty) { // inherited: true + public ChildWithNullable.Builder nullableProperty(.annotation.Nullable String nullableProperty) { // inherited: true super.nullableProperty(nullableProperty); return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ClassModel.java index 93192f9a9183..a18529fae23d 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ClassModel.java @@ -118,7 +118,7 @@ protected Builder(ClassModel instance) { this.instance = instance; } - public ClassModel.Builder propertyClass(String propertyClass) { + public ClassModel.Builder propertyClass(.annotation.Nullable String propertyClass) { this.instance.propertyClass = propertyClass; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Client.java index b03bf4786e7b..6e32bada2a42 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Client.java @@ -118,7 +118,7 @@ protected Builder(Client instance) { this.instance = instance; } - public Client.Builder client(String client) { + public Client.Builder client(.annotation.Nullable String client) { this.instance.client = client; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/DeprecatedObject.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/DeprecatedObject.java index 831cb3b9d51b..6748d931ee44 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/DeprecatedObject.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/DeprecatedObject.java @@ -120,7 +120,7 @@ protected Builder(DeprecatedObject instance) { this.instance = instance; } - public DeprecatedObject.Builder name(String name) { + public DeprecatedObject.Builder name(.annotation.Nullable String name) { this.instance.name = name; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Dog.java index fa93dc88078d..5a87a5f719a8 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Dog.java @@ -145,17 +145,17 @@ protected Builder(Dog instance) { this.instance = instance; } - public Dog.Builder breed(String breed) { + public Dog.Builder breed(.annotation.Nullable String breed) { this.instance.breed = breed; return this; } - public Dog.Builder className(String className) { // inherited: true + public Dog.Builder className(.annotation.Nonnull String className) { // inherited: true super.className(className); return this; } - public Dog.Builder color(String color) { // inherited: true + public Dog.Builder color(.annotation.Nullable String color) { // inherited: true super.color(color); return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumArrays.java index 2893ccf2b399..cd9758fc99ab 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -232,11 +232,11 @@ protected Builder(EnumArrays instance) { this.instance = instance; } - public EnumArrays.Builder justSymbol(JustSymbolEnum justSymbol) { + public EnumArrays.Builder justSymbol(.annotation.Nullable JustSymbolEnum justSymbol) { this.instance.justSymbol = justSymbol; return this; } - public EnumArrays.Builder arrayEnum(List arrayEnum) { + public EnumArrays.Builder arrayEnum(.annotation.Nullable List arrayEnum) { this.instance.arrayEnum = arrayEnum; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumTest.java index 25f047074e34..4e65a8796762 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumTest.java @@ -521,23 +521,23 @@ protected Builder(EnumTest instance) { this.instance = instance; } - public EnumTest.Builder enumString(EnumStringEnum enumString) { + public EnumTest.Builder enumString(.annotation.Nullable EnumStringEnum enumString) { this.instance.enumString = enumString; return this; } - public EnumTest.Builder enumStringRequired(EnumStringRequiredEnum enumStringRequired) { + public EnumTest.Builder enumStringRequired(.annotation.Nonnull EnumStringRequiredEnum enumStringRequired) { this.instance.enumStringRequired = enumStringRequired; return this; } - public EnumTest.Builder enumInteger(EnumIntegerEnum enumInteger) { + public EnumTest.Builder enumInteger(.annotation.Nullable EnumIntegerEnum enumInteger) { this.instance.enumInteger = enumInteger; return this; } - public EnumTest.Builder enumNumber(EnumNumberEnum enumNumber) { + public EnumTest.Builder enumNumber(.annotation.Nullable EnumNumberEnum enumNumber) { this.instance.enumNumber = enumNumber; return this; } - public EnumTest.Builder outerEnum(OuterEnum outerEnum) { + public EnumTest.Builder outerEnum(.annotation.Nullable OuterEnum outerEnum) { this.instance.outerEnum = JsonNullable.of(outerEnum); return this; } @@ -545,15 +545,15 @@ public EnumTest.Builder outerEnum(JsonNullable outerEnum) { this.instance.outerEnum = outerEnum; return this; } - public EnumTest.Builder outerEnumInteger(OuterEnumInteger outerEnumInteger) { + public EnumTest.Builder outerEnumInteger(.annotation.Nullable OuterEnumInteger outerEnumInteger) { this.instance.outerEnumInteger = outerEnumInteger; return this; } - public EnumTest.Builder outerEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) { + public EnumTest.Builder outerEnumDefaultValue(.annotation.Nullable OuterEnumDefaultValue outerEnumDefaultValue) { this.instance.outerEnumDefaultValue = outerEnumDefaultValue; return this; } - public EnumTest.Builder outerEnumIntegerDefaultValue(OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) { + public EnumTest.Builder outerEnumIntegerDefaultValue(.annotation.Nullable OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) { this.instance.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java index eba73f33be81..4a4785724749 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java @@ -163,11 +163,11 @@ protected Builder(FakeBigDecimalMap200Response instance) { this.instance = instance; } - public FakeBigDecimalMap200Response.Builder someId(BigDecimal someId) { + public FakeBigDecimalMap200Response.Builder someId(.annotation.Nullable BigDecimal someId) { this.instance.someId = someId; return this; } - public FakeBigDecimalMap200Response.Builder someMap(Map someMap) { + public FakeBigDecimalMap200Response.Builder someMap(.annotation.Nullable Map someMap) { this.instance.someMap = someMap; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 3d1a8e5740c3..112ae4d5dbc4 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -163,11 +163,11 @@ protected Builder(FileSchemaTestClass instance) { this.instance = instance; } - public FileSchemaTestClass.Builder _file(ModelFile _file) { + public FileSchemaTestClass.Builder _file(.annotation.Nullable ModelFile _file) { this.instance._file = _file; return this; } - public FileSchemaTestClass.Builder files(List files) { + public FileSchemaTestClass.Builder files(.annotation.Nullable List files) { this.instance.files = files; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Foo.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Foo.java index 9f4b2e91c61e..dac480a051cf 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Foo.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Foo.java @@ -118,7 +118,7 @@ protected Builder(Foo instance) { this.instance = instance; } - public Foo.Builder bar(String bar) { + public Foo.Builder bar(.annotation.Nullable String bar) { this.instance.bar = bar; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java index 13d7b413442d..b6eafbb28bdb 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java @@ -120,7 +120,7 @@ protected Builder(FooGetDefaultResponse instance) { this.instance = instance; } - public FooGetDefaultResponse.Builder string(Foo string) { + public FooGetDefaultResponse.Builder string(.annotation.Nullable Foo string) { this.instance.string = string; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FormatTest.java index fa88652ee1e4..daebe3165087 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FormatTest.java @@ -629,67 +629,67 @@ protected Builder(FormatTest instance) { this.instance = instance; } - public FormatTest.Builder integer(Integer integer) { + public FormatTest.Builder integer(.annotation.Nullable Integer integer) { this.instance.integer = integer; return this; } - public FormatTest.Builder int32(Integer int32) { + public FormatTest.Builder int32(.annotation.Nullable Integer int32) { this.instance.int32 = int32; return this; } - public FormatTest.Builder int64(Long int64) { + public FormatTest.Builder int64(.annotation.Nullable Long int64) { this.instance.int64 = int64; return this; } - public FormatTest.Builder number(BigDecimal number) { + public FormatTest.Builder number(.annotation.Nonnull BigDecimal number) { this.instance.number = number; return this; } - public FormatTest.Builder _float(Float _float) { + public FormatTest.Builder _float(.annotation.Nullable Float _float) { this.instance._float = _float; return this; } - public FormatTest.Builder _double(Double _double) { + public FormatTest.Builder _double(.annotation.Nullable Double _double) { this.instance._double = _double; return this; } - public FormatTest.Builder decimal(BigDecimal decimal) { + public FormatTest.Builder decimal(.annotation.Nullable BigDecimal decimal) { this.instance.decimal = decimal; return this; } - public FormatTest.Builder string(String string) { + public FormatTest.Builder string(.annotation.Nullable String string) { this.instance.string = string; return this; } - public FormatTest.Builder _byte(byte[] _byte) { + public FormatTest.Builder _byte(.annotation.Nonnull byte[] _byte) { this.instance._byte = _byte; return this; } - public FormatTest.Builder binary(File binary) { + public FormatTest.Builder binary(.annotation.Nullable File binary) { this.instance.binary = binary; return this; } - public FormatTest.Builder date(LocalDate date) { + public FormatTest.Builder date(.annotation.Nonnull LocalDate date) { this.instance.date = date; return this; } - public FormatTest.Builder dateTime(OffsetDateTime dateTime) { + public FormatTest.Builder dateTime(.annotation.Nullable OffsetDateTime dateTime) { this.instance.dateTime = dateTime; return this; } - public FormatTest.Builder uuid(UUID uuid) { + public FormatTest.Builder uuid(.annotation.Nullable UUID uuid) { this.instance.uuid = uuid; return this; } - public FormatTest.Builder password(String password) { + public FormatTest.Builder password(.annotation.Nonnull String password) { this.instance.password = password; return this; } - public FormatTest.Builder patternWithDigits(String patternWithDigits) { + public FormatTest.Builder patternWithDigits(.annotation.Nullable String patternWithDigits) { this.instance.patternWithDigits = patternWithDigits; return this; } - public FormatTest.Builder patternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) { + public FormatTest.Builder patternWithDigitsAndDelimiter(.annotation.Nullable String patternWithDigitsAndDelimiter) { this.instance.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index a653e468a719..65f72986f4f3 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -134,11 +134,11 @@ protected Builder(HasOnlyReadOnly instance) { this.instance = instance; } - public HasOnlyReadOnly.Builder bar(String bar) { + public HasOnlyReadOnly.Builder bar(.annotation.Nullable String bar) { this.instance.bar = bar; return this; } - public HasOnlyReadOnly.Builder foo(String foo) { + public HasOnlyReadOnly.Builder foo(.annotation.Nullable String foo) { this.instance.foo = foo; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/HealthCheckResult.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/HealthCheckResult.java index dd17123eac3f..13071b660e4a 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/HealthCheckResult.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/HealthCheckResult.java @@ -141,7 +141,7 @@ protected Builder(HealthCheckResult instance) { this.instance = instance; } - public HealthCheckResult.Builder nullableMessage(String nullableMessage) { + public HealthCheckResult.Builder nullableMessage(.annotation.Nullable String nullableMessage) { this.instance.nullableMessage = JsonNullable.of(nullableMessage); return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/MapTest.java index 1eea6e308972..ad867704788a 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/MapTest.java @@ -286,19 +286,19 @@ protected Builder(MapTest instance) { this.instance = instance; } - public MapTest.Builder mapMapOfString(Map> mapMapOfString) { + public MapTest.Builder mapMapOfString(.annotation.Nullable Map> mapMapOfString) { this.instance.mapMapOfString = mapMapOfString; return this; } - public MapTest.Builder mapOfEnumString(Map mapOfEnumString) { + public MapTest.Builder mapOfEnumString(.annotation.Nullable Map mapOfEnumString) { this.instance.mapOfEnumString = mapOfEnumString; return this; } - public MapTest.Builder directMap(Map directMap) { + public MapTest.Builder directMap(.annotation.Nullable Map directMap) { this.instance.directMap = directMap; return this; } - public MapTest.Builder indirectMap(Map indirectMap) { + public MapTest.Builder indirectMap(.annotation.Nullable Map indirectMap) { this.instance.indirectMap = indirectMap; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 2fe879d645f6..5013de30d3e2 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -197,15 +197,15 @@ protected Builder(MixedPropertiesAndAdditionalPropertiesClass instance) { this.instance = instance; } - public MixedPropertiesAndAdditionalPropertiesClass.Builder uuid(UUID uuid) { + public MixedPropertiesAndAdditionalPropertiesClass.Builder uuid(.annotation.Nullable UUID uuid) { this.instance.uuid = uuid; return this; } - public MixedPropertiesAndAdditionalPropertiesClass.Builder dateTime(OffsetDateTime dateTime) { + public MixedPropertiesAndAdditionalPropertiesClass.Builder dateTime(.annotation.Nullable OffsetDateTime dateTime) { this.instance.dateTime = dateTime; return this; } - public MixedPropertiesAndAdditionalPropertiesClass.Builder map(Map map) { + public MixedPropertiesAndAdditionalPropertiesClass.Builder map(.annotation.Nullable Map map) { this.instance.map = map; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Model200Response.java index cf1e7cb7ffa4..9db5f6fd2585 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Model200Response.java @@ -152,11 +152,11 @@ protected Builder(Model200Response instance) { this.instance = instance; } - public Model200Response.Builder name(Integer name) { + public Model200Response.Builder name(.annotation.Nullable Integer name) { this.instance.name = name; return this; } - public Model200Response.Builder propertyClass(String propertyClass) { + public Model200Response.Builder propertyClass(.annotation.Nullable String propertyClass) { this.instance.propertyClass = propertyClass; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 617f4a76d42d..2bf29f1b8aaf 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -185,15 +185,15 @@ protected Builder(ModelApiResponse instance) { this.instance = instance; } - public ModelApiResponse.Builder code(Integer code) { + public ModelApiResponse.Builder code(.annotation.Nullable Integer code) { this.instance.code = code; return this; } - public ModelApiResponse.Builder type(String type) { + public ModelApiResponse.Builder type(.annotation.Nullable String type) { this.instance.type = type; return this; } - public ModelApiResponse.Builder message(String message) { + public ModelApiResponse.Builder message(.annotation.Nullable String message) { this.instance.message = message; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelFile.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelFile.java index 90dbe3ef32de..5d60492d1ddc 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelFile.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelFile.java @@ -119,7 +119,7 @@ protected Builder(ModelFile instance) { this.instance = instance; } - public ModelFile.Builder sourceURI(String sourceURI) { + public ModelFile.Builder sourceURI(.annotation.Nullable String sourceURI) { this.instance.sourceURI = sourceURI; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelList.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelList.java index f6391ab22c8e..a435cfd4cda2 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelList.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelList.java @@ -119,7 +119,7 @@ protected Builder(ModelList instance) { this.instance = instance; } - public ModelList.Builder _123list(String _123list) { + public ModelList.Builder _123list(.annotation.Nullable String _123list) { this.instance._123list = _123list; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelReturn.java index 30ad3b06a933..d8d11febd626 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -119,7 +119,7 @@ protected Builder(ModelReturn instance) { this.instance = instance; } - public ModelReturn.Builder _return(Integer _return) { + public ModelReturn.Builder _return(.annotation.Nullable Integer _return) { this.instance._return = _return; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Name.java index 946cd9c9e73b..b57fd1808fab 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Name.java @@ -207,19 +207,19 @@ protected Builder(Name instance) { this.instance = instance; } - public Name.Builder name(Integer name) { + public Name.Builder name(.annotation.Nonnull Integer name) { this.instance.name = name; return this; } - public Name.Builder snakeCase(Integer snakeCase) { + public Name.Builder snakeCase(.annotation.Nullable Integer snakeCase) { this.instance.snakeCase = snakeCase; return this; } - public Name.Builder property(String property) { + public Name.Builder property(.annotation.Nullable String property) { this.instance.property = property; return this; } - public Name.Builder _123number(Integer _123number) { + public Name.Builder _123number(.annotation.Nullable Integer _123number) { this.instance._123number = _123number; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/NullableClass.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/NullableClass.java index 1dfe7ed13186..8732abf49871 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/NullableClass.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/NullableClass.java @@ -697,7 +697,7 @@ protected Builder(NullableClass instance) { this.instance = instance; } - public NullableClass.Builder integerProp(Integer integerProp) { + public NullableClass.Builder integerProp(.annotation.Nullable Integer integerProp) { this.instance.integerProp = JsonNullable.of(integerProp); return this; } @@ -705,7 +705,7 @@ public NullableClass.Builder integerProp(JsonNullable integerProp) { this.instance.integerProp = integerProp; return this; } - public NullableClass.Builder numberProp(BigDecimal numberProp) { + public NullableClass.Builder numberProp(.annotation.Nullable BigDecimal numberProp) { this.instance.numberProp = JsonNullable.of(numberProp); return this; } @@ -713,7 +713,7 @@ public NullableClass.Builder numberProp(JsonNullable numberProp) { this.instance.numberProp = numberProp; return this; } - public NullableClass.Builder booleanProp(Boolean booleanProp) { + public NullableClass.Builder booleanProp(.annotation.Nullable Boolean booleanProp) { this.instance.booleanProp = JsonNullable.of(booleanProp); return this; } @@ -721,7 +721,7 @@ public NullableClass.Builder booleanProp(JsonNullable booleanProp) { this.instance.booleanProp = booleanProp; return this; } - public NullableClass.Builder stringProp(String stringProp) { + public NullableClass.Builder stringProp(.annotation.Nullable String stringProp) { this.instance.stringProp = JsonNullable.of(stringProp); return this; } @@ -729,7 +729,7 @@ public NullableClass.Builder stringProp(JsonNullable stringProp) { this.instance.stringProp = stringProp; return this; } - public NullableClass.Builder dateProp(LocalDate dateProp) { + public NullableClass.Builder dateProp(.annotation.Nullable LocalDate dateProp) { this.instance.dateProp = JsonNullable.of(dateProp); return this; } @@ -737,7 +737,7 @@ public NullableClass.Builder dateProp(JsonNullable dateProp) { this.instance.dateProp = dateProp; return this; } - public NullableClass.Builder datetimeProp(OffsetDateTime datetimeProp) { + public NullableClass.Builder datetimeProp(.annotation.Nullable OffsetDateTime datetimeProp) { this.instance.datetimeProp = JsonNullable.of(datetimeProp); return this; } @@ -745,7 +745,7 @@ public NullableClass.Builder datetimeProp(JsonNullable datetimeP this.instance.datetimeProp = datetimeProp; return this; } - public NullableClass.Builder arrayNullableProp(List arrayNullableProp) { + public NullableClass.Builder arrayNullableProp(.annotation.Nullable List arrayNullableProp) { this.instance.arrayNullableProp = JsonNullable.>of(arrayNullableProp); return this; } @@ -753,7 +753,7 @@ public NullableClass.Builder arrayNullableProp(JsonNullable> arrayN this.instance.arrayNullableProp = arrayNullableProp; return this; } - public NullableClass.Builder arrayAndItemsNullableProp(List arrayAndItemsNullableProp) { + public NullableClass.Builder arrayAndItemsNullableProp(.annotation.Nullable List arrayAndItemsNullableProp) { this.instance.arrayAndItemsNullableProp = JsonNullable.>of(arrayAndItemsNullableProp); return this; } @@ -761,11 +761,11 @@ public NullableClass.Builder arrayAndItemsNullableProp(JsonNullable this.instance.arrayAndItemsNullableProp = arrayAndItemsNullableProp; return this; } - public NullableClass.Builder arrayItemsNullable(List arrayItemsNullable) { + public NullableClass.Builder arrayItemsNullable(.annotation.Nullable List arrayItemsNullable) { this.instance.arrayItemsNullable = arrayItemsNullable; return this; } - public NullableClass.Builder objectNullableProp(Map objectNullableProp) { + public NullableClass.Builder objectNullableProp(.annotation.Nullable Map objectNullableProp) { this.instance.objectNullableProp = JsonNullable.>of(objectNullableProp); return this; } @@ -773,7 +773,7 @@ public NullableClass.Builder objectNullableProp(JsonNullable this.instance.objectNullableProp = objectNullableProp; return this; } - public NullableClass.Builder objectAndItemsNullableProp(Map objectAndItemsNullableProp) { + public NullableClass.Builder objectAndItemsNullableProp(.annotation.Nullable Map objectAndItemsNullableProp) { this.instance.objectAndItemsNullableProp = JsonNullable.>of(objectAndItemsNullableProp); return this; } @@ -781,7 +781,7 @@ public NullableClass.Builder objectAndItemsNullableProp(JsonNullable objectItemsNullable) { + public NullableClass.Builder objectItemsNullable(.annotation.Nullable Map objectItemsNullable) { this.instance.objectItemsNullable = objectItemsNullable; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/NumberOnly.java index 43ef5188ca1a..360a46048e09 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -119,7 +119,7 @@ protected Builder(NumberOnly instance) { this.instance = instance; } - public NumberOnly.Builder justNumber(BigDecimal justNumber) { + public NumberOnly.Builder justNumber(.annotation.Nullable BigDecimal justNumber) { this.instance.justNumber = justNumber; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java index 89efce0ec410..3d60a2eb82c4 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java @@ -236,19 +236,19 @@ protected Builder(ObjectWithDeprecatedFields instance) { this.instance = instance; } - public ObjectWithDeprecatedFields.Builder uuid(String uuid) { + public ObjectWithDeprecatedFields.Builder uuid(.annotation.Nullable String uuid) { this.instance.uuid = uuid; return this; } - public ObjectWithDeprecatedFields.Builder id(BigDecimal id) { + public ObjectWithDeprecatedFields.Builder id(.annotation.Nullable BigDecimal id) { this.instance.id = id; return this; } - public ObjectWithDeprecatedFields.Builder deprecatedRef(DeprecatedObject deprecatedRef) { + public ObjectWithDeprecatedFields.Builder deprecatedRef(.annotation.Nullable DeprecatedObject deprecatedRef) { this.instance.deprecatedRef = deprecatedRef; return this; } - public ObjectWithDeprecatedFields.Builder bars(List bars) { + public ObjectWithDeprecatedFields.Builder bars(.annotation.Nullable List bars) { this.instance.bars = bars; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Order.java index 82d9b4836612..ff098f5316c6 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Order.java @@ -321,27 +321,27 @@ protected Builder(Order instance) { this.instance = instance; } - public Order.Builder id(Long id) { + public Order.Builder id(.annotation.Nullable Long id) { this.instance.id = id; return this; } - public Order.Builder petId(Long petId) { + public Order.Builder petId(.annotation.Nullable Long petId) { this.instance.petId = petId; return this; } - public Order.Builder quantity(Integer quantity) { + public Order.Builder quantity(.annotation.Nullable Integer quantity) { this.instance.quantity = quantity; return this; } - public Order.Builder shipDate(OffsetDateTime shipDate) { + public Order.Builder shipDate(.annotation.Nullable OffsetDateTime shipDate) { this.instance.shipDate = shipDate; return this; } - public Order.Builder status(StatusEnum status) { + public Order.Builder status(.annotation.Nullable StatusEnum status) { this.instance.status = status; return this; } - public Order.Builder complete(Boolean complete) { + public Order.Builder complete(.annotation.Nullable Boolean complete) { this.instance.complete = complete; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterComposite.java index d3a84eef904d..d9bf311f48a3 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -185,15 +185,15 @@ protected Builder(OuterComposite instance) { this.instance = instance; } - public OuterComposite.Builder myNumber(BigDecimal myNumber) { + public OuterComposite.Builder myNumber(.annotation.Nullable BigDecimal myNumber) { this.instance.myNumber = myNumber; return this; } - public OuterComposite.Builder myString(String myString) { + public OuterComposite.Builder myString(.annotation.Nullable String myString) { this.instance.myString = myString; return this; } - public OuterComposite.Builder myBoolean(Boolean myBoolean) { + public OuterComposite.Builder myBoolean(.annotation.Nullable Boolean myBoolean) { this.instance.myBoolean = myBoolean; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java index 43543ddf8ae6..22aeb1b7b14d 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java @@ -119,7 +119,7 @@ protected Builder(OuterObjectWithEnumProperty instance) { this.instance = instance; } - public OuterObjectWithEnumProperty.Builder value(OuterEnumInteger value) { + public OuterObjectWithEnumProperty.Builder value(.annotation.Nonnull OuterEnumInteger value) { this.instance.value = value; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ParentWithNullable.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ParentWithNullable.java index b65eaddab496..31aff58da34f 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ParentWithNullable.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ParentWithNullable.java @@ -219,11 +219,11 @@ protected Builder(ParentWithNullable instance) { this.instance = instance; } - public ParentWithNullable.Builder type(TypeEnum type) { + public ParentWithNullable.Builder type(.annotation.Nullable TypeEnum type) { this.instance.type = type; return this; } - public ParentWithNullable.Builder nullableProperty(String nullableProperty) { + public ParentWithNullable.Builder nullableProperty(.annotation.Nullable String nullableProperty) { this.instance.nullableProperty = JsonNullable.of(nullableProperty); return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Pet.java index 751b311efbc0..4840104bcb33 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Pet.java @@ -345,27 +345,27 @@ protected Builder(Pet instance) { this.instance = instance; } - public Pet.Builder id(Long id) { + public Pet.Builder id(.annotation.Nullable Long id) { this.instance.id = id; return this; } - public Pet.Builder category(Category category) { + public Pet.Builder category(.annotation.Nullable Category category) { this.instance.category = category; return this; } - public Pet.Builder name(String name) { + public Pet.Builder name(.annotation.Nonnull String name) { this.instance.name = name; return this; } - public Pet.Builder photoUrls(Set photoUrls) { + public Pet.Builder photoUrls(.annotation.Nonnull Set photoUrls) { this.instance.photoUrls = photoUrls; return this; } - public Pet.Builder tags(List tags) { + public Pet.Builder tags(.annotation.Nullable List tags) { this.instance.tags = tags; return this; } - public Pet.Builder status(StatusEnum status) { + public Pet.Builder status(.annotation.Nullable StatusEnum status) { this.instance.status = status; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index 95bd3f297768..11a2c9f76076 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -150,11 +150,11 @@ protected Builder(ReadOnlyFirst instance) { this.instance = instance; } - public ReadOnlyFirst.Builder bar(String bar) { + public ReadOnlyFirst.Builder bar(.annotation.Nullable String bar) { this.instance.bar = bar; return this; } - public ReadOnlyFirst.Builder baz(String baz) { + public ReadOnlyFirst.Builder baz(.annotation.Nullable String baz) { this.instance.baz = baz; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/SpecialModelName.java index cc3bf2274e87..befac3502b08 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -119,7 +119,7 @@ protected Builder(SpecialModelName instance) { this.instance = instance; } - public SpecialModelName.Builder $specialPropertyName(Long $specialPropertyName) { + public SpecialModelName.Builder $specialPropertyName(.annotation.Nullable Long $specialPropertyName) { this.instance.$specialPropertyName = $specialPropertyName; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Tag.java index 9255abc312b6..b7c3951c22ae 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Tag.java @@ -151,11 +151,11 @@ protected Builder(Tag instance) { this.instance = instance; } - public Tag.Builder id(Long id) { + public Tag.Builder id(.annotation.Nullable Long id) { this.instance.id = id; return this; } - public Tag.Builder name(String name) { + public Tag.Builder name(.annotation.Nullable String name) { this.instance.name = name; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java index 5ca65c138163..90a0d191e345 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java @@ -168,7 +168,7 @@ protected Builder(TestInlineFreeformAdditionalPropertiesRequest instance) { this.instance = instance; } - public TestInlineFreeformAdditionalPropertiesRequest.Builder someProperty(String someProperty) { + public TestInlineFreeformAdditionalPropertiesRequest.Builder someProperty(.annotation.Nullable String someProperty) { this.instance.someProperty = someProperty; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/User.java index 41846ea56d4c..29511a2c8e25 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/User.java @@ -349,35 +349,35 @@ protected Builder(User instance) { this.instance = instance; } - public User.Builder id(Long id) { + public User.Builder id(.annotation.Nullable Long id) { this.instance.id = id; return this; } - public User.Builder username(String username) { + public User.Builder username(.annotation.Nullable String username) { this.instance.username = username; return this; } - public User.Builder firstName(String firstName) { + public User.Builder firstName(.annotation.Nullable String firstName) { this.instance.firstName = firstName; return this; } - public User.Builder lastName(String lastName) { + public User.Builder lastName(.annotation.Nullable String lastName) { this.instance.lastName = lastName; return this; } - public User.Builder email(String email) { + public User.Builder email(.annotation.Nullable String email) { this.instance.email = email; return this; } - public User.Builder password(String password) { + public User.Builder password(.annotation.Nullable String password) { this.instance.password = password; return this; } - public User.Builder phone(String phone) { + public User.Builder phone(.annotation.Nullable String phone) { this.instance.phone = phone; return this; } - public User.Builder userStatus(Integer userStatus) { + public User.Builder userStatus(.annotation.Nullable Integer userStatus) { this.instance.userStatus = userStatus; return this; } diff --git a/samples/client/petstore/java/retrofit2-play26/git_push.sh b/samples/client/petstore/java/retrofit2-play26/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/retrofit2-play26/git_push.sh +++ b/samples/client/petstore/java/retrofit2-play26/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/retrofit2/git_push.sh b/samples/client/petstore/java/retrofit2/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/retrofit2/git_push.sh +++ b/samples/client/petstore/java/retrofit2/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/retrofit2rx3/git_push.sh b/samples/client/petstore/java/retrofit2rx3/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/retrofit2rx3/git_push.sh +++ b/samples/client/petstore/java/retrofit2rx3/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/vertx-no-nullable/git_push.sh b/samples/client/petstore/java/vertx-no-nullable/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/vertx-no-nullable/git_push.sh +++ b/samples/client/petstore/java/vertx-no-nullable/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/vertx-supportVertxFuture/git_push.sh b/samples/client/petstore/java/vertx-supportVertxFuture/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/vertx-supportVertxFuture/git_push.sh +++ b/samples/client/petstore/java/vertx-supportVertxFuture/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/vertx/git_push.sh b/samples/client/petstore/java/vertx/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/vertx/git_push.sh +++ b/samples/client/petstore/java/vertx/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/vertx5-supportVertxFuture/git_push.sh b/samples/client/petstore/java/vertx5-supportVertxFuture/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/vertx5-supportVertxFuture/git_push.sh +++ b/samples/client/petstore/java/vertx5-supportVertxFuture/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/vertx5/git_push.sh b/samples/client/petstore/java/vertx5/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/vertx5/git_push.sh +++ b/samples/client/petstore/java/vertx5/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/webclient-jakarta/git_push.sh b/samples/client/petstore/java/webclient-jakarta/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/webclient-jakarta/git_push.sh +++ b/samples/client/petstore/java/webclient-jakarta/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/webclient-nullable-arrays/git_push.sh b/samples/client/petstore/java/webclient-nullable-arrays/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/webclient-nullable-arrays/git_push.sh +++ b/samples/client/petstore/java/webclient-nullable-arrays/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/webclient-springBoot4-jackson3-jspecify/git_push.sh b/samples/client/petstore/java/webclient-springBoot4-jackson3-jspecify/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/webclient-springBoot4-jackson3-jspecify/git_push.sh +++ b/samples/client/petstore/java/webclient-springBoot4-jackson3-jspecify/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/webclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/FileContent.java b/samples/client/petstore/java/webclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/FileContent.java index f93380d95eac..be515019c1b1 100644 --- a/samples/client/petstore/java/webclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/FileContent.java +++ b/samples/client/petstore/java/webclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/FileContent.java @@ -194,11 +194,11 @@ public FileContent.Builder name(String name) { this.instance.name = name; return this; } - public FileContent.Builder size(@Nullable Integer size) { + public FileContent.Builder size(Integer size) { this.instance.size = size; return this; } - public FileContent.Builder virusScan(@Nullable VirusScanEnum virusScan) { + public FileContent.Builder virusScan(VirusScanEnum virusScan) { this.instance.virusScan = virusScan; return this; } diff --git a/samples/client/petstore/java/webclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/Foo.java b/samples/client/petstore/java/webclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/Foo.java index 7157e7d7261d..85505efe219b 100644 --- a/samples/client/petstore/java/webclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/Foo.java +++ b/samples/client/petstore/java/webclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/Foo.java @@ -543,31 +543,31 @@ protected Builder(Foo instance) { this.instance = instance; } - public Foo.Builder dt(java.time.@Nullable Instant dt) { + public Foo.Builder dt(java.time.Instant dt) { this.instance.dt = dt; return this; } - public Foo.Builder nullableDt(java.time.@Nullable Instant nullableDt) { + public Foo.Builder nullableDt(java.time.Instant nullableDt) { this.instance.nullableDt = nullableDt; return this; } - public Foo.Builder binary(@Nullable File binary) { + public Foo.Builder binary(File binary) { this.instance.binary = binary; return this; } - public Foo.Builder nullableBinary(@Nullable File nullableBinary) { + public Foo.Builder nullableBinary(File nullableBinary) { this.instance.nullableBinary = nullableBinary; return this; } - public Foo.Builder listOfDt(@Nullable List listOfDt) { + public Foo.Builder listOfDt(List listOfDt) { this.instance.listOfDt = listOfDt; return this; } - public Foo.Builder listMinIntems(@Nullable List listMinIntems) { + public Foo.Builder listMinIntems(List listMinIntems) { this.instance.listMinIntems = listMinIntems; return this; } - public Foo.Builder nullableListMinIntems(@Nullable List nullableListMinIntems) { + public Foo.Builder nullableListMinIntems(List nullableListMinIntems) { this.instance.nullableListMinIntems = nullableListMinIntems; return this; } @@ -575,15 +575,15 @@ public Foo.Builder requiredDt(java.time.Instant requiredDt) { this.instance.requiredDt = requiredDt; return this; } - public Foo.Builder number(java.math.@Nullable BigDecimal number) { + public Foo.Builder number(java.math.BigDecimal number) { this.instance.number = number; return this; } - public Foo.Builder nullableNumber(java.math.@Nullable BigDecimal nullableNumber) { + public Foo.Builder nullableNumber(java.math.BigDecimal nullableNumber) { this.instance.nullableNumber = nullableNumber; return this; } - public Foo.Builder color(@Nullable String color) { + public Foo.Builder color(String color) { this.instance.color = color; return this; } @@ -591,7 +591,7 @@ public Foo.Builder requiredColor(String requiredColor) { this.instance.requiredColor = requiredColor; return this; } - public Foo.Builder nullableColor(@Nullable String nullableColor) { + public Foo.Builder nullableColor(String nullableColor) { this.instance.nullableColor = nullableColor; return this; } diff --git a/samples/client/petstore/java/webclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/RequiredAndNullable.java b/samples/client/petstore/java/webclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/RequiredAndNullable.java index 9c18ec5777e1..0f084bc5aea1 100644 --- a/samples/client/petstore/java/webclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/RequiredAndNullable.java +++ b/samples/client/petstore/java/webclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/RequiredAndNullable.java @@ -261,15 +261,15 @@ protected Builder(RequiredAndNullable instance) { this.instance = instance; } - public RequiredAndNullable.Builder str(@Nullable String str) { + public RequiredAndNullable.Builder str(String str) { this.instance.str = str; return this; } - public RequiredAndNullable.Builder _file(@Nullable File _file) { + public RequiredAndNullable.Builder _file(File _file) { this.instance._file = _file; return this; } - public RequiredAndNullable.Builder color(@Nullable String color) { + public RequiredAndNullable.Builder color(String color) { this.instance.color = color; return this; } @@ -277,7 +277,7 @@ public RequiredAndNullable.Builder onlyRequired(String onlyRequired) { this.instance.onlyRequired = onlyRequired; return this; } - public RequiredAndNullable.Builder _list(@Nullable List _list) { + public RequiredAndNullable.Builder _list(List _list) { this.instance._list = _list; return this; } diff --git a/samples/client/petstore/java/webclient-springBoot4-jackson3/git_push.sh b/samples/client/petstore/java/webclient-springBoot4-jackson3/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/webclient-springBoot4-jackson3/git_push.sh +++ b/samples/client/petstore/java/webclient-springBoot4-jackson3/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/webclient-swagger2/git_push.sh b/samples/client/petstore/java/webclient-swagger2/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/webclient-swagger2/git_push.sh +++ b/samples/client/petstore/java/webclient-swagger2/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/webclient-useSingleRequestParameter/git_push.sh b/samples/client/petstore/java/webclient-useSingleRequestParameter/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/webclient-useSingleRequestParameter/git_push.sh +++ b/samples/client/petstore/java/webclient-useSingleRequestParameter/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/java/webclient/git_push.sh b/samples/client/petstore/java/webclient/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/java/webclient/git_push.sh +++ b/samples/client/petstore/java/webclient/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/javascript-apollo/git_push.sh b/samples/client/petstore/javascript-apollo/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/javascript-apollo/git_push.sh +++ b/samples/client/petstore/javascript-apollo/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/javascript-es6/git_push.sh b/samples/client/petstore/javascript-es6/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/javascript-es6/git_push.sh +++ b/samples/client/petstore/javascript-es6/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/javascript-promise-es6/git_push.sh b/samples/client/petstore/javascript-promise-es6/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/client/petstore/javascript-promise-es6/git_push.sh +++ b/samples/client/petstore/javascript-promise-es6/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/client/petstore/kotlin-explicit/src/main/kotlin/org/openapitools/client/models/Tag.kt b/samples/client/petstore/kotlin-explicit/src/main/kotlin/org/openapitools/client/models/Tag.kt index 843047a1b08e..e69de29bb2d1 100644 --- a/samples/client/petstore/kotlin-explicit/src/main/kotlin/org/openapitools/client/models/Tag.kt +++ b/samples/client/petstore/kotlin-explicit/src/main/kotlin/org/openapitools/client/models/Tag.kt @@ -1,50 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "DuplicatedCode", - "EnumEntryName", - "RemoveRedundantQualifierName", - "RemoveRedundantCallsOfConversionMethods", - "REDUNDANT_CALL_OF_CONVERSION_METHOD", - "RedundantUnitReturnType", - "RemoveEmptyClassBody", - "UnnecessaryVariable", - "UnusedImport", - "UnnecessaryVariable", - "unused" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * A tag for a pet - * - * @param id - * @param name - */ - - -public data class Tag ( - - @Json(name = "id") - val id: kotlin.Long? = null, - - @Json(name = "name") - val name: kotlin.String? = null - -) { - - -} - diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/git_push.sh b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/git_push.sh +++ b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/git_push.sh b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/git_push.sh +++ b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/openapi3/client/petstore/dart-dio/anyof/lib/src/api_util.dart b/samples/openapi3/client/petstore/dart-dio/anyof/lib/src/api_util.dart index ed3bb12f25b8..2332266910e5 100644 --- a/samples/openapi3/client/petstore/dart-dio/anyof/lib/src/api_util.dart +++ b/samples/openapi3/client/petstore/dart-dio/anyof/lib/src/api_util.dart @@ -38,7 +38,7 @@ dynamic encodeQueryParameter( FullType type, ) { if (value == null) { - return ''; + return null; } if (value is String || value is num || value is bool) { return value; @@ -52,7 +52,7 @@ dynamic encodeQueryParameter( specifiedType: type, ); if (serialized == null) { - return ''; + return null; } if (serialized is String) { return serialized; @@ -60,18 +60,29 @@ dynamic encodeQueryParameter( return serialized; } -ListParam encodeCollectionQueryParameter( +ListParam? encodeCollectionQueryParameter( Serializers serializers, dynamic value, FullType type, { ListFormat format = ListFormat.multi, }) { + if (value == null) { + return null; + } final serialized = serializers.serialize( value as Object, specifiedType: type, ); + if (serialized == null) { + return null; + } if (value is BuiltList || value is BuiltSet) { return ListParam(List.of((serialized as Iterable).cast()), format); } throw ArgumentError('Invalid value passed to encodeCollectionQueryParameter'); } + +void removeNullQueryParameters(Map queryParameters) { + queryParameters.removeWhere((_, value) => value == null); +} + diff --git a/samples/openapi3/client/petstore/dart-dio/oneof/lib/src/api_util.dart b/samples/openapi3/client/petstore/dart-dio/oneof/lib/src/api_util.dart index ed3bb12f25b8..2332266910e5 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof/lib/src/api_util.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof/lib/src/api_util.dart @@ -38,7 +38,7 @@ dynamic encodeQueryParameter( FullType type, ) { if (value == null) { - return ''; + return null; } if (value is String || value is num || value is bool) { return value; @@ -52,7 +52,7 @@ dynamic encodeQueryParameter( specifiedType: type, ); if (serialized == null) { - return ''; + return null; } if (serialized is String) { return serialized; @@ -60,18 +60,29 @@ dynamic encodeQueryParameter( return serialized; } -ListParam encodeCollectionQueryParameter( +ListParam? encodeCollectionQueryParameter( Serializers serializers, dynamic value, FullType type, { ListFormat format = ListFormat.multi, }) { + if (value == null) { + return null; + } final serialized = serializers.serialize( value as Object, specifiedType: type, ); + if (serialized == null) { + return null; + } if (value is BuiltList || value is BuiltSet) { return ListParam(List.of((serialized as Iterable).cast()), format); } throw ArgumentError('Invalid value passed to encodeCollectionQueryParameter'); } + +void removeNullQueryParameters(Map queryParameters) { + queryParameters.removeWhere((_, value) => value == null); +} + diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/api_util.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/api_util.dart index ed3bb12f25b8..2332266910e5 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/api_util.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/api_util.dart @@ -38,7 +38,7 @@ dynamic encodeQueryParameter( FullType type, ) { if (value == null) { - return ''; + return null; } if (value is String || value is num || value is bool) { return value; @@ -52,7 +52,7 @@ dynamic encodeQueryParameter( specifiedType: type, ); if (serialized == null) { - return ''; + return null; } if (serialized is String) { return serialized; @@ -60,18 +60,29 @@ dynamic encodeQueryParameter( return serialized; } -ListParam encodeCollectionQueryParameter( +ListParam? encodeCollectionQueryParameter( Serializers serializers, dynamic value, FullType type, { ListFormat format = ListFormat.multi, }) { + if (value == null) { + return null; + } final serialized = serializers.serialize( value as Object, specifiedType: type, ); + if (serialized == null) { + return null; + } if (value is BuiltList || value is BuiltSet) { return ListParam(List.of((serialized as Iterable).cast()), format); } throw ArgumentError('Invalid value passed to encodeCollectionQueryParameter'); } + +void removeNullQueryParameters(Map queryParameters) { + queryParameters.removeWhere((_, value) => value == null); +} + diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_primitive/lib/src/api_util.dart b/samples/openapi3/client/petstore/dart-dio/oneof_primitive/lib/src/api_util.dart index ed3bb12f25b8..2332266910e5 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_primitive/lib/src/api_util.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_primitive/lib/src/api_util.dart @@ -38,7 +38,7 @@ dynamic encodeQueryParameter( FullType type, ) { if (value == null) { - return ''; + return null; } if (value is String || value is num || value is bool) { return value; @@ -52,7 +52,7 @@ dynamic encodeQueryParameter( specifiedType: type, ); if (serialized == null) { - return ''; + return null; } if (serialized is String) { return serialized; @@ -60,18 +60,29 @@ dynamic encodeQueryParameter( return serialized; } -ListParam encodeCollectionQueryParameter( +ListParam? encodeCollectionQueryParameter( Serializers serializers, dynamic value, FullType type, { ListFormat format = ListFormat.multi, }) { + if (value == null) { + return null; + } final serialized = serializers.serialize( value as Object, specifiedType: type, ); + if (serialized == null) { + return null; + } if (value is BuiltList || value is BuiltSet) { return ListParam(List.of((serialized as Iterable).cast()), format); } throw ArgumentError('Invalid value passed to encodeCollectionQueryParameter'); } + +void removeNullQueryParameters(Map queryParameters) { + queryParameters.removeWhere((_, value) => value == null); +} + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/api/pet_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/api/pet_api.dart index 8aaf646e3051..6a5a753ced8a 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/api/pet_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/api/pet_api.dart @@ -220,6 +220,7 @@ class PetApi { final _queryParameters = { r'status': encodeCollectionQueryParameter(_serializers, status, const FullType(BuiltList, [FullType(String)]), format: ListFormat.csv,), }; + removeNullQueryParameters(_queryParameters); final _response = await _dio.request( _path, @@ -306,6 +307,7 @@ class PetApi { final _queryParameters = { r'tags': encodeCollectionQueryParameter(_serializers, tags, const FullType(BuiltList, [FullType(String)]), format: ListFormat.csv,), }; + removeNullQueryParameters(_queryParameters); final _response = await _dio.request( _path, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/api/user_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/api/user_api.dart index c052b91ccf63..c933a70d4a14 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/api/user_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/api/user_api.dart @@ -414,6 +414,7 @@ class UserApi { r'username': encodeQueryParameter(_serializers, username, const FullType(String)), r'password': encodeQueryParameter(_serializers, password, const FullType(String)), }; + removeNullQueryParameters(_queryParameters); final _response = await _dio.request( _path, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/api_util.dart b/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/api_util.dart index ed3bb12f25b8..2332266910e5 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/api_util.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/api_util.dart @@ -38,7 +38,7 @@ dynamic encodeQueryParameter( FullType type, ) { if (value == null) { - return ''; + return null; } if (value is String || value is num || value is bool) { return value; @@ -52,7 +52,7 @@ dynamic encodeQueryParameter( specifiedType: type, ); if (serialized == null) { - return ''; + return null; } if (serialized is String) { return serialized; @@ -60,18 +60,29 @@ dynamic encodeQueryParameter( return serialized; } -ListParam encodeCollectionQueryParameter( +ListParam? encodeCollectionQueryParameter( Serializers serializers, dynamic value, FullType type, { ListFormat format = ListFormat.multi, }) { + if (value == null) { + return null; + } final serialized = serializers.serialize( value as Object, specifiedType: type, ); + if (serialized == null) { + return null; + } if (value is BuiltList || value is BuiltSet) { return ListParam(List.of((serialized as Iterable).cast()), format); } throw ArgumentError('Invalid value passed to encodeCollectionQueryParameter'); } + +void removeNullQueryParameters(Map queryParameters) { + queryParameters.removeWhere((_, value) => value == null); +} + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/fake_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/fake_api.dart index 370401906dcd..acd9fe3a06aa 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/fake_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/fake_api.dart @@ -289,6 +289,7 @@ _responseData = rawData == null ? null : deserialize{ if (query1 != null) r'query_1': query1, }; + removeNullQueryParameters(_queryParameters); dynamic _bodyData; @@ -1016,6 +1017,7 @@ _responseData = rawData == null ? null : deserialize{ r'query': query, }; + removeNullQueryParameters(_queryParameters); dynamic _bodyData; @@ -1314,6 +1316,7 @@ _responseData = rawData == null ? null : deserialize(r if (enumQueryDouble != null) r'enum_query_double': enumQueryDouble, if (enumQueryModelArray != null) r'enum_query_model_array': enumQueryModelArray, }; + removeNullQueryParameters(_queryParameters); dynamic _bodyData; @@ -1409,6 +1412,7 @@ _responseData = rawData == null ? null : deserialize(r if (stringGroup != null) r'string_group': stringGroup, if (int64Group != null) r'int64_group': int64Group, }; + removeNullQueryParameters(_queryParameters); final _response = await _dio.request( _path, @@ -1748,6 +1752,7 @@ _responseData = rawData == null ? null : deserialize(r if (language != null) r'language': language, r'allowEmpty': allowEmpty, }; + removeNullQueryParameters(_queryParameters); final _response = await _dio.request( _path, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/pet_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/pet_api.dart index 60aaece86905..82285367e8f8 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/pet_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/pet_api.dart @@ -188,6 +188,7 @@ class PetApi { final _queryParameters = { r'status': status, }; + removeNullQueryParameters(_queryParameters); final _response = await _dio.request( _path, @@ -271,6 +272,7 @@ _responseData = rawData == null ? null : deserialize, Pet>(rawData, 'L final _queryParameters = { r'tags': tags, }; + removeNullQueryParameters(_queryParameters); final _response = await _dio.request( _path, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/user_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/user_api.dart index 87ceeccc6b4a..14aa3292bdbd 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/user_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/user_api.dart @@ -376,6 +376,7 @@ _responseData = rawData == null ? null : deserialize(rawData, 'User' r'username': username, r'password': password, }; + removeNullQueryParameters(_queryParameters); final _response = await _dio.request( _path, diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/git_push.sh b/samples/openapi3/client/petstore/dart2/petstore_client_lib/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/git_push.sh +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/git_push.sh b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/git_push.sh +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/openapi3/client/petstore/go-petstore-generateMarshalJSON-false/git_push.sh b/samples/openapi3/client/petstore/go-petstore-generateMarshalJSON-false/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/openapi3/client/petstore/go-petstore-generateMarshalJSON-false/git_push.sh +++ b/samples/openapi3/client/petstore/go-petstore-generateMarshalJSON-false/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/openapi3/client/petstore/go-petstore-withXml/git_push.sh b/samples/openapi3/client/petstore/go-petstore-withXml/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/openapi3/client/petstore/go-petstore-withXml/git_push.sh +++ b/samples/openapi3/client/petstore/go-petstore-withXml/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/openapi3/client/petstore/go/go-petstore-aws-signature/git_push.sh b/samples/openapi3/client/petstore/go/go-petstore-aws-signature/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/openapi3/client/petstore/go/go-petstore-aws-signature/git_push.sh +++ b/samples/openapi3/client/petstore/go/go-petstore-aws-signature/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/openapi3/client/petstore/go/go-petstore/git_push.sh b/samples/openapi3/client/petstore/go/go-petstore/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/git_push.sh +++ b/samples/openapi3/client/petstore/go/go-petstore/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/git_push.sh b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/git_push.sh +++ b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-swagger1/git_push.sh b/samples/openapi3/client/petstore/java/jersey2-java8-swagger1/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-swagger1/git_push.sh +++ b/samples/openapi3/client/petstore/java/jersey2-java8-swagger1/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-swagger2/git_push.sh b/samples/openapi3/client/petstore/java/jersey2-java8-swagger2/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-swagger2/git_push.sh +++ b/samples/openapi3/client/petstore/java/jersey2-java8-swagger2/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/git_push.sh b/samples/openapi3/client/petstore/java/jersey2-java8/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/git_push.sh +++ b/samples/openapi3/client/petstore/java/jersey2-java8/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/git_push.sh b/samples/server/petstore/cpp-restbed/generated/3_0/git_push.sh index a35991cd51a1..f53a75d4fabe 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/git_push.sh +++ b/samples/server/petstore/cpp-restbed/generated/3_0/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ -z "${git_host}" ]; then +if [ "$git_host" = "" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi -if [ -z "${git_user_id}" ]; then +if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi -if [ -z "${git_repo_id}" ]; then +if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi -if [ -z "${release_note}" ]; then +if [ "$release_note" = "" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository @@ -35,16 +35,19 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "${release_note}" +git commit -m "$release_note" # Sets the new remote -if [ -z "$(git remote)" ]; then # git remote not defined - if [ -z "${GIT_TOKEN:-}" ]; then - echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." - git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi + fi git pull origin master diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Category.java index 4712b79a3cac..4012cb04f231 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Category.java @@ -2,6 +2,7 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import org.openapitools.jackson.nullable.JsonNullable; diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/ModelApiResponse.java index bfdb5b06105f..9ee0c1b2807d 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -2,6 +2,7 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Order.java index f4c5514f4426..05024e14114d 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Order.java @@ -2,6 +2,7 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Pet.java index 04a85884f067..30902a60c2df 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Pet.java @@ -2,6 +2,7 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -50,9 +51,7 @@ public class Pet { /** * pet status in the store - * @deprecated deprecated */ - @Deprecated public enum StatusEnum { AVAILABLE("available"), diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Tag.java index 671b2504940e..59823ce029a6 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Tag.java @@ -2,6 +2,7 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import org.openapitools.jackson.nullable.JsonNullable; diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/User.java index e6053f2676f6..dde60f69542a 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/User.java @@ -2,6 +2,7 @@ import java.net.URI; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import org.openapitools.jackson.nullable.JsonNullable; diff --git a/samples/server/petstore/java-vertx-web-interface-only/.openapi-generator/FILES b/samples/server/petstore/java-vertx-web-interface-only/.openapi-generator/FILES index 42a4804d571b..08e93e05a0c4 100644 --- a/samples/server/petstore/java-vertx-web-interface-only/.openapi-generator/FILES +++ b/samples/server/petstore/java-vertx-web-interface-only/.openapi-generator/FILES @@ -1,12 +1,16 @@ README.md pom.xml src/main/java/org/openapitools/vertxweb/server/ApiResponse.java +src/main/java/org/openapitools/vertxweb/server/HttpServerVerticle.java src/main/java/org/openapitools/vertxweb/server/api/PetApi.java src/main/java/org/openapitools/vertxweb/server/api/PetApiHandler.java +src/main/java/org/openapitools/vertxweb/server/api/PetApiImpl.java src/main/java/org/openapitools/vertxweb/server/api/StoreApi.java src/main/java/org/openapitools/vertxweb/server/api/StoreApiHandler.java +src/main/java/org/openapitools/vertxweb/server/api/StoreApiImpl.java src/main/java/org/openapitools/vertxweb/server/api/UserApi.java src/main/java/org/openapitools/vertxweb/server/api/UserApiHandler.java +src/main/java/org/openapitools/vertxweb/server/api/UserApiImpl.java src/main/java/org/openapitools/vertxweb/server/model/Category.java src/main/java/org/openapitools/vertxweb/server/model/ModelApiResponse.java src/main/java/org/openapitools/vertxweb/server/model/Order.java diff --git a/samples/server/petstore/java-vertx-web-interface-only/src/main/java/org/openapitools/vertxweb/server/HttpServerVerticle.java b/samples/server/petstore/java-vertx-web-interface-only/src/main/java/org/openapitools/vertxweb/server/HttpServerVerticle.java new file mode 100644 index 000000000000..9f8811724f17 --- /dev/null +++ b/samples/server/petstore/java-vertx-web-interface-only/src/main/java/org/openapitools/vertxweb/server/HttpServerVerticle.java @@ -0,0 +1,63 @@ +package org.openapitools.vertxweb.server; + +import io.vertx.core.AbstractVerticle; +import io.vertx.core.Promise; +import io.vertx.core.http.HttpServerOptions; +import io.vertx.ext.web.Router; +import io.vertx.ext.web.RoutingContext; +import io.vertx.ext.web.openapi.RouterBuilder; +import io.vertx.ext.web.openapi.RouterBuilderOptions; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.openapitools.vertxweb.server.api.PetApiHandler; +import org.openapitools.vertxweb.server.api.PetApiImpl; +import org.openapitools.vertxweb.server.api.StoreApiHandler; +import org.openapitools.vertxweb.server.api.StoreApiImpl; +import org.openapitools.vertxweb.server.api.UserApiHandler; +import org.openapitools.vertxweb.server.api.UserApiImpl; + +public class HttpServerVerticle extends AbstractVerticle { + + private static final Logger logger = LoggerFactory.getLogger(HttpServerVerticle.class); + private static final String specFile = "src/main/resources/openapi.yaml"; + + + private final PetApiHandler petHandler = new PetApiHandler(new PetApiImpl()); + private final StoreApiHandler storeHandler = new StoreApiHandler(new StoreApiImpl()); + private final UserApiHandler userHandler = new UserApiHandler(new UserApiImpl()); + + @Override + public void start(Promise startPromise) { + RouterBuilder.create(vertx, specFile) + .map(builder -> { + builder.setOptions(new RouterBuilderOptions() + // For production use case, you need to enable this flag and provide the proper security handler + .setRequireSecurityHandlers(false) + ); + + petHandler.mount(builder); + storeHandler.mount(builder); + userHandler.mount(builder); + + Router router = builder.createRouter(); + router.errorHandler(400, this::validationFailureHandler); + + return router; + }) + .compose(router -> + vertx.createHttpServer() + .requestHandler(router) + .listen(8080) + ) + .onSuccess(server -> logger.info("Http verticle deploy successful")) + .onFailure(t -> logger.error("Http verticle failed to deploy", t)) + // Complete the start promise + .mapEmpty().onComplete(startPromise); + } + + private void validationFailureHandler(RoutingContext rc) { + rc.response().setStatusCode(400) + .end("Bad Request : " + rc.failure().getMessage()); + } +} diff --git a/samples/server/petstore/java-vertx-web-interface-only/src/main/java/org/openapitools/vertxweb/server/api/PetApiImpl.java b/samples/server/petstore/java-vertx-web-interface-only/src/main/java/org/openapitools/vertxweb/server/api/PetApiImpl.java new file mode 100644 index 000000000000..8743965e08aa --- /dev/null +++ b/samples/server/petstore/java-vertx-web-interface-only/src/main/java/org/openapitools/vertxweb/server/api/PetApiImpl.java @@ -0,0 +1,51 @@ +package org.openapitools.vertxweb.server.api; + +import io.vertx.ext.web.FileUpload; +import org.openapitools.vertxweb.server.model.ModelApiResponse; +import org.openapitools.vertxweb.server.model.Pet; + +import org.openapitools.vertxweb.server.ApiResponse; + +import io.vertx.core.Future; +import io.vertx.core.json.JsonObject; +import io.vertx.ext.web.handler.HttpException; + +import java.util.List; +import java.util.Map; + +// Implement this class + +public class PetApiImpl implements PetApi { + public Future> addPet(Pet pet) { + return Future.failedFuture(new HttpException(501)); + } + + public Future> deletePet(Long petId, String apiKey) { + return Future.failedFuture(new HttpException(501)); + } + + public Future>> findPetsByStatus(List status) { + return Future.failedFuture(new HttpException(501)); + } + + public Future>> findPetsByTags(List tags) { + return Future.failedFuture(new HttpException(501)); + } + + public Future> getPetById(Long petId) { + return Future.failedFuture(new HttpException(501)); + } + + public Future> updatePet(Pet pet) { + return Future.failedFuture(new HttpException(501)); + } + + public Future> updatePetWithForm(Long petId, JsonObject formBody) { + return Future.failedFuture(new HttpException(501)); + } + + public Future> uploadFile(Long petId, FileUpload _file) { + return Future.failedFuture(new HttpException(501)); + } + +} diff --git a/samples/server/petstore/java-vertx-web-interface-only/src/main/java/org/openapitools/vertxweb/server/api/StoreApiImpl.java b/samples/server/petstore/java-vertx-web-interface-only/src/main/java/org/openapitools/vertxweb/server/api/StoreApiImpl.java new file mode 100644 index 000000000000..1bc8d437a05d --- /dev/null +++ b/samples/server/petstore/java-vertx-web-interface-only/src/main/java/org/openapitools/vertxweb/server/api/StoreApiImpl.java @@ -0,0 +1,33 @@ +package org.openapitools.vertxweb.server.api; + +import org.openapitools.vertxweb.server.model.Order; + +import org.openapitools.vertxweb.server.ApiResponse; + +import io.vertx.core.Future; +import io.vertx.core.json.JsonObject; +import io.vertx.ext.web.handler.HttpException; + +import java.util.List; +import java.util.Map; + +// Implement this class + +public class StoreApiImpl implements StoreApi { + public Future> deleteOrder(String orderId) { + return Future.failedFuture(new HttpException(501)); + } + + public Future>> getInventory() { + return Future.failedFuture(new HttpException(501)); + } + + public Future> getOrderById(Long orderId) { + return Future.failedFuture(new HttpException(501)); + } + + public Future> placeOrder(Order order) { + return Future.failedFuture(new HttpException(501)); + } + +} diff --git a/samples/server/petstore/java-vertx-web-interface-only/src/main/java/org/openapitools/vertxweb/server/api/UserApiImpl.java b/samples/server/petstore/java-vertx-web-interface-only/src/main/java/org/openapitools/vertxweb/server/api/UserApiImpl.java new file mode 100644 index 000000000000..414f22e0de2a --- /dev/null +++ b/samples/server/petstore/java-vertx-web-interface-only/src/main/java/org/openapitools/vertxweb/server/api/UserApiImpl.java @@ -0,0 +1,50 @@ +package org.openapitools.vertxweb.server.api; + +import java.time.OffsetDateTime; +import org.openapitools.vertxweb.server.model.User; + +import org.openapitools.vertxweb.server.ApiResponse; + +import io.vertx.core.Future; +import io.vertx.core.json.JsonObject; +import io.vertx.ext.web.handler.HttpException; + +import java.util.List; +import java.util.Map; + +// Implement this class + +public class UserApiImpl implements UserApi { + public Future> createUser(User user) { + return Future.failedFuture(new HttpException(501)); + } + + public Future> createUsersWithArrayInput(List user) { + return Future.failedFuture(new HttpException(501)); + } + + public Future> createUsersWithListInput(List user) { + return Future.failedFuture(new HttpException(501)); + } + + public Future> deleteUser(String username) { + return Future.failedFuture(new HttpException(501)); + } + + public Future> getUserByName(String username) { + return Future.failedFuture(new HttpException(501)); + } + + public Future> loginUser(String username, String password) { + return Future.failedFuture(new HttpException(501)); + } + + public Future> logoutUser() { + return Future.failedFuture(new HttpException(501)); + } + + public Future> updateUser(String username, User user) { + return Future.failedFuture(new HttpException(501)); + } + +} diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/README.md b/samples/server/petstore/jaxrs-resteasy/eap-joda/README.md index 74db54ed53ee..e69de29bb2d1 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/README.md +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/README.md @@ -1,19 +0,0 @@ -# JAX-RS/Resteasy server with OpenAPI for Jboss EAP - -## Overview -This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using an -[OpenAPI-Spec](https://openapis.org), you can easily generate a server stub. - -This is an example of building a OpenAPI-enabled JAX-RS server. -This example uses the [JAX-RS](https://jax-rs-spec.java.net/) framework for Jboss Resteasy. - -You can deploy the WAR file to Jboss EAP or any other JEE server supporting Jboss Resteasy. - -You can then view the OpenAPI v2 specification here: - -``` -http://localhost:8080/v2/swagger.json -``` - -Note that if you have configured the `host` to be something other than localhost, the calls through -swagger-ui will be directed to that host and not localhost! \ No newline at end of file From 2d0e06c3de664a649588c7ee1882b353eedd97e1 Mon Sep 17 00:00:00 2001 From: fstotz Date: Wed, 19 Aug 2026 13:03:36 +0200 Subject: [PATCH 07/14] run generate samples --- .../csharp/restsharp/net8/EchoApi/git_push.sh | 31 ++++---- .../echo_api/go-external-refs/git_push.sh | 31 ++++---- samples/client/echo_api/go/git_push.sh | 31 ++++---- .../java/apache-httpclient/git_push.sh | 31 ++++---- .../echo_api/java/feign-gson/git_push.sh | 31 ++++---- .../client/echo_api/java/native/git_push.sh | 31 ++++---- .../echo_api/java/okhttp-gson/git_push.sh | 31 ++++---- .../echo_api/java/restclient/git_push.sh | 31 ++++---- .../client/echo_api/java/resteasy/git_push.sh | 31 ++++---- .../echo_api/java/resttemplate/git_push.sh | 31 ++++---- .../client/others/crystal-qdrant/git_push.sh | 31 ++++---- .../others/csharp-complex-files/git_push.sh | 31 ++++---- .../git_push.sh | 31 ++++---- .../git_push.sh | 31 ++++---- .../go/oneof-anyof-required/git_push.sh | 31 ++++---- .../go/oneof-discriminator-lookup/git_push.sh | 31 ++++---- .../java/jersey2-oneOf-Mixed/git_push.sh | 31 ++++---- .../java/jersey2-oneOf-duplicates/git_push.sh | 31 ++++---- .../java/okhttp-gson-oneOf-array/git_push.sh | 31 ++++---- .../others/java/okhttp-gson-oneOf/git_push.sh | 31 ++++---- .../java/okhttp-gson-streaming/git_push.sh | 31 ++++---- .../restclient-enum-in-multipart/git_push.sh | 31 ++++---- .../restclient-sealedInterface/git_push.sh | 31 ++++---- .../git_push.sh | 31 ++++---- .../git_push.sh | 31 ++++---- .../git_push.sh | 31 ++++---- .../webclient-sealedInterface/git_push.sh | 31 ++++---- .../webclient-sealedInterface_3_1/git_push.sh | 31 ++++---- .../kotlin-integer-enum/docs/StringCode.md | 12 +++ .../petstore/cpp-restsdk/client/git_push.sh | 31 ++++---- samples/client/petstore/crystal/git_push.sh | 31 ++++---- .../AnnotatedEnum/.openapi-generator/FILES | 3 - .../latest/AnnotatedEnum/api/openapi.yaml | 8 +- .../Client/HostConfiguration.cs | 1 - .../Model/OneOfArrayRequest.cs | 4 +- .../models/InjectedVendorExtensionsTest.md | 2 +- .../Model/InjectedVendorExtensionsTest.cs | 14 ++-- .../net10/Petstore-nonPublicApi/git_push.sh | 31 ++++---- .../httpclient/net10/Petstore/git_push.sh | 31 ++++---- .../net9/Petstore-nonPublicApi/git_push.sh | 31 ++++---- .../httpclient/net9/Petstore/git_push.sh | 31 ++++---- .../standard2.0/Petstore/git_push.sh | 31 ++++---- .../restsharp/net10/EnumMappings/git_push.sh | 31 ++++---- .../restsharp/net10/Petstore/git_push.sh | 31 ++++---- .../net4.7/MultipleFrameworks/git_push.sh | 31 ++++---- .../restsharp/net4.7/Petstore/git_push.sh | 31 ++++---- .../restsharp/net4.8/Petstore/git_push.sh | 31 ++++---- .../restsharp/net8/EnumMappings/git_push.sh | 31 ++++---- .../net8/ParameterMappings/git_push.sh | 31 ++++---- .../restsharp/net8/Petstore/git_push.sh | 31 ++++---- .../net8/UseDateTimeForDate/git_push.sh | 31 ++++---- .../net8/useVirtualForHooks/git_push.sh | 31 ++++---- .../restsharp/net9/EnumMappings/git_push.sh | 31 ++++---- .../ConditionalSerialization/git_push.sh | 31 ++++---- .../standard2.0/Petstore/git_push.sh | 31 ++++---- .../net10/Petstore/git_push.sh | 31 ++++---- .../unityWebRequest/net9/Petstore/git_push.sh | 31 ++++---- .../standard2.0/Petstore/git_push.sh | 31 ++++---- .../petstore/go/go-petstore/git_push.sh | 31 ++++---- .../petstore/haskell-http-client/git_push.sh | 31 ++++---- .../apache-httpclient-jackson3/git_push.sh | 31 ++++---- .../java/apache-httpclient/git_push.sh | 31 ++++---- .../petstore/java/feign-hc5/git_push.sh | 31 ++++---- .../java/feign-no-nullable/git_push.sh | 31 ++++---- .../client/petstore/java/feign/git_push.sh | 31 ++++---- .../java/google-api-client/git_push.sh | 31 ++++---- .../jersey2-java8-localdatetime/git_push.sh | 31 ++++---- .../petstore/java/jersey2-java8/git_push.sh | 31 ++++---- .../java/jersey3-jackson3/git_push.sh | 31 ++++---- .../petstore/java/jersey3-oneOf/git_push.sh | 31 ++++---- .../client/petstore/java/jersey3/git_push.sh | 31 ++++---- .../petstore/java/native-async/git_push.sh | 31 ++++---- .../java/native-jackson3-jspecify/git_push.sh | 31 ++++---- .../client/model/FileContent.java | 4 +- .../org/openapitools/client/model/Foo.java | 22 +++--- .../client/model/RequiredAndNullable.java | 8 +- .../petstore/java/native-jackson3/git_push.sh | 31 ++++---- .../model/AdditionalPropertiesClass.java | 16 ++-- .../client/model/AllOfRefToDouble.java | 2 +- .../client/model/AllOfRefToFloat.java | 2 +- .../client/model/AllOfRefToLong.java | 2 +- .../org/openapitools/client/model/Animal.java | 4 +- .../org/openapitools/client/model/Apple.java | 4 +- .../openapitools/client/model/AppleReq.java | 4 +- .../model/ArrayOfArrayOfNumberOnly.java | 2 +- .../client/model/ArrayOfNumberOnly.java | 2 +- .../openapitools/client/model/ArrayTest.java | 6 +- .../org/openapitools/client/model/Banana.java | 2 +- .../openapitools/client/model/BananaReq.java | 4 +- .../openapitools/client/model/BasquePig.java | 2 +- .../client/model/Capitalization.java | 12 +-- .../org/openapitools/client/model/Cat.java | 6 +- .../openapitools/client/model/Category.java | 4 +- .../openapitools/client/model/ChildCat.java | 4 +- .../openapitools/client/model/ClassModel.java | 2 +- .../org/openapitools/client/model/Client.java | 2 +- .../client/model/ComplexQuadrilateral.java | 4 +- .../openapitools/client/model/DanishPig.java | 2 +- .../client/model/DeprecatedObject.java | 2 +- .../org/openapitools/client/model/Dog.java | 6 +- .../openapitools/client/model/Drawing.java | 8 +- .../openapitools/client/model/EnumArrays.java | 4 +- .../openapitools/client/model/EnumTest.java | 18 ++--- .../client/model/EquilateralTriangle.java | 4 +- .../model/FakeBigDecimalMap200Response.java | 4 +- .../client/model/FileSchemaTestClass.java | 4 +- .../org/openapitools/client/model/Foo.java | 2 +- .../client/model/FooGetDefaultResponse.java | 2 +- .../openapitools/client/model/FormatTest.java | 32 ++++---- .../client/model/GrandparentAnimal.java | 2 +- .../client/model/HasOnlyReadOnly.java | 4 +- .../client/model/HealthCheckResult.java | 2 +- .../client/model/IsoscelesTriangle.java | 4 +- .../openapitools/client/model/MapTest.java | 8 +- ...ropertiesAndAdditionalPropertiesClass.java | 6 +- .../client/model/Model200Response.java | 4 +- .../client/model/ModelApiResponse.java | 6 +- .../openapitools/client/model/ModelFile.java | 2 +- .../openapitools/client/model/ModelList.java | 2 +- .../client/model/ModelReturn.java | 2 +- .../org/openapitools/client/model/Name.java | 8 +- .../client/model/NullableClass.java | 24 +++--- .../openapitools/client/model/NumberOnly.java | 2 +- .../model/ObjectWithDeprecatedFields.java | 8 +- .../org/openapitools/client/model/Order.java | 12 +-- .../client/model/OuterComposite.java | 6 +- .../openapitools/client/model/ParentPet.java | 2 +- .../org/openapitools/client/model/Pet.java | 12 +-- .../client/model/QuadrilateralInterface.java | 2 +- .../client/model/ReadOnlyFirst.java | 4 +- .../client/model/ScaleneTriangle.java | 4 +- .../client/model/ShapeInterface.java | 2 +- .../client/model/SimpleQuadrilateral.java | 4 +- .../client/model/SpecialModelName.java | 4 +- .../org/openapitools/client/model/Tag.java | 4 +- ...neFreeformAdditionalPropertiesRequest.java | 2 +- .../client/model/TriangleInterface.java | 2 +- .../org/openapitools/client/model/User.java | 24 +++--- .../org/openapitools/client/model/Whale.java | 6 +- .../org/openapitools/client/model/Zebra.java | 4 +- .../petstore/java/native-jakarta/git_push.sh | 31 ++++---- .../java/native-useGzipFeature/git_push.sh | 31 ++++---- .../client/ServerConfiguration.java | 72 ++++++++++++++++++ .../model/AdditionalPropertiesClass.java | 16 ++-- .../client/model/AllOfRefToDouble.java | 2 +- .../client/model/AllOfRefToFloat.java | 2 +- .../client/model/AllOfRefToLong.java | 2 +- .../org/openapitools/client/model/Animal.java | 4 +- .../org/openapitools/client/model/Apple.java | 4 +- .../openapitools/client/model/AppleReq.java | 4 +- .../model/ArrayOfArrayOfNumberOnly.java | 2 +- .../client/model/ArrayOfNumberOnly.java | 2 +- .../openapitools/client/model/ArrayTest.java | 6 +- .../org/openapitools/client/model/Banana.java | 2 +- .../openapitools/client/model/BananaReq.java | 4 +- .../openapitools/client/model/BasquePig.java | 2 +- .../client/model/Capitalization.java | 12 +-- .../org/openapitools/client/model/Cat.java | 6 +- .../openapitools/client/model/Category.java | 4 +- .../openapitools/client/model/ChildCat.java | 4 +- .../openapitools/client/model/ClassModel.java | 2 +- .../org/openapitools/client/model/Client.java | 2 +- .../client/model/ComplexQuadrilateral.java | 4 +- .../openapitools/client/model/DanishPig.java | 2 +- .../client/model/DeprecatedObject.java | 2 +- .../org/openapitools/client/model/Dog.java | 6 +- .../openapitools/client/model/Drawing.java | 8 +- .../openapitools/client/model/EnumArrays.java | 4 +- .../openapitools/client/model/EnumTest.java | 18 ++--- .../client/model/EquilateralTriangle.java | 4 +- .../model/FakeBigDecimalMap200Response.java | 4 +- .../client/model/FileSchemaTestClass.java | 4 +- .../org/openapitools/client/model/Foo.java | 2 +- .../client/model/FooGetDefaultResponse.java | 2 +- .../openapitools/client/model/FormatTest.java | 32 ++++---- .../client/model/GrandparentAnimal.java | 2 +- .../client/model/HasOnlyReadOnly.java | 4 +- .../client/model/HealthCheckResult.java | 2 +- .../client/model/IsoscelesTriangle.java | 4 +- .../openapitools/client/model/MapTest.java | 8 +- ...ropertiesAndAdditionalPropertiesClass.java | 6 +- .../client/model/Model200Response.java | 4 +- .../client/model/ModelApiResponse.java | 6 +- .../openapitools/client/model/ModelFile.java | 2 +- .../openapitools/client/model/ModelList.java | 2 +- .../client/model/ModelReturn.java | 2 +- .../org/openapitools/client/model/Name.java | 8 +- .../client/model/NullableClass.java | 24 +++--- .../openapitools/client/model/NumberOnly.java | 2 +- .../model/ObjectWithDeprecatedFields.java | 8 +- .../org/openapitools/client/model/Order.java | 12 +-- .../client/model/OuterComposite.java | 6 +- .../openapitools/client/model/ParentPet.java | 2 +- .../org/openapitools/client/model/Pet.java | 12 +-- .../client/model/QuadrilateralInterface.java | 2 +- .../client/model/ReadOnlyFirst.java | 4 +- .../client/model/ScaleneTriangle.java | 4 +- .../client/model/ShapeInterface.java | 2 +- .../client/model/SimpleQuadrilateral.java | 4 +- .../client/model/SpecialModelName.java | 4 +- .../org/openapitools/client/model/Tag.java | 4 +- ...neFreeformAdditionalPropertiesRequest.java | 2 +- .../client/model/TriangleInterface.java | 2 +- .../org/openapitools/client/model/User.java | 24 +++--- .../org/openapitools/client/model/Whale.java | 6 +- .../org/openapitools/client/model/Zebra.java | 4 +- .../git_push.sh | 31 ++++---- .../petstore/java/okhttp-gson-3.1/git_push.sh | 31 ++++---- .../okhttp-gson-awsv4signature/git_push.sh | 31 ++++---- .../client/auth/HttpBearerAuth.java | 75 +++++++++++++++++++ .../okhttp-gson-group-parameter/git_push.sh | 31 ++++---- .../okhttp-gson-nullable-required/git_push.sh | 31 ++++---- .../okhttp-gson-parcelableModel/git_push.sh | 31 ++++---- .../java/okhttp-gson-swagger1/git_push.sh | 31 ++++---- .../java/okhttp-gson-swagger2/git_push.sh | 31 ++++---- .../petstore/java/okhttp-gson/git_push.sh | 31 ++++---- .../java/rest-assured-jackson/git_push.sh | 31 ++++---- .../petstore/java/rest-assured/git_push.sh | 31 ++++---- .../restclient-nullable-arrays/git_push.sh | 31 ++++---- .../git_push.sh | 31 ++++---- .../git_push.sh | 31 ++++---- .../client/model/FileContent.java | 4 +- .../org/openapitools/client/model/Foo.java | 22 +++--- .../client/model/RequiredAndNullable.java | 8 +- .../git_push.sh | 31 ++++---- .../client/model/FileContent.java | 4 +- .../org/openapitools/client/model/Foo.java | 22 +++--- .../client/model/RequiredAndNullable.java | 8 +- .../git_push.sh | 31 ++++---- .../java/restclient-swagger2/git_push.sh | 31 ++++---- .../git_push.sh | 31 ++++---- .../git_push.sh | 31 ++++---- .../client/petstore/java/resteasy/git_push.sh | 31 ++++---- .../java/resttemplate-jakarta/git_push.sh | 31 ++++---- .../git_push.sh | 31 ++++---- .../git_push.sh | 31 ++++---- .../client/model/FileContent.java | 4 +- .../org/openapitools/client/model/Foo.java | 22 +++--- .../client/model/RequiredAndNullable.java | 8 +- .../git_push.sh | 31 ++++---- .../java/resttemplate-swagger2/git_push.sh | 31 ++++---- .../petstore/java/resttemplate/git_push.sh | 31 ++++---- .../model/AdditionalPropertiesClass.java | 4 +- .../client/model/AllOfWithSingleRef.java | 4 +- .../org/openapitools/client/model/Animal.java | 4 +- .../model/ArrayOfArrayOfNumberOnly.java | 2 +- .../client/model/ArrayOfNumberOnly.java | 2 +- .../openapitools/client/model/ArrayTest.java | 6 +- .../client/model/Capitalization.java | 12 +-- .../org/openapitools/client/model/Cat.java | 6 +- .../openapitools/client/model/Category.java | 4 +- .../client/model/ChildWithNullable.java | 6 +- .../openapitools/client/model/ClassModel.java | 2 +- .../org/openapitools/client/model/Client.java | 2 +- .../client/model/DeprecatedObject.java | 2 +- .../org/openapitools/client/model/Dog.java | 6 +- .../openapitools/client/model/EnumArrays.java | 4 +- .../openapitools/client/model/EnumTest.java | 16 ++-- .../model/FakeBigDecimalMap200Response.java | 4 +- .../client/model/FileSchemaTestClass.java | 4 +- .../org/openapitools/client/model/Foo.java | 2 +- .../client/model/FooGetDefaultResponse.java | 2 +- .../openapitools/client/model/FormatTest.java | 32 ++++---- .../client/model/HasOnlyReadOnly.java | 4 +- .../client/model/HealthCheckResult.java | 2 +- .../openapitools/client/model/MapTest.java | 8 +- ...ropertiesAndAdditionalPropertiesClass.java | 6 +- .../client/model/Model200Response.java | 4 +- .../client/model/ModelApiResponse.java | 6 +- .../openapitools/client/model/ModelFile.java | 2 +- .../openapitools/client/model/ModelList.java | 2 +- .../client/model/ModelReturn.java | 2 +- .../org/openapitools/client/model/Name.java | 8 +- .../client/model/NullableClass.java | 24 +++--- .../openapitools/client/model/NumberOnly.java | 2 +- .../model/ObjectWithDeprecatedFields.java | 8 +- .../org/openapitools/client/model/Order.java | 12 +-- .../client/model/OuterComposite.java | 6 +- .../model/OuterObjectWithEnumProperty.java | 2 +- .../client/model/ParentWithNullable.java | 4 +- .../org/openapitools/client/model/Pet.java | 12 +-- .../client/model/ReadOnlyFirst.java | 4 +- .../client/model/SpecialModelName.java | 2 +- .../org/openapitools/client/model/Tag.java | 4 +- ...neFreeformAdditionalPropertiesRequest.java | 2 +- .../org/openapitools/client/model/User.java | 16 ++-- .../java/retrofit2-play26/git_push.sh | 31 ++++---- .../petstore/java/retrofit2/git_push.sh | 31 ++++---- .../petstore/java/retrofit2rx3/git_push.sh | 31 ++++---- .../java/vertx-no-nullable/git_push.sh | 31 ++++---- .../java/vertx-supportVertxFuture/git_push.sh | 31 ++++---- .../client/petstore/java/vertx/git_push.sh | 31 ++++---- .../vertx5-supportVertxFuture/git_push.sh | 31 ++++---- .../client/petstore/java/vertx5/git_push.sh | 31 ++++---- .../java/webclient-jakarta/git_push.sh | 31 ++++---- .../webclient-nullable-arrays/git_push.sh | 31 ++++---- .../git_push.sh | 31 ++++---- .../client/model/FileContent.java | 4 +- .../org/openapitools/client/model/Foo.java | 22 +++--- .../client/model/RequiredAndNullable.java | 8 +- .../git_push.sh | 31 ++++---- .../java/webclient-swagger2/git_push.sh | 31 ++++---- .../git_push.sh | 31 ++++---- .../petstore/java/webclient/git_push.sh | 31 ++++---- .../petstore/javascript-apollo/git_push.sh | 31 ++++---- .../petstore/javascript-es6/git_push.sh | 31 ++++---- .../javascript-promise-es6/git_push.sh | 31 ++++---- .../org/openapitools/client/models/Tag.kt | 50 +++++++++++++ .../go-experimental/git_push.sh | 31 ++++---- .../java/jersey2-java8/git_push.sh | 31 ++++---- .../lib/src/api/fake_api.dart | 5 ++ .../lib/src/api/pet_api.dart | 2 + .../lib/src/api/user_api.dart | 1 + .../lib/src/api_util.dart | 17 ++++- .../lib/src/serializers.dart | 2 +- .../dart2/petstore_client_lib/git_push.sh | 31 ++++---- .../petstore_client_lib_fake/git_push.sh | 31 ++++---- .../git_push.sh | 31 ++++---- .../petstore/go-petstore-withXml/git_push.sh | 31 ++++---- .../go/go-petstore-aws-signature/git_push.sh | 31 ++++---- .../petstore/go/go-petstore/git_push.sh | 31 ++++---- .../git_push.sh | 31 ++++---- .../java/jersey2-java8-swagger1/git_push.sh | 31 ++++---- .../java/jersey2-java8-swagger2/git_push.sh | 31 ++++---- .../petstore/java/jersey2-java8/git_push.sh | 31 ++++---- .../cpp-restbed/generated/3_0/git_push.sh | 31 ++++---- .../java/org/openapitools/model/Category.java | 1 - .../openapitools/model/ModelApiResponse.java | 1 - .../java/org/openapitools/model/Order.java | 1 - .../main/java/org/openapitools/model/Pet.java | 3 +- .../main/java/org/openapitools/model/Tag.java | 1 - .../java/org/openapitools/model/User.java | 1 - .../.openapi-generator/FILES | 4 - .../jaxrs-resteasy/eap-joda/README.md | 19 +++++ 334 files changed, 2599 insertions(+), 2748 deletions(-) diff --git a/samples/client/echo_api/csharp/restsharp/net8/EchoApi/git_push.sh b/samples/client/echo_api/csharp/restsharp/net8/EchoApi/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/echo_api/csharp/restsharp/net8/EchoApi/git_push.sh +++ b/samples/client/echo_api/csharp/restsharp/net8/EchoApi/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/echo_api/go-external-refs/git_push.sh b/samples/client/echo_api/go-external-refs/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/echo_api/go-external-refs/git_push.sh +++ b/samples/client/echo_api/go-external-refs/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/echo_api/go/git_push.sh b/samples/client/echo_api/go/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/echo_api/go/git_push.sh +++ b/samples/client/echo_api/go/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/echo_api/java/apache-httpclient/git_push.sh b/samples/client/echo_api/java/apache-httpclient/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/echo_api/java/apache-httpclient/git_push.sh +++ b/samples/client/echo_api/java/apache-httpclient/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/echo_api/java/feign-gson/git_push.sh b/samples/client/echo_api/java/feign-gson/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/echo_api/java/feign-gson/git_push.sh +++ b/samples/client/echo_api/java/feign-gson/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/echo_api/java/native/git_push.sh b/samples/client/echo_api/java/native/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/echo_api/java/native/git_push.sh +++ b/samples/client/echo_api/java/native/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/echo_api/java/okhttp-gson/git_push.sh b/samples/client/echo_api/java/okhttp-gson/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/echo_api/java/okhttp-gson/git_push.sh +++ b/samples/client/echo_api/java/okhttp-gson/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/echo_api/java/restclient/git_push.sh b/samples/client/echo_api/java/restclient/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/echo_api/java/restclient/git_push.sh +++ b/samples/client/echo_api/java/restclient/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/echo_api/java/resteasy/git_push.sh b/samples/client/echo_api/java/resteasy/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/echo_api/java/resteasy/git_push.sh +++ b/samples/client/echo_api/java/resteasy/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/echo_api/java/resttemplate/git_push.sh b/samples/client/echo_api/java/resttemplate/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/echo_api/java/resttemplate/git_push.sh +++ b/samples/client/echo_api/java/resttemplate/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/others/crystal-qdrant/git_push.sh b/samples/client/others/crystal-qdrant/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/others/crystal-qdrant/git_push.sh +++ b/samples/client/others/crystal-qdrant/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/others/csharp-complex-files/git_push.sh b/samples/client/others/csharp-complex-files/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/others/csharp-complex-files/git_push.sh +++ b/samples/client/others/csharp-complex-files/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/others/go/allof_multiple_ref_and_discriminator/git_push.sh b/samples/client/others/go/allof_multiple_ref_and_discriminator/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/others/go/allof_multiple_ref_and_discriminator/git_push.sh +++ b/samples/client/others/go/allof_multiple_ref_and_discriminator/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/others/go/issue_20079_go_regex_wrongly_translated/git_push.sh b/samples/client/others/go/issue_20079_go_regex_wrongly_translated/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/others/go/issue_20079_go_regex_wrongly_translated/git_push.sh +++ b/samples/client/others/go/issue_20079_go_regex_wrongly_translated/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/others/go/oneof-anyof-required/git_push.sh b/samples/client/others/go/oneof-anyof-required/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/others/go/oneof-anyof-required/git_push.sh +++ b/samples/client/others/go/oneof-anyof-required/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/others/go/oneof-discriminator-lookup/git_push.sh b/samples/client/others/go/oneof-discriminator-lookup/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/others/go/oneof-discriminator-lookup/git_push.sh +++ b/samples/client/others/go/oneof-discriminator-lookup/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/others/java/jersey2-oneOf-Mixed/git_push.sh b/samples/client/others/java/jersey2-oneOf-Mixed/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/others/java/jersey2-oneOf-Mixed/git_push.sh +++ b/samples/client/others/java/jersey2-oneOf-Mixed/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/others/java/jersey2-oneOf-duplicates/git_push.sh b/samples/client/others/java/jersey2-oneOf-duplicates/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/others/java/jersey2-oneOf-duplicates/git_push.sh +++ b/samples/client/others/java/jersey2-oneOf-duplicates/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/others/java/okhttp-gson-oneOf-array/git_push.sh b/samples/client/others/java/okhttp-gson-oneOf-array/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/others/java/okhttp-gson-oneOf-array/git_push.sh +++ b/samples/client/others/java/okhttp-gson-oneOf-array/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/others/java/okhttp-gson-oneOf/git_push.sh b/samples/client/others/java/okhttp-gson-oneOf/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/others/java/okhttp-gson-oneOf/git_push.sh +++ b/samples/client/others/java/okhttp-gson-oneOf/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/others/java/okhttp-gson-streaming/git_push.sh b/samples/client/others/java/okhttp-gson-streaming/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/others/java/okhttp-gson-streaming/git_push.sh +++ b/samples/client/others/java/okhttp-gson-streaming/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/others/java/restclient-enum-in-multipart/git_push.sh b/samples/client/others/java/restclient-enum-in-multipart/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/others/java/restclient-enum-in-multipart/git_push.sh +++ b/samples/client/others/java/restclient-enum-in-multipart/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/others/java/restclient-sealedInterface/git_push.sh b/samples/client/others/java/restclient-sealedInterface/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/others/java/restclient-sealedInterface/git_push.sh +++ b/samples/client/others/java/restclient-sealedInterface/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/others/java/restclient-useAbstractionForFiles/git_push.sh b/samples/client/others/java/restclient-useAbstractionForFiles/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/others/java/restclient-useAbstractionForFiles/git_push.sh +++ b/samples/client/others/java/restclient-useAbstractionForFiles/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/others/java/resttemplate-list-schema-validation/git_push.sh b/samples/client/others/java/resttemplate-list-schema-validation/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/others/java/resttemplate-list-schema-validation/git_push.sh +++ b/samples/client/others/java/resttemplate-list-schema-validation/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/others/java/resttemplate-useAbstractionForFiles/git_push.sh b/samples/client/others/java/resttemplate-useAbstractionForFiles/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/others/java/resttemplate-useAbstractionForFiles/git_push.sh +++ b/samples/client/others/java/resttemplate-useAbstractionForFiles/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/others/java/webclient-sealedInterface/git_push.sh b/samples/client/others/java/webclient-sealedInterface/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/others/java/webclient-sealedInterface/git_push.sh +++ b/samples/client/others/java/webclient-sealedInterface/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/others/java/webclient-sealedInterface_3_1/git_push.sh b/samples/client/others/java/webclient-sealedInterface_3_1/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/others/java/webclient-sealedInterface_3_1/git_push.sh +++ b/samples/client/others/java/webclient-sealedInterface_3_1/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/others/kotlin-integer-enum/docs/StringCode.md b/samples/client/others/kotlin-integer-enum/docs/StringCode.md index e69de29bb2d1..83b24ff278bc 100644 --- a/samples/client/others/kotlin-integer-enum/docs/StringCode.md +++ b/samples/client/others/kotlin-integer-enum/docs/StringCode.md @@ -0,0 +1,12 @@ + +# StringCode + +## Enum + + + * `hello` (value: `"hello"`) + + * `world` (value: `"world"`) + + + diff --git a/samples/client/petstore/cpp-restsdk/client/git_push.sh b/samples/client/petstore/cpp-restsdk/client/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/cpp-restsdk/client/git_push.sh +++ b/samples/client/petstore/cpp-restsdk/client/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/crystal/git_push.sh b/samples/client/petstore/crystal/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/crystal/git_push.sh +++ b/samples/client/petstore/crystal/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/.openapi-generator/FILES b/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/.openapi-generator/FILES index 50730778897c..add1b2cdf6dc 100644 --- a/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/.openapi-generator/FILES +++ b/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/.openapi-generator/FILES @@ -17,12 +17,10 @@ docs/models/ParentWithPluralOneOfProperty.md docs/models/ParentWithPluralOneOfPropertyNumber.md docs/models/PropertiesWithAnyOf.md docs/models/SingleAnyOfTest.md -docs/models/StringPatternsWithOneOf.md docs/models/TypeIntegerWithOneOf.md docs/scripts/git_push.ps1 docs/scripts/git_push.sh src/Org.OpenAPITools.Test/Api/DependencyInjectionTests.cs -src/Org.OpenAPITools.Test/Model/StringPatternsWithOneOfTests.cs src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj src/Org.OpenAPITools.Test/README.md src/Org.OpenAPITools/Api/DefaultApi.cs @@ -63,7 +61,6 @@ src/Org.OpenAPITools/Model/ParentWithPluralOneOfProperty.cs src/Org.OpenAPITools/Model/ParentWithPluralOneOfPropertyNumber.cs src/Org.OpenAPITools/Model/PropertiesWithAnyOf.cs src/Org.OpenAPITools/Model/SingleAnyOfTest.cs -src/Org.OpenAPITools/Model/StringPatternsWithOneOf.cs src/Org.OpenAPITools/Model/TypeIntegerWithOneOf.cs src/Org.OpenAPITools/Org.OpenAPITools.csproj src/Org.OpenAPITools/README.md diff --git a/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/api/openapi.yaml b/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/api/openapi.yaml index a3895699d9c8..b657d7bc953c 100644 --- a/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/api/openapi.yaml @@ -132,13 +132,7 @@ components: - $ref: "#/components/schemas/Parent" nullable: true StringPatternsWithOneOf: - oneOf: - - description: Numeric identifier - pattern: "^\\d{1,35}$" - type: string - - description: UUID identifier - pattern: "^[0-9a-f-]{36}$" - type: string + type: string ParentWithPluralOneOfProperty_number: oneOf: - $ref: "#/components/schemas/Number" diff --git a/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/src/Org.OpenAPITools/Client/HostConfiguration.cs b/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/src/Org.OpenAPITools/Client/HostConfiguration.cs index 8055e51b8ac0..6965a2d5bbd6 100644 --- a/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/src/Org.OpenAPITools/Client/HostConfiguration.cs +++ b/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/src/Org.OpenAPITools/Client/HostConfiguration.cs @@ -59,7 +59,6 @@ public HostConfiguration(IServiceCollection services) _jsonOptions.Converters.Add(new PropertiesWithAnyOfJsonConverter()); _jsonOptions.Converters.Add(new SingleAnyOfTestJsonConverter()); _jsonOptions.Converters.Add(new SingleAnyOfTestNullableJsonConverter()); - _jsonOptions.Converters.Add(new StringPatternsWithOneOfJsonConverter()); _jsonOptions.Converters.Add(new TypeIntegerWithOneOfJsonConverter()); _jsonOptions.Converters.Add(new TypeIntegerWithOneOfNullableJsonConverter()); JsonSerializerOptionsProvider jsonSerializerOptionsProvider = new(_jsonOptions); diff --git a/samples/client/petstore/csharp/generichost/latest/OneOfList/src/Org.OpenAPITools/Model/OneOfArrayRequest.cs b/samples/client/petstore/csharp/generichost/latest/OneOfList/src/Org.OpenAPITools/Model/OneOfArrayRequest.cs index 61f8810965b6..8ce7469d7bca 100644 --- a/samples/client/petstore/csharp/generichost/latest/OneOfList/src/Org.OpenAPITools/Model/OneOfArrayRequest.cs +++ b/samples/client/petstore/csharp/generichost/latest/OneOfList/src/Org.OpenAPITools/Model/OneOfArrayRequest.cs @@ -34,7 +34,7 @@ public partial class OneOfArrayRequest : IValidatableObject /// Initializes a new instance of the class. /// /// - internal OneOfArrayRequest(List list) + public OneOfArrayRequest(List list) { List = list; OnCreated(); @@ -44,7 +44,7 @@ internal OneOfArrayRequest(List list) /// Initializes a new instance of the class. /// /// - internal OneOfArrayRequest(List list1) + public OneOfArrayRequest(List list1) { List1 = list1; OnCreated(); diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/docs/models/InjectedVendorExtensionsTest.md b/samples/client/petstore/csharp/generichost/net10/Petstore/docs/models/InjectedVendorExtensionsTest.md index 0ae371b94664..4a695b7bf84c 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/docs/models/InjectedVendorExtensionsTest.md +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/docs/models/InjectedVendorExtensionsTest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **PotentiallyOverriddenPropertyAccessor** | **string** | | [optional] **PotentiallyOverriddenPropertyToInternal** | **string** | | [optional] [readonly] **PotentiallyOverriddenPropertyToPrivate** | **string** | | [optional] [readonly] -**PotentiallyOverriddenPropertyToPublic** | **string** | | [optional] [readonly] +**PotentiallyOverriddenPropertyToPublic** | **string** | | [optional] **UnalteredProperty** | **string** | | [optional] [readonly] **UnalteredPropertyAccessor** | **string** | | [optional] diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs index fbd98eae40a9..f8b20bd77658 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs @@ -63,46 +63,46 @@ public InjectedVendorExtensionsTest(Option potentiallyOverriddenProperty /// Gets or Sets PotentiallyOverriddenPropertyAccessor /// [JsonPropertyName("potentiallyOverriddenPropertyAccessor")] - public string PotentiallyOverriddenPropertyAccessor { get { return this.PotentiallyOverriddenPropertyAccessorOption.Value; } set { this.PotentiallyOverriddenPropertyAccessorOption = new(value); } } + internal string PotentiallyOverriddenPropertyAccessor { get { return this.PotentiallyOverriddenPropertyAccessorOption.Value; } set { this.PotentiallyOverriddenPropertyAccessorOption = new(value); } } /// /// Used to track the state of PotentiallyOverriddenPropertyToInternal /// [JsonIgnore] [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option PotentiallyOverriddenPropertyToInternalOption { get; } + public Option PotentiallyOverriddenPropertyToInternalOption { get; private set; } /// /// Gets or Sets PotentiallyOverriddenPropertyToInternal /// [JsonPropertyName("potentiallyOverriddenPropertyToInternal")] - public string PotentiallyOverriddenPropertyToInternal { get { return this.PotentiallyOverriddenPropertyToInternalOption.Value; } } + public string PotentiallyOverriddenPropertyToInternal { get { return this.PotentiallyOverriddenPropertyToInternalOption.Value; } internal set { this.PotentiallyOverriddenPropertyToInternalOption = new(value); } } /// /// Used to track the state of PotentiallyOverriddenPropertyToPrivate /// [JsonIgnore] [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option PotentiallyOverriddenPropertyToPrivateOption { get; } + public Option PotentiallyOverriddenPropertyToPrivateOption { get; private set; } /// /// Gets or Sets PotentiallyOverriddenPropertyToPrivate /// [JsonPropertyName("potentiallyOverriddenPropertyToPrivate")] - public string PotentiallyOverriddenPropertyToPrivate { get { return this.PotentiallyOverriddenPropertyToPrivateOption.Value; } } + public string PotentiallyOverriddenPropertyToPrivate { get { return this.PotentiallyOverriddenPropertyToPrivateOption.Value; } private set { this.PotentiallyOverriddenPropertyToPrivateOption = new(value); } } /// /// Used to track the state of PotentiallyOverriddenPropertyToPublic /// [JsonIgnore] [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option PotentiallyOverriddenPropertyToPublicOption { get; } + public Option PotentiallyOverriddenPropertyToPublicOption { get; private set; } /// /// Gets or Sets PotentiallyOverriddenPropertyToPublic /// [JsonPropertyName("potentiallyOverriddenPropertyToPublic")] - public string PotentiallyOverriddenPropertyToPublic { get { return this.PotentiallyOverriddenPropertyToPublicOption.Value; } } + public string PotentiallyOverriddenPropertyToPublic { get { return this.PotentiallyOverriddenPropertyToPublicOption.Value; } set { this.PotentiallyOverriddenPropertyToPublicOption = new(value); } } /// /// Used to track the state of UnalteredProperty diff --git a/samples/client/petstore/csharp/httpclient/net10/Petstore-nonPublicApi/git_push.sh b/samples/client/petstore/csharp/httpclient/net10/Petstore-nonPublicApi/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/csharp/httpclient/net10/Petstore-nonPublicApi/git_push.sh +++ b/samples/client/petstore/csharp/httpclient/net10/Petstore-nonPublicApi/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/csharp/httpclient/net10/Petstore/git_push.sh b/samples/client/petstore/csharp/httpclient/net10/Petstore/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/csharp/httpclient/net10/Petstore/git_push.sh +++ b/samples/client/petstore/csharp/httpclient/net10/Petstore/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore-nonPublicApi/git_push.sh b/samples/client/petstore/csharp/httpclient/net9/Petstore-nonPublicApi/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/csharp/httpclient/net9/Petstore-nonPublicApi/git_push.sh +++ b/samples/client/petstore/csharp/httpclient/net9/Petstore-nonPublicApi/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/git_push.sh b/samples/client/petstore/csharp/httpclient/net9/Petstore/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/csharp/httpclient/net9/Petstore/git_push.sh +++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/git_push.sh b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/git_push.sh +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/csharp/restsharp/net10/EnumMappings/git_push.sh b/samples/client/petstore/csharp/restsharp/net10/EnumMappings/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/csharp/restsharp/net10/EnumMappings/git_push.sh +++ b/samples/client/petstore/csharp/restsharp/net10/EnumMappings/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/csharp/restsharp/net10/Petstore/git_push.sh b/samples/client/petstore/csharp/restsharp/net10/Petstore/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/csharp/restsharp/net10/Petstore/git_push.sh +++ b/samples/client/petstore/csharp/restsharp/net10/Petstore/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/git_push.sh b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/git_push.sh +++ b/samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/git_push.sh b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/git_push.sh +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/git_push.sh b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/git_push.sh +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/csharp/restsharp/net8/EnumMappings/git_push.sh b/samples/client/petstore/csharp/restsharp/net8/EnumMappings/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/csharp/restsharp/net8/EnumMappings/git_push.sh +++ b/samples/client/petstore/csharp/restsharp/net8/EnumMappings/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/csharp/restsharp/net8/ParameterMappings/git_push.sh b/samples/client/petstore/csharp/restsharp/net8/ParameterMappings/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/csharp/restsharp/net8/ParameterMappings/git_push.sh +++ b/samples/client/petstore/csharp/restsharp/net8/ParameterMappings/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/csharp/restsharp/net8/Petstore/git_push.sh b/samples/client/petstore/csharp/restsharp/net8/Petstore/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/csharp/restsharp/net8/Petstore/git_push.sh +++ b/samples/client/petstore/csharp/restsharp/net8/Petstore/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/csharp/restsharp/net8/UseDateTimeForDate/git_push.sh b/samples/client/petstore/csharp/restsharp/net8/UseDateTimeForDate/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/csharp/restsharp/net8/UseDateTimeForDate/git_push.sh +++ b/samples/client/petstore/csharp/restsharp/net8/UseDateTimeForDate/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/csharp/restsharp/net8/useVirtualForHooks/git_push.sh b/samples/client/petstore/csharp/restsharp/net8/useVirtualForHooks/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/csharp/restsharp/net8/useVirtualForHooks/git_push.sh +++ b/samples/client/petstore/csharp/restsharp/net8/useVirtualForHooks/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/csharp/restsharp/net9/EnumMappings/git_push.sh b/samples/client/petstore/csharp/restsharp/net9/EnumMappings/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/csharp/restsharp/net9/EnumMappings/git_push.sh +++ b/samples/client/petstore/csharp/restsharp/net9/EnumMappings/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/git_push.sh b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/git_push.sh +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/git_push.sh b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/git_push.sh +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/csharp/unityWebRequest/net10/Petstore/git_push.sh b/samples/client/petstore/csharp/unityWebRequest/net10/Petstore/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/csharp/unityWebRequest/net10/Petstore/git_push.sh +++ b/samples/client/petstore/csharp/unityWebRequest/net10/Petstore/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/csharp/unityWebRequest/net9/Petstore/git_push.sh b/samples/client/petstore/csharp/unityWebRequest/net9/Petstore/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/csharp/unityWebRequest/net9/Petstore/git_push.sh +++ b/samples/client/petstore/csharp/unityWebRequest/net9/Petstore/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/git_push.sh b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/git_push.sh +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/go/go-petstore/git_push.sh b/samples/client/petstore/go/go-petstore/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/go/go-petstore/git_push.sh +++ b/samples/client/petstore/go/go-petstore/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/haskell-http-client/git_push.sh b/samples/client/petstore/haskell-http-client/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/haskell-http-client/git_push.sh +++ b/samples/client/petstore/haskell-http-client/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/apache-httpclient-jackson3/git_push.sh b/samples/client/petstore/java/apache-httpclient-jackson3/git_push.sh index f53a75d4fabe..a35991cd51a1 100755 --- a/samples/client/petstore/java/apache-httpclient-jackson3/git_push.sh +++ b/samples/client/petstore/java/apache-httpclient-jackson3/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/apache-httpclient/git_push.sh b/samples/client/petstore/java/apache-httpclient/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/apache-httpclient/git_push.sh +++ b/samples/client/petstore/java/apache-httpclient/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/feign-hc5/git_push.sh b/samples/client/petstore/java/feign-hc5/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/feign-hc5/git_push.sh +++ b/samples/client/petstore/java/feign-hc5/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/feign-no-nullable/git_push.sh b/samples/client/petstore/java/feign-no-nullable/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/feign-no-nullable/git_push.sh +++ b/samples/client/petstore/java/feign-no-nullable/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/feign/git_push.sh b/samples/client/petstore/java/feign/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/feign/git_push.sh +++ b/samples/client/petstore/java/feign/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/google-api-client/git_push.sh b/samples/client/petstore/java/google-api-client/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/google-api-client/git_push.sh +++ b/samples/client/petstore/java/google-api-client/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/git_push.sh b/samples/client/petstore/java/jersey2-java8-localdatetime/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/git_push.sh +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/jersey2-java8/git_push.sh b/samples/client/petstore/java/jersey2-java8/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/jersey2-java8/git_push.sh +++ b/samples/client/petstore/java/jersey2-java8/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/jersey3-jackson3/git_push.sh b/samples/client/petstore/java/jersey3-jackson3/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/jersey3-jackson3/git_push.sh +++ b/samples/client/petstore/java/jersey3-jackson3/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/jersey3-oneOf/git_push.sh b/samples/client/petstore/java/jersey3-oneOf/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/jersey3-oneOf/git_push.sh +++ b/samples/client/petstore/java/jersey3-oneOf/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/jersey3/git_push.sh b/samples/client/petstore/java/jersey3/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/jersey3/git_push.sh +++ b/samples/client/petstore/java/jersey3/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/native-async/git_push.sh b/samples/client/petstore/java/native-async/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/native-async/git_push.sh +++ b/samples/client/petstore/java/native-async/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/native-jackson3-jspecify/git_push.sh b/samples/client/petstore/java/native-jackson3-jspecify/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/native-jackson3-jspecify/git_push.sh +++ b/samples/client/petstore/java/native-jackson3-jspecify/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/native-jackson3-jspecify/src/main/java/org/openapitools/client/model/FileContent.java b/samples/client/petstore/java/native-jackson3-jspecify/src/main/java/org/openapitools/client/model/FileContent.java index de61822827ad..adbcdd81a78a 100644 --- a/samples/client/petstore/java/native-jackson3-jspecify/src/main/java/org/openapitools/client/model/FileContent.java +++ b/samples/client/petstore/java/native-jackson3-jspecify/src/main/java/org/openapitools/client/model/FileContent.java @@ -243,11 +243,11 @@ public FileContent.Builder name(String name) { this.instance.name = name; return this; } - public FileContent.Builder size(Integer size) { + public FileContent.Builder size(@Nullable Integer size) { this.instance.size = size; return this; } - public FileContent.Builder virusScan(VirusScanEnum virusScan) { + public FileContent.Builder virusScan(@Nullable VirusScanEnum virusScan) { this.instance.virusScan = virusScan; return this; } diff --git a/samples/client/petstore/java/native-jackson3-jspecify/src/main/java/org/openapitools/client/model/Foo.java b/samples/client/petstore/java/native-jackson3-jspecify/src/main/java/org/openapitools/client/model/Foo.java index 5e512e3675f9..0be0ec1d16c1 100644 --- a/samples/client/petstore/java/native-jackson3-jspecify/src/main/java/org/openapitools/client/model/Foo.java +++ b/samples/client/petstore/java/native-jackson3-jspecify/src/main/java/org/openapitools/client/model/Foo.java @@ -619,31 +619,31 @@ protected Builder(Foo instance) { this.instance = instance; } - public Foo.Builder dt(java.time.Instant dt) { + public Foo.Builder dt(java.time.@Nullable Instant dt) { this.instance.dt = dt; return this; } - public Foo.Builder nullableDt(java.time.Instant nullableDt) { + public Foo.Builder nullableDt(java.time.@Nullable Instant nullableDt) { this.instance.nullableDt = nullableDt; return this; } - public Foo.Builder binary(File binary) { + public Foo.Builder binary(@Nullable File binary) { this.instance.binary = binary; return this; } - public Foo.Builder nullableBinary(File nullableBinary) { + public Foo.Builder nullableBinary(@Nullable File nullableBinary) { this.instance.nullableBinary = nullableBinary; return this; } - public Foo.Builder listOfDt(List listOfDt) { + public Foo.Builder listOfDt(@Nullable List listOfDt) { this.instance.listOfDt = listOfDt; return this; } - public Foo.Builder listMinIntems(List listMinIntems) { + public Foo.Builder listMinIntems(@Nullable List listMinIntems) { this.instance.listMinIntems = listMinIntems; return this; } - public Foo.Builder nullableListMinIntems(List nullableListMinIntems) { + public Foo.Builder nullableListMinIntems(@Nullable List nullableListMinIntems) { this.instance.nullableListMinIntems = nullableListMinIntems; return this; } @@ -651,15 +651,15 @@ public Foo.Builder requiredDt(java.time.Instant requiredDt) { this.instance.requiredDt = requiredDt; return this; } - public Foo.Builder number(java.math.BigDecimal number) { + public Foo.Builder number(java.math.@Nullable BigDecimal number) { this.instance.number = number; return this; } - public Foo.Builder nullableNumber(java.math.BigDecimal nullableNumber) { + public Foo.Builder nullableNumber(java.math.@Nullable BigDecimal nullableNumber) { this.instance.nullableNumber = nullableNumber; return this; } - public Foo.Builder color(String color) { + public Foo.Builder color(@Nullable String color) { this.instance.color = color; return this; } @@ -667,7 +667,7 @@ public Foo.Builder requiredColor(String requiredColor) { this.instance.requiredColor = requiredColor; return this; } - public Foo.Builder nullableColor(String nullableColor) { + public Foo.Builder nullableColor(@Nullable String nullableColor) { this.instance.nullableColor = nullableColor; return this; } diff --git a/samples/client/petstore/java/native-jackson3-jspecify/src/main/java/org/openapitools/client/model/RequiredAndNullable.java b/samples/client/petstore/java/native-jackson3-jspecify/src/main/java/org/openapitools/client/model/RequiredAndNullable.java index f7f28580b35a..53202eaf7653 100644 --- a/samples/client/petstore/java/native-jackson3-jspecify/src/main/java/org/openapitools/client/model/RequiredAndNullable.java +++ b/samples/client/petstore/java/native-jackson3-jspecify/src/main/java/org/openapitools/client/model/RequiredAndNullable.java @@ -307,15 +307,15 @@ protected Builder(RequiredAndNullable instance) { this.instance = instance; } - public RequiredAndNullable.Builder str(String str) { + public RequiredAndNullable.Builder str(@Nullable String str) { this.instance.str = str; return this; } - public RequiredAndNullable.Builder _file(File _file) { + public RequiredAndNullable.Builder _file(@Nullable File _file) { this.instance._file = _file; return this; } - public RequiredAndNullable.Builder color(String color) { + public RequiredAndNullable.Builder color(@Nullable String color) { this.instance.color = color; return this; } @@ -323,7 +323,7 @@ public RequiredAndNullable.Builder onlyRequired(String onlyRequired) { this.instance.onlyRequired = onlyRequired; return this; } - public RequiredAndNullable.Builder _list(List _list) { + public RequiredAndNullable.Builder _list(@Nullable List _list) { this.instance._list = _list; return this; } diff --git a/samples/client/petstore/java/native-jackson3/git_push.sh b/samples/client/petstore/java/native-jackson3/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/native-jackson3/git_push.sh +++ b/samples/client/petstore/java/native-jackson3/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index eac762840515..10712b9f9c0f 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -446,35 +446,35 @@ protected Builder(AdditionalPropertiesClass instance) { this.instance = instance; } - public AdditionalPropertiesClass.Builder mapProperty(.annotation.Nullable Map mapProperty) { + public AdditionalPropertiesClass.Builder mapProperty(Map mapProperty) { this.instance.mapProperty = mapProperty; return this; } - public AdditionalPropertiesClass.Builder mapOfMapProperty(.annotation.Nullable Map> mapOfMapProperty) { + public AdditionalPropertiesClass.Builder mapOfMapProperty(Map> mapOfMapProperty) { this.instance.mapOfMapProperty = mapOfMapProperty; return this; } - public AdditionalPropertiesClass.Builder anytype1(.annotation.Nullable Object anytype1) { + public AdditionalPropertiesClass.Builder anytype1(Object anytype1) { this.instance.anytype1 = anytype1; return this; } - public AdditionalPropertiesClass.Builder mapWithUndeclaredPropertiesAnytype1(.annotation.Nullable Object mapWithUndeclaredPropertiesAnytype1) { + public AdditionalPropertiesClass.Builder mapWithUndeclaredPropertiesAnytype1(Object mapWithUndeclaredPropertiesAnytype1) { this.instance.mapWithUndeclaredPropertiesAnytype1 = mapWithUndeclaredPropertiesAnytype1; return this; } - public AdditionalPropertiesClass.Builder mapWithUndeclaredPropertiesAnytype2(.annotation.Nullable Object mapWithUndeclaredPropertiesAnytype2) { + public AdditionalPropertiesClass.Builder mapWithUndeclaredPropertiesAnytype2(Object mapWithUndeclaredPropertiesAnytype2) { this.instance.mapWithUndeclaredPropertiesAnytype2 = mapWithUndeclaredPropertiesAnytype2; return this; } - public AdditionalPropertiesClass.Builder mapWithUndeclaredPropertiesAnytype3(.annotation.Nullable Map mapWithUndeclaredPropertiesAnytype3) { + public AdditionalPropertiesClass.Builder mapWithUndeclaredPropertiesAnytype3(Map mapWithUndeclaredPropertiesAnytype3) { this.instance.mapWithUndeclaredPropertiesAnytype3 = mapWithUndeclaredPropertiesAnytype3; return this; } - public AdditionalPropertiesClass.Builder emptyMap(.annotation.Nullable Object emptyMap) { + public AdditionalPropertiesClass.Builder emptyMap(Object emptyMap) { this.instance.emptyMap = emptyMap; return this; } - public AdditionalPropertiesClass.Builder mapWithUndeclaredPropertiesString(.annotation.Nullable Map mapWithUndeclaredPropertiesString) { + public AdditionalPropertiesClass.Builder mapWithUndeclaredPropertiesString(Map mapWithUndeclaredPropertiesString) { this.instance.mapWithUndeclaredPropertiesString = mapWithUndeclaredPropertiesString; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/AllOfRefToDouble.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/AllOfRefToDouble.java index 614531924cc9..950bb59fb5b8 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/AllOfRefToDouble.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/AllOfRefToDouble.java @@ -151,7 +151,7 @@ protected Builder(AllOfRefToDouble instance) { this.instance = instance; } - public AllOfRefToDouble.Builder height(.annotation.Nullable Double height) { + public AllOfRefToDouble.Builder height(Double height) { this.instance.height = height; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/AllOfRefToFloat.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/AllOfRefToFloat.java index 6dc3f5b232a9..44687f8ccec3 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/AllOfRefToFloat.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/AllOfRefToFloat.java @@ -151,7 +151,7 @@ protected Builder(AllOfRefToFloat instance) { this.instance = instance; } - public AllOfRefToFloat.Builder weight(.annotation.Nullable Float weight) { + public AllOfRefToFloat.Builder weight(Float weight) { this.instance.weight = weight; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/AllOfRefToLong.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/AllOfRefToLong.java index 3e5ef01e2967..e7452789f273 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/AllOfRefToLong.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/AllOfRefToLong.java @@ -151,7 +151,7 @@ protected Builder(AllOfRefToLong instance) { this.instance = instance; } - public AllOfRefToLong.Builder id(.annotation.Nullable Long id) { + public AllOfRefToLong.Builder id(Long id) { this.instance.id = id; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Animal.java index 72c75bf621b8..0ccf32fbeb00 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Animal.java @@ -208,11 +208,11 @@ protected Builder(Animal instance) { this.instance = instance; } - public Animal.Builder className(.annotation.Nonnull String className) { + public Animal.Builder className(String className) { this.instance.className = className; return this; } - public Animal.Builder color(.annotation.Nullable String color) { + public Animal.Builder color(String color) { this.instance.color = color; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Apple.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Apple.java index da6d7d83c5cd..0b4b53547a20 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Apple.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Apple.java @@ -187,11 +187,11 @@ protected Builder(Apple instance) { this.instance = instance; } - public Apple.Builder cultivar(.annotation.Nullable String cultivar) { + public Apple.Builder cultivar(String cultivar) { this.instance.cultivar = cultivar; return this; } - public Apple.Builder origin(.annotation.Nullable String origin) { + public Apple.Builder origin(String origin) { this.instance.origin = origin; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/AppleReq.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/AppleReq.java index 3b5fd69687b2..f6d6ce511aad 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/AppleReq.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/AppleReq.java @@ -187,11 +187,11 @@ protected Builder(AppleReq instance) { this.instance = instance; } - public AppleReq.Builder cultivar(.annotation.Nonnull String cultivar) { + public AppleReq.Builder cultivar(String cultivar) { this.instance.cultivar = cultivar; return this; } - public AppleReq.Builder mealy(.annotation.Nullable Boolean mealy) { + public AppleReq.Builder mealy(Boolean mealy) { this.instance.mealy = mealy; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index bfc4b28b260e..71adea7af00f 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -168,7 +168,7 @@ protected Builder(ArrayOfArrayOfNumberOnly instance) { this.instance = instance; } - public ArrayOfArrayOfNumberOnly.Builder arrayArrayNumber(.annotation.Nullable List> arrayArrayNumber) { + public ArrayOfArrayOfNumberOnly.Builder arrayArrayNumber(List> arrayArrayNumber) { this.instance.arrayArrayNumber = arrayArrayNumber; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index 98946254ead9..6e9cd80dd08a 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -168,7 +168,7 @@ protected Builder(ArrayOfNumberOnly instance) { this.instance = instance; } - public ArrayOfNumberOnly.Builder arrayNumber(.annotation.Nullable List arrayNumber) { + public ArrayOfNumberOnly.Builder arrayNumber(List arrayNumber) { this.instance.arrayNumber = arrayNumber; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ArrayTest.java index d1af3932de34..0177c25f6e09 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -262,15 +262,15 @@ protected Builder(ArrayTest instance) { this.instance = instance; } - public ArrayTest.Builder arrayOfString(.annotation.Nullable List arrayOfString) { + public ArrayTest.Builder arrayOfString(List arrayOfString) { this.instance.arrayOfString = arrayOfString; return this; } - public ArrayTest.Builder arrayArrayOfInteger(.annotation.Nullable List> arrayArrayOfInteger) { + public ArrayTest.Builder arrayArrayOfInteger(List> arrayArrayOfInteger) { this.instance.arrayArrayOfInteger = arrayArrayOfInteger; return this; } - public ArrayTest.Builder arrayArrayOfModel(.annotation.Nullable List> arrayArrayOfModel) { + public ArrayTest.Builder arrayArrayOfModel(List> arrayArrayOfModel) { this.instance.arrayArrayOfModel = arrayArrayOfModel; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Banana.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Banana.java index b2873dd3de70..22c7aac756fe 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Banana.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Banana.java @@ -153,7 +153,7 @@ protected Builder(Banana instance) { this.instance = instance; } - public Banana.Builder lengthCm(.annotation.Nullable BigDecimal lengthCm) { + public Banana.Builder lengthCm(BigDecimal lengthCm) { this.instance.lengthCm = lengthCm; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/BananaReq.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/BananaReq.java index 6332ebd6b485..b59b514ac92d 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/BananaReq.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/BananaReq.java @@ -188,11 +188,11 @@ protected Builder(BananaReq instance) { this.instance = instance; } - public BananaReq.Builder lengthCm(.annotation.Nonnull BigDecimal lengthCm) { + public BananaReq.Builder lengthCm(BigDecimal lengthCm) { this.instance.lengthCm = lengthCm; return this; } - public BananaReq.Builder sweet(.annotation.Nullable Boolean sweet) { + public BananaReq.Builder sweet(Boolean sweet) { this.instance.sweet = sweet; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/BasquePig.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/BasquePig.java index 6e5b1f411e12..db090bdbad2e 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/BasquePig.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/BasquePig.java @@ -151,7 +151,7 @@ protected Builder(BasquePig instance) { this.instance = instance; } - public BasquePig.Builder className(.annotation.Nonnull String className) { + public BasquePig.Builder className(String className) { this.instance.className = className; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Capitalization.java index 72a54af70ae1..480aa7baf033 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Capitalization.java @@ -326,27 +326,27 @@ protected Builder(Capitalization instance) { this.instance = instance; } - public Capitalization.Builder smallCamel(.annotation.Nullable String smallCamel) { + public Capitalization.Builder smallCamel(String smallCamel) { this.instance.smallCamel = smallCamel; return this; } - public Capitalization.Builder capitalCamel(.annotation.Nullable String capitalCamel) { + public Capitalization.Builder capitalCamel(String capitalCamel) { this.instance.capitalCamel = capitalCamel; return this; } - public Capitalization.Builder smallSnake(.annotation.Nullable String smallSnake) { + public Capitalization.Builder smallSnake(String smallSnake) { this.instance.smallSnake = smallSnake; return this; } - public Capitalization.Builder capitalSnake(.annotation.Nullable String capitalSnake) { + public Capitalization.Builder capitalSnake(String capitalSnake) { this.instance.capitalSnake = capitalSnake; return this; } - public Capitalization.Builder scAETHFlowPoints(.annotation.Nullable String scAETHFlowPoints) { + public Capitalization.Builder scAETHFlowPoints(String scAETHFlowPoints) { this.instance.scAETHFlowPoints = scAETHFlowPoints; return this; } - public Capitalization.Builder ATT_NAME(.annotation.Nullable String ATT_NAME) { + public Capitalization.Builder ATT_NAME(String ATT_NAME) { this.instance.ATT_NAME = ATT_NAME; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Cat.java index 8c52a93a1654..c49cf1409e43 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Cat.java @@ -193,17 +193,17 @@ protected Builder(Cat instance) { this.instance = instance; } - public Cat.Builder declawed(.annotation.Nullable Boolean declawed) { + public Cat.Builder declawed(Boolean declawed) { this.instance.declawed = declawed; return this; } - public Cat.Builder className(.annotation.Nonnull String className) { // inherited: true + public Cat.Builder className(String className) { // inherited: true super.className(className); return this; } - public Cat.Builder color(.annotation.Nullable String color) { // inherited: true + public Cat.Builder color(String color) { // inherited: true super.color(color); return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Category.java index 1533f8008eed..586f8c538835 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Category.java @@ -186,11 +186,11 @@ protected Builder(Category instance) { this.instance = instance; } - public Category.Builder id(.annotation.Nullable Long id) { + public Category.Builder id(Long id) { this.instance.id = id; return this; } - public Category.Builder name(.annotation.Nonnull String name) { + public Category.Builder name(String name) { this.instance.name = name; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ChildCat.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ChildCat.java index 3bad23e6080f..db598978a6bb 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ChildCat.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ChildCat.java @@ -219,11 +219,11 @@ protected Builder(ChildCat instance) { this.instance = instance; } - public ChildCat.Builder name(.annotation.Nullable String name) { + public ChildCat.Builder name(String name) { this.instance.name = name; return this; } - public ChildCat.Builder petType(.annotation.Nullable String petType) { + public ChildCat.Builder petType(String petType) { this.instance.petType = petType; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ClassModel.java index 56e1055cb044..9b64df95827c 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ClassModel.java @@ -151,7 +151,7 @@ protected Builder(ClassModel instance) { this.instance = instance; } - public ClassModel.Builder propertyClass(.annotation.Nullable String propertyClass) { + public ClassModel.Builder propertyClass(String propertyClass) { this.instance.propertyClass = propertyClass; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Client.java index 4a4a7a4a534a..ed3c5193487c 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Client.java @@ -151,7 +151,7 @@ protected Builder(Client instance) { this.instance = instance; } - public Client.Builder client(.annotation.Nullable String client) { + public Client.Builder client(String client) { this.instance.client = client; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java index 83ff3a946129..8ce42f4fe56e 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java @@ -186,11 +186,11 @@ protected Builder(ComplexQuadrilateral instance) { this.instance = instance; } - public ComplexQuadrilateral.Builder shapeType(.annotation.Nonnull String shapeType) { + public ComplexQuadrilateral.Builder shapeType(String shapeType) { this.instance.shapeType = shapeType; return this; } - public ComplexQuadrilateral.Builder quadrilateralType(.annotation.Nonnull String quadrilateralType) { + public ComplexQuadrilateral.Builder quadrilateralType(String quadrilateralType) { this.instance.quadrilateralType = quadrilateralType; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/DanishPig.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/DanishPig.java index 48ddbe99d175..6a3e50cbf1ac 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/DanishPig.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/DanishPig.java @@ -151,7 +151,7 @@ protected Builder(DanishPig instance) { this.instance = instance; } - public DanishPig.Builder className(.annotation.Nonnull String className) { + public DanishPig.Builder className(String className) { this.instance.className = className; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/DeprecatedObject.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/DeprecatedObject.java index f3ba56842c41..288235211f1a 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/DeprecatedObject.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/DeprecatedObject.java @@ -153,7 +153,7 @@ protected Builder(DeprecatedObject instance) { this.instance = instance; } - public DeprecatedObject.Builder name(.annotation.Nullable String name) { + public DeprecatedObject.Builder name(String name) { this.instance.name = name; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Dog.java index 68eeab45a58c..13f512e63b4f 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Dog.java @@ -192,17 +192,17 @@ protected Builder(Dog instance) { this.instance = instance; } - public Dog.Builder breed(.annotation.Nullable String breed) { + public Dog.Builder breed(String breed) { this.instance.breed = breed; return this; } - public Dog.Builder className(.annotation.Nonnull String className) { // inherited: true + public Dog.Builder className(String className) { // inherited: true super.className(className); return this; } - public Dog.Builder color(.annotation.Nullable String color) { // inherited: true + public Dog.Builder color(String color) { // inherited: true super.color(color); return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Drawing.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Drawing.java index f91c7ad877d6..7927be3d9376 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Drawing.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Drawing.java @@ -323,19 +323,19 @@ protected Builder(Drawing instance) { this.instance = instance; } - public Drawing.Builder mainShape(.annotation.Nullable Shape mainShape) { + public Drawing.Builder mainShape(Shape mainShape) { this.instance.mainShape = mainShape; return this; } - public Drawing.Builder shapeOrNull(.annotation.Nullable ShapeOrNull shapeOrNull) { + public Drawing.Builder shapeOrNull(ShapeOrNull shapeOrNull) { this.instance.shapeOrNull = shapeOrNull; return this; } - public Drawing.Builder nullableShape(.annotation.Nullable NullableShape nullableShape) { + public Drawing.Builder nullableShape(NullableShape nullableShape) { this.instance.nullableShape = nullableShape; return this; } - public Drawing.Builder shapes(.annotation.Nullable List shapes) { + public Drawing.Builder shapes(List shapes) { this.instance.shapes = shapes; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/EnumArrays.java index f2d6007626ae..0f003bb4a63b 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -270,11 +270,11 @@ protected Builder(EnumArrays instance) { this.instance = instance; } - public EnumArrays.Builder justSymbol(.annotation.Nullable JustSymbolEnum justSymbol) { + public EnumArrays.Builder justSymbol(JustSymbolEnum justSymbol) { this.instance.justSymbol = justSymbol; return this; } - public EnumArrays.Builder arrayEnum(.annotation.Nullable List arrayEnum) { + public EnumArrays.Builder arrayEnum(List arrayEnum) { this.instance.arrayEnum = arrayEnum; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/EnumTest.java index 80ddfe3da608..2dbc83418f3f 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/EnumTest.java @@ -615,39 +615,39 @@ protected Builder(EnumTest instance) { this.instance = instance; } - public EnumTest.Builder enumString(.annotation.Nullable EnumStringEnum enumString) { + public EnumTest.Builder enumString(EnumStringEnum enumString) { this.instance.enumString = enumString; return this; } - public EnumTest.Builder enumStringRequired(.annotation.Nonnull EnumStringRequiredEnum enumStringRequired) { + public EnumTest.Builder enumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.instance.enumStringRequired = enumStringRequired; return this; } - public EnumTest.Builder enumInteger(.annotation.Nullable EnumIntegerEnum enumInteger) { + public EnumTest.Builder enumInteger(EnumIntegerEnum enumInteger) { this.instance.enumInteger = enumInteger; return this; } - public EnumTest.Builder enumIntegerOnly(.annotation.Nullable EnumIntegerOnlyEnum enumIntegerOnly) { + public EnumTest.Builder enumIntegerOnly(EnumIntegerOnlyEnum enumIntegerOnly) { this.instance.enumIntegerOnly = enumIntegerOnly; return this; } - public EnumTest.Builder enumNumber(.annotation.Nullable EnumNumberEnum enumNumber) { + public EnumTest.Builder enumNumber(EnumNumberEnum enumNumber) { this.instance.enumNumber = enumNumber; return this; } - public EnumTest.Builder outerEnum(.annotation.Nullable OuterEnum outerEnum) { + public EnumTest.Builder outerEnum(OuterEnum outerEnum) { this.instance.outerEnum = outerEnum; return this; } - public EnumTest.Builder outerEnumInteger(.annotation.Nullable OuterEnumInteger outerEnumInteger) { + public EnumTest.Builder outerEnumInteger(OuterEnumInteger outerEnumInteger) { this.instance.outerEnumInteger = outerEnumInteger; return this; } - public EnumTest.Builder outerEnumDefaultValue(.annotation.Nullable OuterEnumDefaultValue outerEnumDefaultValue) { + public EnumTest.Builder outerEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) { this.instance.outerEnumDefaultValue = outerEnumDefaultValue; return this; } - public EnumTest.Builder outerEnumIntegerDefaultValue(.annotation.Nullable OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) { + public EnumTest.Builder outerEnumIntegerDefaultValue(OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) { this.instance.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/EquilateralTriangle.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/EquilateralTriangle.java index 30bf4c6507e9..00ad0b2c3846 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/EquilateralTriangle.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/EquilateralTriangle.java @@ -186,11 +186,11 @@ protected Builder(EquilateralTriangle instance) { this.instance = instance; } - public EquilateralTriangle.Builder shapeType(.annotation.Nonnull String shapeType) { + public EquilateralTriangle.Builder shapeType(String shapeType) { this.instance.shapeType = shapeType; return this; } - public EquilateralTriangle.Builder triangleType(.annotation.Nonnull String triangleType) { + public EquilateralTriangle.Builder triangleType(String triangleType) { this.instance.triangleType = triangleType; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java index 2db6a029bac5..e614facce5c0 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java @@ -202,11 +202,11 @@ protected Builder(FakeBigDecimalMap200Response instance) { this.instance = instance; } - public FakeBigDecimalMap200Response.Builder someId(.annotation.Nullable BigDecimal someId) { + public FakeBigDecimalMap200Response.Builder someId(BigDecimal someId) { this.instance.someId = someId; return this; } - public FakeBigDecimalMap200Response.Builder someMap(.annotation.Nullable Map someMap) { + public FakeBigDecimalMap200Response.Builder someMap(Map someMap) { this.instance.someMap = someMap; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index a289fbc1f9ce..6b508d2cfd9a 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -202,11 +202,11 @@ protected Builder(FileSchemaTestClass instance) { this.instance = instance; } - public FileSchemaTestClass.Builder _file(.annotation.Nullable ModelFile _file) { + public FileSchemaTestClass.Builder _file(ModelFile _file) { this.instance._file = _file; return this; } - public FileSchemaTestClass.Builder files(.annotation.Nullable List files) { + public FileSchemaTestClass.Builder files(List files) { this.instance.files = files; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Foo.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Foo.java index 6fe769842016..09dc9ca3e2ae 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Foo.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Foo.java @@ -151,7 +151,7 @@ protected Builder(Foo instance) { this.instance = instance; } - public Foo.Builder bar(.annotation.Nullable String bar) { + public Foo.Builder bar(String bar) { this.instance.bar = bar; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java index 3c5f66d3350a..dcee9e7ef88d 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java @@ -153,7 +153,7 @@ protected Builder(FooGetDefaultResponse instance) { this.instance = instance; } - public FooGetDefaultResponse.Builder string(.annotation.Nullable Foo string) { + public FooGetDefaultResponse.Builder string(Foo string) { this.instance.string = string; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/FormatTest.java index 88ea68cb714b..90598c74de3f 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/FormatTest.java @@ -692,67 +692,67 @@ protected Builder(FormatTest instance) { this.instance = instance; } - public FormatTest.Builder integer(.annotation.Nullable Integer integer) { + public FormatTest.Builder integer(Integer integer) { this.instance.integer = integer; return this; } - public FormatTest.Builder int32(.annotation.Nullable Integer int32) { + public FormatTest.Builder int32(Integer int32) { this.instance.int32 = int32; return this; } - public FormatTest.Builder int64(.annotation.Nullable Long int64) { + public FormatTest.Builder int64(Long int64) { this.instance.int64 = int64; return this; } - public FormatTest.Builder number(.annotation.Nonnull BigDecimal number) { + public FormatTest.Builder number(BigDecimal number) { this.instance.number = number; return this; } - public FormatTest.Builder _float(.annotation.Nullable Float _float) { + public FormatTest.Builder _float(Float _float) { this.instance._float = _float; return this; } - public FormatTest.Builder _double(.annotation.Nullable Double _double) { + public FormatTest.Builder _double(Double _double) { this.instance._double = _double; return this; } - public FormatTest.Builder decimal(.annotation.Nullable BigDecimal decimal) { + public FormatTest.Builder decimal(BigDecimal decimal) { this.instance.decimal = decimal; return this; } - public FormatTest.Builder string(.annotation.Nullable String string) { + public FormatTest.Builder string(String string) { this.instance.string = string; return this; } - public FormatTest.Builder _byte(.annotation.Nonnull byte[] _byte) { + public FormatTest.Builder _byte(byte[] _byte) { this.instance._byte = _byte; return this; } - public FormatTest.Builder binary(.annotation.Nullable File binary) { + public FormatTest.Builder binary(File binary) { this.instance.binary = binary; return this; } - public FormatTest.Builder date(.annotation.Nonnull LocalDate date) { + public FormatTest.Builder date(LocalDate date) { this.instance.date = date; return this; } - public FormatTest.Builder dateTime(.annotation.Nullable OffsetDateTime dateTime) { + public FormatTest.Builder dateTime(OffsetDateTime dateTime) { this.instance.dateTime = dateTime; return this; } - public FormatTest.Builder uuid(.annotation.Nullable UUID uuid) { + public FormatTest.Builder uuid(UUID uuid) { this.instance.uuid = uuid; return this; } - public FormatTest.Builder password(.annotation.Nonnull String password) { + public FormatTest.Builder password(String password) { this.instance.password = password; return this; } - public FormatTest.Builder patternWithDigits(.annotation.Nullable String patternWithDigits) { + public FormatTest.Builder patternWithDigits(String patternWithDigits) { this.instance.patternWithDigits = patternWithDigits; return this; } - public FormatTest.Builder patternWithDigitsAndDelimiter(.annotation.Nullable String patternWithDigitsAndDelimiter) { + public FormatTest.Builder patternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) { this.instance.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/GrandparentAnimal.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/GrandparentAnimal.java index 3005fb22efa0..0f2427e6bac8 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/GrandparentAnimal.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/GrandparentAnimal.java @@ -173,7 +173,7 @@ protected Builder(GrandparentAnimal instance) { this.instance = instance; } - public GrandparentAnimal.Builder petType(.annotation.Nonnull String petType) { + public GrandparentAnimal.Builder petType(String petType) { this.instance.petType = petType; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index 583ed0e768ee..c1ebd7c7410f 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -177,11 +177,11 @@ protected Builder(HasOnlyReadOnly instance) { this.instance = instance; } - public HasOnlyReadOnly.Builder bar(.annotation.Nullable String bar) { + public HasOnlyReadOnly.Builder bar(String bar) { this.instance.bar = bar; return this; } - public HasOnlyReadOnly.Builder foo(.annotation.Nullable String foo) { + public HasOnlyReadOnly.Builder foo(String foo) { this.instance.foo = foo; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/HealthCheckResult.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/HealthCheckResult.java index 0403eb7c8bf4..07e85d730454 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/HealthCheckResult.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/HealthCheckResult.java @@ -151,7 +151,7 @@ protected Builder(HealthCheckResult instance) { this.instance = instance; } - public HealthCheckResult.Builder nullableMessage(.annotation.Nullable String nullableMessage) { + public HealthCheckResult.Builder nullableMessage(String nullableMessage) { this.instance.nullableMessage = nullableMessage; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/IsoscelesTriangle.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/IsoscelesTriangle.java index acf078bfaa8b..8d3f3b2f81d9 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/IsoscelesTriangle.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/IsoscelesTriangle.java @@ -186,11 +186,11 @@ protected Builder(IsoscelesTriangle instance) { this.instance = instance; } - public IsoscelesTriangle.Builder shapeType(.annotation.Nonnull String shapeType) { + public IsoscelesTriangle.Builder shapeType(String shapeType) { this.instance.shapeType = shapeType; return this; } - public IsoscelesTriangle.Builder triangleType(.annotation.Nonnull String triangleType) { + public IsoscelesTriangle.Builder triangleType(String triangleType) { this.instance.triangleType = triangleType; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/MapTest.java index 299f76a9ba83..5a3498b25cd0 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/MapTest.java @@ -341,19 +341,19 @@ protected Builder(MapTest instance) { this.instance = instance; } - public MapTest.Builder mapMapOfString(.annotation.Nullable Map> mapMapOfString) { + public MapTest.Builder mapMapOfString(Map> mapMapOfString) { this.instance.mapMapOfString = mapMapOfString; return this; } - public MapTest.Builder mapOfEnumString(.annotation.Nullable Map mapOfEnumString) { + public MapTest.Builder mapOfEnumString(Map mapOfEnumString) { this.instance.mapOfEnumString = mapOfEnumString; return this; } - public MapTest.Builder directMap(.annotation.Nullable Map directMap) { + public MapTest.Builder directMap(Map directMap) { this.instance.directMap = directMap; return this; } - public MapTest.Builder indirectMap(.annotation.Nullable Map indirectMap) { + public MapTest.Builder indirectMap(Map indirectMap) { this.instance.indirectMap = indirectMap; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 93a5ab6615da..3820f86e9f7c 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -239,15 +239,15 @@ protected Builder(MixedPropertiesAndAdditionalPropertiesClass instance) { this.instance = instance; } - public MixedPropertiesAndAdditionalPropertiesClass.Builder uuid(.annotation.Nullable UUID uuid) { + public MixedPropertiesAndAdditionalPropertiesClass.Builder uuid(UUID uuid) { this.instance.uuid = uuid; return this; } - public MixedPropertiesAndAdditionalPropertiesClass.Builder dateTime(.annotation.Nullable OffsetDateTime dateTime) { + public MixedPropertiesAndAdditionalPropertiesClass.Builder dateTime(OffsetDateTime dateTime) { this.instance.dateTime = dateTime; return this; } - public MixedPropertiesAndAdditionalPropertiesClass.Builder map(.annotation.Nullable Map map) { + public MixedPropertiesAndAdditionalPropertiesClass.Builder map(Map map) { this.instance.map = map; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Model200Response.java index 4b29d7aed3f9..ecb066765fe5 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Model200Response.java @@ -187,11 +187,11 @@ protected Builder(Model200Response instance) { this.instance = instance; } - public Model200Response.Builder name(.annotation.Nullable Integer name) { + public Model200Response.Builder name(Integer name) { this.instance.name = name; return this; } - public Model200Response.Builder propertyClass(.annotation.Nullable String propertyClass) { + public Model200Response.Builder propertyClass(String propertyClass) { this.instance.propertyClass = propertyClass; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 95cc24aa2a7e..76faf44224c4 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -222,15 +222,15 @@ protected Builder(ModelApiResponse instance) { this.instance = instance; } - public ModelApiResponse.Builder code(.annotation.Nullable Integer code) { + public ModelApiResponse.Builder code(Integer code) { this.instance.code = code; return this; } - public ModelApiResponse.Builder type(.annotation.Nullable String type) { + public ModelApiResponse.Builder type(String type) { this.instance.type = type; return this; } - public ModelApiResponse.Builder message(.annotation.Nullable String message) { + public ModelApiResponse.Builder message(String message) { this.instance.message = message; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ModelFile.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ModelFile.java index 333204ac0850..2dcaff602131 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ModelFile.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ModelFile.java @@ -152,7 +152,7 @@ protected Builder(ModelFile instance) { this.instance = instance; } - public ModelFile.Builder sourceURI(.annotation.Nullable String sourceURI) { + public ModelFile.Builder sourceURI(String sourceURI) { this.instance.sourceURI = sourceURI; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ModelList.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ModelList.java index 32553bd95401..1c641c1462f5 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ModelList.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ModelList.java @@ -152,7 +152,7 @@ protected Builder(ModelList instance) { this.instance = instance; } - public ModelList.Builder _123list(.annotation.Nullable String _123list) { + public ModelList.Builder _123list(String _123list) { this.instance._123list = _123list; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ModelReturn.java index b53a1767f101..264a6d166064 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -152,7 +152,7 @@ protected Builder(ModelReturn instance) { this.instance = instance; } - public ModelReturn.Builder _return(.annotation.Nullable Integer _return) { + public ModelReturn.Builder _return(Integer _return) { this.instance._return = _return; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Name.java index 0b076b56c53e..53e61cac8828 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Name.java @@ -246,19 +246,19 @@ protected Builder(Name instance) { this.instance = instance; } - public Name.Builder name(.annotation.Nonnull Integer name) { + public Name.Builder name(Integer name) { this.instance.name = name; return this; } - public Name.Builder snakeCase(.annotation.Nullable Integer snakeCase) { + public Name.Builder snakeCase(Integer snakeCase) { this.instance.snakeCase = snakeCase; return this; } - public Name.Builder property(.annotation.Nullable String property) { + public Name.Builder property(String property) { this.instance.property = property; return this; } - public Name.Builder _123number(.annotation.Nullable Integer _123number) { + public Name.Builder _123number(Integer _123number) { this.instance._123number = _123number; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/NullableClass.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/NullableClass.java index 174aec902f21..bd90a104ce0f 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/NullableClass.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/NullableClass.java @@ -663,51 +663,51 @@ protected Builder(NullableClass instance) { this.instance = instance; } - public NullableClass.Builder integerProp(.annotation.Nullable Integer integerProp) { + public NullableClass.Builder integerProp(Integer integerProp) { this.instance.integerProp = integerProp; return this; } - public NullableClass.Builder numberProp(.annotation.Nullable BigDecimal numberProp) { + public NullableClass.Builder numberProp(BigDecimal numberProp) { this.instance.numberProp = numberProp; return this; } - public NullableClass.Builder booleanProp(.annotation.Nullable Boolean booleanProp) { + public NullableClass.Builder booleanProp(Boolean booleanProp) { this.instance.booleanProp = booleanProp; return this; } - public NullableClass.Builder stringProp(.annotation.Nullable String stringProp) { + public NullableClass.Builder stringProp(String stringProp) { this.instance.stringProp = stringProp; return this; } - public NullableClass.Builder dateProp(.annotation.Nullable LocalDate dateProp) { + public NullableClass.Builder dateProp(LocalDate dateProp) { this.instance.dateProp = dateProp; return this; } - public NullableClass.Builder datetimeProp(.annotation.Nullable OffsetDateTime datetimeProp) { + public NullableClass.Builder datetimeProp(OffsetDateTime datetimeProp) { this.instance.datetimeProp = datetimeProp; return this; } - public NullableClass.Builder arrayNullableProp(.annotation.Nullable List arrayNullableProp) { + public NullableClass.Builder arrayNullableProp(List arrayNullableProp) { this.instance.arrayNullableProp = arrayNullableProp; return this; } - public NullableClass.Builder arrayAndItemsNullableProp(.annotation.Nullable List arrayAndItemsNullableProp) { + public NullableClass.Builder arrayAndItemsNullableProp(List arrayAndItemsNullableProp) { this.instance.arrayAndItemsNullableProp = arrayAndItemsNullableProp; return this; } - public NullableClass.Builder arrayItemsNullable(.annotation.Nullable List arrayItemsNullable) { + public NullableClass.Builder arrayItemsNullable(List arrayItemsNullable) { this.instance.arrayItemsNullable = arrayItemsNullable; return this; } - public NullableClass.Builder objectNullableProp(.annotation.Nullable Map objectNullableProp) { + public NullableClass.Builder objectNullableProp(Map objectNullableProp) { this.instance.objectNullableProp = objectNullableProp; return this; } - public NullableClass.Builder objectAndItemsNullableProp(.annotation.Nullable Map objectAndItemsNullableProp) { + public NullableClass.Builder objectAndItemsNullableProp(Map objectAndItemsNullableProp) { this.instance.objectAndItemsNullableProp = objectAndItemsNullableProp; return this; } - public NullableClass.Builder objectItemsNullable(.annotation.Nullable Map objectItemsNullable) { + public NullableClass.Builder objectItemsNullable(Map objectItemsNullable) { this.instance.objectItemsNullable = objectItemsNullable; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/NumberOnly.java index 069d54e9fc12..64c62b2dae0b 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -152,7 +152,7 @@ protected Builder(NumberOnly instance) { this.instance = instance; } - public NumberOnly.Builder justNumber(.annotation.Nullable BigDecimal justNumber) { + public NumberOnly.Builder justNumber(BigDecimal justNumber) { this.instance.justNumber = justNumber; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java index ff01eb413d3e..dc3833479d46 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java @@ -278,19 +278,19 @@ protected Builder(ObjectWithDeprecatedFields instance) { this.instance = instance; } - public ObjectWithDeprecatedFields.Builder uuid(.annotation.Nullable String uuid) { + public ObjectWithDeprecatedFields.Builder uuid(String uuid) { this.instance.uuid = uuid; return this; } - public ObjectWithDeprecatedFields.Builder id(.annotation.Nullable BigDecimal id) { + public ObjectWithDeprecatedFields.Builder id(BigDecimal id) { this.instance.id = id; return this; } - public ObjectWithDeprecatedFields.Builder deprecatedRef(.annotation.Nullable DeprecatedObject deprecatedRef) { + public ObjectWithDeprecatedFields.Builder deprecatedRef(DeprecatedObject deprecatedRef) { this.instance.deprecatedRef = deprecatedRef; return this; } - public ObjectWithDeprecatedFields.Builder bars(.annotation.Nullable List bars) { + public ObjectWithDeprecatedFields.Builder bars(List bars) { this.instance.bars = bars; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Order.java index dfe8c2f0d30d..ccaa845a3099 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Order.java @@ -364,27 +364,27 @@ protected Builder(Order instance) { this.instance = instance; } - public Order.Builder id(.annotation.Nullable Long id) { + public Order.Builder id(Long id) { this.instance.id = id; return this; } - public Order.Builder petId(.annotation.Nullable Long petId) { + public Order.Builder petId(Long petId) { this.instance.petId = petId; return this; } - public Order.Builder quantity(.annotation.Nullable Integer quantity) { + public Order.Builder quantity(Integer quantity) { this.instance.quantity = quantity; return this; } - public Order.Builder shipDate(.annotation.Nullable OffsetDateTime shipDate) { + public Order.Builder shipDate(OffsetDateTime shipDate) { this.instance.shipDate = shipDate; return this; } - public Order.Builder status(.annotation.Nullable StatusEnum status) { + public Order.Builder status(StatusEnum status) { this.instance.status = status; return this; } - public Order.Builder complete(.annotation.Nullable Boolean complete) { + public Order.Builder complete(Boolean complete) { this.instance.complete = complete; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/OuterComposite.java index d4383f5759fe..992cc1d43551 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -222,15 +222,15 @@ protected Builder(OuterComposite instance) { this.instance = instance; } - public OuterComposite.Builder myNumber(.annotation.Nullable BigDecimal myNumber) { + public OuterComposite.Builder myNumber(BigDecimal myNumber) { this.instance.myNumber = myNumber; return this; } - public OuterComposite.Builder myString(.annotation.Nullable String myString) { + public OuterComposite.Builder myString(String myString) { this.instance.myString = myString; return this; } - public OuterComposite.Builder myBoolean(.annotation.Nullable Boolean myBoolean) { + public OuterComposite.Builder myBoolean(Boolean myBoolean) { this.instance.myBoolean = myBoolean; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ParentPet.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ParentPet.java index 49757ed2e18b..91bfcfc1f3a5 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ParentPet.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ParentPet.java @@ -151,7 +151,7 @@ protected Builder(ParentPet instance) { } - public ParentPet.Builder petType(.annotation.Nonnull String petType) { // inherited: true + public ParentPet.Builder petType(String petType) { // inherited: true super.petType(petType); return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Pet.java index 594b1ea4a63f..b00fac78c5f8 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Pet.java @@ -392,27 +392,27 @@ protected Builder(Pet instance) { this.instance = instance; } - public Pet.Builder id(.annotation.Nullable Long id) { + public Pet.Builder id(Long id) { this.instance.id = id; return this; } - public Pet.Builder category(.annotation.Nullable Category category) { + public Pet.Builder category(Category category) { this.instance.category = category; return this; } - public Pet.Builder name(.annotation.Nonnull String name) { + public Pet.Builder name(String name) { this.instance.name = name; return this; } - public Pet.Builder photoUrls(.annotation.Nonnull List photoUrls) { + public Pet.Builder photoUrls(List photoUrls) { this.instance.photoUrls = photoUrls; return this; } - public Pet.Builder tags(.annotation.Nullable List tags) { + public Pet.Builder tags(List tags) { this.instance.tags = tags; return this; } - public Pet.Builder status(.annotation.Nullable StatusEnum status) { + public Pet.Builder status(StatusEnum status) { this.instance.status = status; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java index 0bb1ebdf6b4b..abe1ae566901 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java @@ -151,7 +151,7 @@ protected Builder(QuadrilateralInterface instance) { this.instance = instance; } - public QuadrilateralInterface.Builder quadrilateralType(.annotation.Nonnull String quadrilateralType) { + public QuadrilateralInterface.Builder quadrilateralType(String quadrilateralType) { this.instance.quadrilateralType = quadrilateralType; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index 8090dcbcab63..9708cc602094 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -184,11 +184,11 @@ protected Builder(ReadOnlyFirst instance) { this.instance = instance; } - public ReadOnlyFirst.Builder bar(.annotation.Nullable String bar) { + public ReadOnlyFirst.Builder bar(String bar) { this.instance.bar = bar; return this; } - public ReadOnlyFirst.Builder baz(.annotation.Nullable String baz) { + public ReadOnlyFirst.Builder baz(String baz) { this.instance.baz = baz; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ScaleneTriangle.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ScaleneTriangle.java index 36b8752eead0..b59477331c47 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ScaleneTriangle.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ScaleneTriangle.java @@ -186,11 +186,11 @@ protected Builder(ScaleneTriangle instance) { this.instance = instance; } - public ScaleneTriangle.Builder shapeType(.annotation.Nonnull String shapeType) { + public ScaleneTriangle.Builder shapeType(String shapeType) { this.instance.shapeType = shapeType; return this; } - public ScaleneTriangle.Builder triangleType(.annotation.Nonnull String triangleType) { + public ScaleneTriangle.Builder triangleType(String triangleType) { this.instance.triangleType = triangleType; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ShapeInterface.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ShapeInterface.java index e1f53d8c6aaf..af6d502112ed 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ShapeInterface.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/ShapeInterface.java @@ -151,7 +151,7 @@ protected Builder(ShapeInterface instance) { this.instance = instance; } - public ShapeInterface.Builder shapeType(.annotation.Nonnull String shapeType) { + public ShapeInterface.Builder shapeType(String shapeType) { this.instance.shapeType = shapeType; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java index 54c721d66ea6..dd52c0e4a240 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java @@ -186,11 +186,11 @@ protected Builder(SimpleQuadrilateral instance) { this.instance = instance; } - public SimpleQuadrilateral.Builder shapeType(.annotation.Nonnull String shapeType) { + public SimpleQuadrilateral.Builder shapeType(String shapeType) { this.instance.shapeType = shapeType; return this; } - public SimpleQuadrilateral.Builder quadrilateralType(.annotation.Nonnull String quadrilateralType) { + public SimpleQuadrilateral.Builder quadrilateralType(String quadrilateralType) { this.instance.quadrilateralType = quadrilateralType; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/SpecialModelName.java index 7f91aeaefdca..f50d14a4114e 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -187,11 +187,11 @@ protected Builder(SpecialModelName instance) { this.instance = instance; } - public SpecialModelName.Builder $specialPropertyName(.annotation.Nullable Long $specialPropertyName) { + public SpecialModelName.Builder $specialPropertyName(Long $specialPropertyName) { this.instance.$specialPropertyName = $specialPropertyName; return this; } - public SpecialModelName.Builder specialModelName(.annotation.Nullable String specialModelName) { + public SpecialModelName.Builder specialModelName(String specialModelName) { this.instance.specialModelName = specialModelName; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Tag.java index c97572aac21b..7622555ba015 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Tag.java @@ -186,11 +186,11 @@ protected Builder(Tag instance) { this.instance = instance; } - public Tag.Builder id(.annotation.Nullable Long id) { + public Tag.Builder id(Long id) { this.instance.id = id; return this; } - public Tag.Builder name(.annotation.Nullable String name) { + public Tag.Builder name(String name) { this.instance.name = name; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java index 53f3de5d9e3d..57573b14117e 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java @@ -200,7 +200,7 @@ protected Builder(TestInlineFreeformAdditionalPropertiesRequest instance) { this.instance = instance; } - public TestInlineFreeformAdditionalPropertiesRequest.Builder someProperty(.annotation.Nullable String someProperty) { + public TestInlineFreeformAdditionalPropertiesRequest.Builder someProperty(String someProperty) { this.instance.someProperty = someProperty; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/TriangleInterface.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/TriangleInterface.java index c14fa6ebeae2..4d8e5fcc0c5a 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/TriangleInterface.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/TriangleInterface.java @@ -151,7 +151,7 @@ protected Builder(TriangleInterface instance) { this.instance = instance; } - public TriangleInterface.Builder triangleType(.annotation.Nonnull String triangleType) { + public TriangleInterface.Builder triangleType(String triangleType) { this.instance.triangleType = triangleType; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/User.java index c23b7868d596..1b556540570e 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/User.java @@ -536,51 +536,51 @@ protected Builder(User instance) { this.instance = instance; } - public User.Builder id(.annotation.Nullable Long id) { + public User.Builder id(Long id) { this.instance.id = id; return this; } - public User.Builder username(.annotation.Nullable String username) { + public User.Builder username(String username) { this.instance.username = username; return this; } - public User.Builder firstName(.annotation.Nullable String firstName) { + public User.Builder firstName(String firstName) { this.instance.firstName = firstName; return this; } - public User.Builder lastName(.annotation.Nullable String lastName) { + public User.Builder lastName(String lastName) { this.instance.lastName = lastName; return this; } - public User.Builder email(.annotation.Nullable String email) { + public User.Builder email(String email) { this.instance.email = email; return this; } - public User.Builder password(.annotation.Nullable String password) { + public User.Builder password(String password) { this.instance.password = password; return this; } - public User.Builder phone(.annotation.Nullable String phone) { + public User.Builder phone(String phone) { this.instance.phone = phone; return this; } - public User.Builder userStatus(.annotation.Nullable Integer userStatus) { + public User.Builder userStatus(Integer userStatus) { this.instance.userStatus = userStatus; return this; } - public User.Builder objectWithNoDeclaredProps(.annotation.Nullable Object objectWithNoDeclaredProps) { + public User.Builder objectWithNoDeclaredProps(Object objectWithNoDeclaredProps) { this.instance.objectWithNoDeclaredProps = objectWithNoDeclaredProps; return this; } - public User.Builder objectWithNoDeclaredPropsNullable(.annotation.Nullable Object objectWithNoDeclaredPropsNullable) { + public User.Builder objectWithNoDeclaredPropsNullable(Object objectWithNoDeclaredPropsNullable) { this.instance.objectWithNoDeclaredPropsNullable = objectWithNoDeclaredPropsNullable; return this; } - public User.Builder anyTypeProp(.annotation.Nullable Object anyTypeProp) { + public User.Builder anyTypeProp(Object anyTypeProp) { this.instance.anyTypeProp = anyTypeProp; return this; } - public User.Builder anyTypePropNullable(.annotation.Nullable Object anyTypePropNullable) { + public User.Builder anyTypePropNullable(Object anyTypePropNullable) { this.instance.anyTypePropNullable = anyTypePropNullable; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Whale.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Whale.java index 6b5e75bc994b..27fe86483e0e 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Whale.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Whale.java @@ -222,15 +222,15 @@ protected Builder(Whale instance) { this.instance = instance; } - public Whale.Builder hasBaleen(.annotation.Nullable Boolean hasBaleen) { + public Whale.Builder hasBaleen(Boolean hasBaleen) { this.instance.hasBaleen = hasBaleen; return this; } - public Whale.Builder hasTeeth(.annotation.Nullable Boolean hasTeeth) { + public Whale.Builder hasTeeth(Boolean hasTeeth) { this.instance.hasTeeth = hasTeeth; return this; } - public Whale.Builder className(.annotation.Nonnull String className) { + public Whale.Builder className(String className) { this.instance.className = className; return this; } diff --git a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Zebra.java b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Zebra.java index 32a6002496bc..2741cd52c14f 100644 --- a/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Zebra.java +++ b/samples/client/petstore/java/native-jackson3/src/main/java/org/openapitools/client/model/Zebra.java @@ -272,11 +272,11 @@ protected Builder(Zebra instance) { this.instance = instance; } - public Zebra.Builder type(.annotation.Nullable TypeEnum type) { + public Zebra.Builder type(TypeEnum type) { this.instance.type = type; return this; } - public Zebra.Builder className(.annotation.Nonnull String className) { + public Zebra.Builder className(String className) { this.instance.className = className; return this; } diff --git a/samples/client/petstore/java/native-jakarta/git_push.sh b/samples/client/petstore/java/native-jakarta/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/native-jakarta/git_push.sh +++ b/samples/client/petstore/java/native-jakarta/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/native-useGzipFeature/git_push.sh b/samples/client/petstore/java/native-useGzipFeature/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/native-useGzipFeature/git_push.sh +++ b/samples/client/petstore/java/native-useGzipFeature/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/ServerConfiguration.java index e69de29bb2d1..66eef5d718f2 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/ServerConfiguration.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/ServerConfiguration.java @@ -0,0 +1,72 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client; + +import java.util.Map; + +/** + * Representing a Server configuration. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.25.0-SNAPSHOT") +public class ServerConfiguration { + public String URL; + public String description; + public Map variables; + + /** + * @param URL A URL to the target host. + * @param description A description of the host designated by the URL. + * @param variables A map between a variable name and its value. The value is used for substitution in the server's URL template. + */ + public ServerConfiguration(String URL, String description, Map variables) { + this.URL = URL; + this.description = description; + this.variables = variables; + } + + /** + * Format URL template using given variables. + * + * @param variables A map between a variable name and its value. + * @return Formatted URL. + */ + public String URL(Map variables) { + String url = this.URL; + + // go through variables and replace placeholders + for (Map.Entry variable: this.variables.entrySet()) { + String name = variable.getKey(); + ServerVariable serverVariable = variable.getValue(); + String value = serverVariable.defaultValue; + + if (variables != null && variables.containsKey(name)) { + value = variables.get(name); + if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { + throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); + } + } + url = url.replace("{" + name + "}", value); + } + return url; + } + + /** + * Format URL template using default server variables. + * + * @return Formatted URL. + */ + public String URL() { + return URL(null); + } +} diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index d7306e670546..de2ec70ff657 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -469,15 +469,15 @@ protected Builder(AdditionalPropertiesClass instance) { this.instance = instance; } - public AdditionalPropertiesClass.Builder mapProperty(.annotation.Nullable Map mapProperty) { + public AdditionalPropertiesClass.Builder mapProperty(Map mapProperty) { this.instance.mapProperty = mapProperty; return this; } - public AdditionalPropertiesClass.Builder mapOfMapProperty(.annotation.Nullable Map> mapOfMapProperty) { + public AdditionalPropertiesClass.Builder mapOfMapProperty(Map> mapOfMapProperty) { this.instance.mapOfMapProperty = mapOfMapProperty; return this; } - public AdditionalPropertiesClass.Builder anytype1(.annotation.Nullable Object anytype1) { + public AdditionalPropertiesClass.Builder anytype1(Object anytype1) { this.instance.anytype1 = JsonNullable.of(anytype1); return this; } @@ -485,23 +485,23 @@ public AdditionalPropertiesClass.Builder anytype1(JsonNullable anytype1) this.instance.anytype1 = anytype1; return this; } - public AdditionalPropertiesClass.Builder mapWithUndeclaredPropertiesAnytype1(.annotation.Nullable Object mapWithUndeclaredPropertiesAnytype1) { + public AdditionalPropertiesClass.Builder mapWithUndeclaredPropertiesAnytype1(Object mapWithUndeclaredPropertiesAnytype1) { this.instance.mapWithUndeclaredPropertiesAnytype1 = mapWithUndeclaredPropertiesAnytype1; return this; } - public AdditionalPropertiesClass.Builder mapWithUndeclaredPropertiesAnytype2(.annotation.Nullable Object mapWithUndeclaredPropertiesAnytype2) { + public AdditionalPropertiesClass.Builder mapWithUndeclaredPropertiesAnytype2(Object mapWithUndeclaredPropertiesAnytype2) { this.instance.mapWithUndeclaredPropertiesAnytype2 = mapWithUndeclaredPropertiesAnytype2; return this; } - public AdditionalPropertiesClass.Builder mapWithUndeclaredPropertiesAnytype3(.annotation.Nullable Map mapWithUndeclaredPropertiesAnytype3) { + public AdditionalPropertiesClass.Builder mapWithUndeclaredPropertiesAnytype3(Map mapWithUndeclaredPropertiesAnytype3) { this.instance.mapWithUndeclaredPropertiesAnytype3 = mapWithUndeclaredPropertiesAnytype3; return this; } - public AdditionalPropertiesClass.Builder emptyMap(.annotation.Nullable Object emptyMap) { + public AdditionalPropertiesClass.Builder emptyMap(Object emptyMap) { this.instance.emptyMap = emptyMap; return this; } - public AdditionalPropertiesClass.Builder mapWithUndeclaredPropertiesString(.annotation.Nullable Map mapWithUndeclaredPropertiesString) { + public AdditionalPropertiesClass.Builder mapWithUndeclaredPropertiesString(Map mapWithUndeclaredPropertiesString) { this.instance.mapWithUndeclaredPropertiesString = mapWithUndeclaredPropertiesString; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AllOfRefToDouble.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AllOfRefToDouble.java index 0c0300fb104c..72d94bfb1aac 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AllOfRefToDouble.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AllOfRefToDouble.java @@ -152,7 +152,7 @@ protected Builder(AllOfRefToDouble instance) { this.instance = instance; } - public AllOfRefToDouble.Builder height(.annotation.Nullable Double height) { + public AllOfRefToDouble.Builder height(Double height) { this.instance.height = height; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AllOfRefToFloat.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AllOfRefToFloat.java index 5b6644c2904e..1def0c41ea6e 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AllOfRefToFloat.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AllOfRefToFloat.java @@ -152,7 +152,7 @@ protected Builder(AllOfRefToFloat instance) { this.instance = instance; } - public AllOfRefToFloat.Builder weight(.annotation.Nullable Float weight) { + public AllOfRefToFloat.Builder weight(Float weight) { this.instance.weight = weight; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AllOfRefToLong.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AllOfRefToLong.java index 13cc3ba9d307..79ef965f8481 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AllOfRefToLong.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AllOfRefToLong.java @@ -152,7 +152,7 @@ protected Builder(AllOfRefToLong instance) { this.instance = instance; } - public AllOfRefToLong.Builder id(.annotation.Nullable Long id) { + public AllOfRefToLong.Builder id(Long id) { this.instance.id = id; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Animal.java index 8932606c81c1..e7c9fa66016d 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Animal.java @@ -209,11 +209,11 @@ protected Builder(Animal instance) { this.instance = instance; } - public Animal.Builder className(.annotation.Nonnull String className) { + public Animal.Builder className(String className) { this.instance.className = className; return this; } - public Animal.Builder color(.annotation.Nullable String color) { + public Animal.Builder color(String color) { this.instance.color = color; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Apple.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Apple.java index da6d7d83c5cd..0b4b53547a20 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Apple.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Apple.java @@ -187,11 +187,11 @@ protected Builder(Apple instance) { this.instance = instance; } - public Apple.Builder cultivar(.annotation.Nullable String cultivar) { + public Apple.Builder cultivar(String cultivar) { this.instance.cultivar = cultivar; return this; } - public Apple.Builder origin(.annotation.Nullable String origin) { + public Apple.Builder origin(String origin) { this.instance.origin = origin; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AppleReq.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AppleReq.java index 3b5fd69687b2..f6d6ce511aad 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AppleReq.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AppleReq.java @@ -187,11 +187,11 @@ protected Builder(AppleReq instance) { this.instance = instance; } - public AppleReq.Builder cultivar(.annotation.Nonnull String cultivar) { + public AppleReq.Builder cultivar(String cultivar) { this.instance.cultivar = cultivar; return this; } - public AppleReq.Builder mealy(.annotation.Nullable Boolean mealy) { + public AppleReq.Builder mealy(Boolean mealy) { this.instance.mealy = mealy; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index ac77825cf836..15ede6766927 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -169,7 +169,7 @@ protected Builder(ArrayOfArrayOfNumberOnly instance) { this.instance = instance; } - public ArrayOfArrayOfNumberOnly.Builder arrayArrayNumber(.annotation.Nullable List> arrayArrayNumber) { + public ArrayOfArrayOfNumberOnly.Builder arrayArrayNumber(List> arrayArrayNumber) { this.instance.arrayArrayNumber = arrayArrayNumber; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index dd18f5d7d857..8abcfdb4057c 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -169,7 +169,7 @@ protected Builder(ArrayOfNumberOnly instance) { this.instance = instance; } - public ArrayOfNumberOnly.Builder arrayNumber(.annotation.Nullable List arrayNumber) { + public ArrayOfNumberOnly.Builder arrayNumber(List arrayNumber) { this.instance.arrayNumber = arrayNumber; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ArrayTest.java index 7824fe6269d8..e7aa10848fbb 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -263,15 +263,15 @@ protected Builder(ArrayTest instance) { this.instance = instance; } - public ArrayTest.Builder arrayOfString(.annotation.Nullable List arrayOfString) { + public ArrayTest.Builder arrayOfString(List arrayOfString) { this.instance.arrayOfString = arrayOfString; return this; } - public ArrayTest.Builder arrayArrayOfInteger(.annotation.Nullable List> arrayArrayOfInteger) { + public ArrayTest.Builder arrayArrayOfInteger(List> arrayArrayOfInteger) { this.instance.arrayArrayOfInteger = arrayArrayOfInteger; return this; } - public ArrayTest.Builder arrayArrayOfModel(.annotation.Nullable List> arrayArrayOfModel) { + public ArrayTest.Builder arrayArrayOfModel(List> arrayArrayOfModel) { this.instance.arrayArrayOfModel = arrayArrayOfModel; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Banana.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Banana.java index b2873dd3de70..22c7aac756fe 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Banana.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Banana.java @@ -153,7 +153,7 @@ protected Builder(Banana instance) { this.instance = instance; } - public Banana.Builder lengthCm(.annotation.Nullable BigDecimal lengthCm) { + public Banana.Builder lengthCm(BigDecimal lengthCm) { this.instance.lengthCm = lengthCm; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/BananaReq.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/BananaReq.java index 6332ebd6b485..b59b514ac92d 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/BananaReq.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/BananaReq.java @@ -188,11 +188,11 @@ protected Builder(BananaReq instance) { this.instance = instance; } - public BananaReq.Builder lengthCm(.annotation.Nonnull BigDecimal lengthCm) { + public BananaReq.Builder lengthCm(BigDecimal lengthCm) { this.instance.lengthCm = lengthCm; return this; } - public BananaReq.Builder sweet(.annotation.Nullable Boolean sweet) { + public BananaReq.Builder sweet(Boolean sweet) { this.instance.sweet = sweet; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/BasquePig.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/BasquePig.java index bd35d75ee36d..f27ec30bebc6 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/BasquePig.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/BasquePig.java @@ -152,7 +152,7 @@ protected Builder(BasquePig instance) { this.instance = instance; } - public BasquePig.Builder className(.annotation.Nonnull String className) { + public BasquePig.Builder className(String className) { this.instance.className = className; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Capitalization.java index 7c4b5e835ec9..39819b34e472 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Capitalization.java @@ -327,27 +327,27 @@ protected Builder(Capitalization instance) { this.instance = instance; } - public Capitalization.Builder smallCamel(.annotation.Nullable String smallCamel) { + public Capitalization.Builder smallCamel(String smallCamel) { this.instance.smallCamel = smallCamel; return this; } - public Capitalization.Builder capitalCamel(.annotation.Nullable String capitalCamel) { + public Capitalization.Builder capitalCamel(String capitalCamel) { this.instance.capitalCamel = capitalCamel; return this; } - public Capitalization.Builder smallSnake(.annotation.Nullable String smallSnake) { + public Capitalization.Builder smallSnake(String smallSnake) { this.instance.smallSnake = smallSnake; return this; } - public Capitalization.Builder capitalSnake(.annotation.Nullable String capitalSnake) { + public Capitalization.Builder capitalSnake(String capitalSnake) { this.instance.capitalSnake = capitalSnake; return this; } - public Capitalization.Builder scAETHFlowPoints(.annotation.Nullable String scAETHFlowPoints) { + public Capitalization.Builder scAETHFlowPoints(String scAETHFlowPoints) { this.instance.scAETHFlowPoints = scAETHFlowPoints; return this; } - public Capitalization.Builder ATT_NAME(.annotation.Nullable String ATT_NAME) { + public Capitalization.Builder ATT_NAME(String ATT_NAME) { this.instance.ATT_NAME = ATT_NAME; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Cat.java index bc7ee0ea5e7d..3d5657de1dec 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Cat.java @@ -194,17 +194,17 @@ protected Builder(Cat instance) { this.instance = instance; } - public Cat.Builder declawed(.annotation.Nullable Boolean declawed) { + public Cat.Builder declawed(Boolean declawed) { this.instance.declawed = declawed; return this; } - public Cat.Builder className(.annotation.Nonnull String className) { // inherited: true + public Cat.Builder className(String className) { // inherited: true super.className(className); return this; } - public Cat.Builder color(.annotation.Nullable String color) { // inherited: true + public Cat.Builder color(String color) { // inherited: true super.color(color); return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Category.java index 85eff1e7e8b0..abbdd18d57da 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Category.java @@ -187,11 +187,11 @@ protected Builder(Category instance) { this.instance = instance; } - public Category.Builder id(.annotation.Nullable Long id) { + public Category.Builder id(Long id) { this.instance.id = id; return this; } - public Category.Builder name(.annotation.Nonnull String name) { + public Category.Builder name(String name) { this.instance.name = name; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ChildCat.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ChildCat.java index 9fef108867fc..83478757e92e 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ChildCat.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ChildCat.java @@ -220,11 +220,11 @@ protected Builder(ChildCat instance) { this.instance = instance; } - public ChildCat.Builder name(.annotation.Nullable String name) { + public ChildCat.Builder name(String name) { this.instance.name = name; return this; } - public ChildCat.Builder petType(.annotation.Nullable String petType) { + public ChildCat.Builder petType(String petType) { this.instance.petType = petType; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ClassModel.java index cdc6a5229606..549b765474e6 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ClassModel.java @@ -152,7 +152,7 @@ protected Builder(ClassModel instance) { this.instance = instance; } - public ClassModel.Builder propertyClass(.annotation.Nullable String propertyClass) { + public ClassModel.Builder propertyClass(String propertyClass) { this.instance.propertyClass = propertyClass; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Client.java index ac3ad0f61723..924cf7f1ff99 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Client.java @@ -152,7 +152,7 @@ protected Builder(Client instance) { this.instance = instance; } - public Client.Builder client(.annotation.Nullable String client) { + public Client.Builder client(String client) { this.instance.client = client; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java index 89e93a2fbe47..22a04f2e017f 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java @@ -187,11 +187,11 @@ protected Builder(ComplexQuadrilateral instance) { this.instance = instance; } - public ComplexQuadrilateral.Builder shapeType(.annotation.Nonnull String shapeType) { + public ComplexQuadrilateral.Builder shapeType(String shapeType) { this.instance.shapeType = shapeType; return this; } - public ComplexQuadrilateral.Builder quadrilateralType(.annotation.Nonnull String quadrilateralType) { + public ComplexQuadrilateral.Builder quadrilateralType(String quadrilateralType) { this.instance.quadrilateralType = quadrilateralType; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/DanishPig.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/DanishPig.java index 19cbf55f5b6e..7d49c20a5559 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/DanishPig.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/DanishPig.java @@ -152,7 +152,7 @@ protected Builder(DanishPig instance) { this.instance = instance; } - public DanishPig.Builder className(.annotation.Nonnull String className) { + public DanishPig.Builder className(String className) { this.instance.className = className; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/DeprecatedObject.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/DeprecatedObject.java index 34ea268f5278..66a13d0d6f0c 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/DeprecatedObject.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/DeprecatedObject.java @@ -154,7 +154,7 @@ protected Builder(DeprecatedObject instance) { this.instance = instance; } - public DeprecatedObject.Builder name(.annotation.Nullable String name) { + public DeprecatedObject.Builder name(String name) { this.instance.name = name; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Dog.java index 6a93620ede9f..e5fdf8ade86b 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Dog.java @@ -193,17 +193,17 @@ protected Builder(Dog instance) { this.instance = instance; } - public Dog.Builder breed(.annotation.Nullable String breed) { + public Dog.Builder breed(String breed) { this.instance.breed = breed; return this; } - public Dog.Builder className(.annotation.Nonnull String className) { // inherited: true + public Dog.Builder className(String className) { // inherited: true super.className(className); return this; } - public Dog.Builder color(.annotation.Nullable String color) { // inherited: true + public Dog.Builder color(String color) { // inherited: true super.color(color); return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Drawing.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Drawing.java index bad9583814e1..dae37f481a87 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Drawing.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Drawing.java @@ -346,15 +346,15 @@ protected Builder(Drawing instance) { this.instance = instance; } - public Drawing.Builder mainShape(.annotation.Nullable Shape mainShape) { + public Drawing.Builder mainShape(Shape mainShape) { this.instance.mainShape = mainShape; return this; } - public Drawing.Builder shapeOrNull(.annotation.Nullable ShapeOrNull shapeOrNull) { + public Drawing.Builder shapeOrNull(ShapeOrNull shapeOrNull) { this.instance.shapeOrNull = shapeOrNull; return this; } - public Drawing.Builder nullableShape(.annotation.Nullable NullableShape nullableShape) { + public Drawing.Builder nullableShape(NullableShape nullableShape) { this.instance.nullableShape = JsonNullable.of(nullableShape); return this; } @@ -362,7 +362,7 @@ public Drawing.Builder nullableShape(JsonNullable nullableShape) this.instance.nullableShape = nullableShape; return this; } - public Drawing.Builder shapes(.annotation.Nullable List shapes) { + public Drawing.Builder shapes(List shapes) { this.instance.shapes = shapes; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EnumArrays.java index 87e6411a8d4a..51007e9492f6 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -271,11 +271,11 @@ protected Builder(EnumArrays instance) { this.instance = instance; } - public EnumArrays.Builder justSymbol(.annotation.Nullable JustSymbolEnum justSymbol) { + public EnumArrays.Builder justSymbol(JustSymbolEnum justSymbol) { this.instance.justSymbol = justSymbol; return this; } - public EnumArrays.Builder arrayEnum(.annotation.Nullable List arrayEnum) { + public EnumArrays.Builder arrayEnum(List arrayEnum) { this.instance.arrayEnum = arrayEnum; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EnumTest.java index 85df87833506..79a0a41d004d 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EnumTest.java @@ -637,27 +637,27 @@ protected Builder(EnumTest instance) { this.instance = instance; } - public EnumTest.Builder enumString(.annotation.Nullable EnumStringEnum enumString) { + public EnumTest.Builder enumString(EnumStringEnum enumString) { this.instance.enumString = enumString; return this; } - public EnumTest.Builder enumStringRequired(.annotation.Nonnull EnumStringRequiredEnum enumStringRequired) { + public EnumTest.Builder enumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.instance.enumStringRequired = enumStringRequired; return this; } - public EnumTest.Builder enumInteger(.annotation.Nullable EnumIntegerEnum enumInteger) { + public EnumTest.Builder enumInteger(EnumIntegerEnum enumInteger) { this.instance.enumInteger = enumInteger; return this; } - public EnumTest.Builder enumIntegerOnly(.annotation.Nullable EnumIntegerOnlyEnum enumIntegerOnly) { + public EnumTest.Builder enumIntegerOnly(EnumIntegerOnlyEnum enumIntegerOnly) { this.instance.enumIntegerOnly = enumIntegerOnly; return this; } - public EnumTest.Builder enumNumber(.annotation.Nullable EnumNumberEnum enumNumber) { + public EnumTest.Builder enumNumber(EnumNumberEnum enumNumber) { this.instance.enumNumber = enumNumber; return this; } - public EnumTest.Builder outerEnum(.annotation.Nullable OuterEnum outerEnum) { + public EnumTest.Builder outerEnum(OuterEnum outerEnum) { this.instance.outerEnum = JsonNullable.of(outerEnum); return this; } @@ -665,15 +665,15 @@ public EnumTest.Builder outerEnum(JsonNullable outerEnum) { this.instance.outerEnum = outerEnum; return this; } - public EnumTest.Builder outerEnumInteger(.annotation.Nullable OuterEnumInteger outerEnumInteger) { + public EnumTest.Builder outerEnumInteger(OuterEnumInteger outerEnumInteger) { this.instance.outerEnumInteger = outerEnumInteger; return this; } - public EnumTest.Builder outerEnumDefaultValue(.annotation.Nullable OuterEnumDefaultValue outerEnumDefaultValue) { + public EnumTest.Builder outerEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) { this.instance.outerEnumDefaultValue = outerEnumDefaultValue; return this; } - public EnumTest.Builder outerEnumIntegerDefaultValue(.annotation.Nullable OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) { + public EnumTest.Builder outerEnumIntegerDefaultValue(OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) { this.instance.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EquilateralTriangle.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EquilateralTriangle.java index 4026d1174628..9a6e47fd513b 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EquilateralTriangle.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EquilateralTriangle.java @@ -187,11 +187,11 @@ protected Builder(EquilateralTriangle instance) { this.instance = instance; } - public EquilateralTriangle.Builder shapeType(.annotation.Nonnull String shapeType) { + public EquilateralTriangle.Builder shapeType(String shapeType) { this.instance.shapeType = shapeType; return this; } - public EquilateralTriangle.Builder triangleType(.annotation.Nonnull String triangleType) { + public EquilateralTriangle.Builder triangleType(String triangleType) { this.instance.triangleType = triangleType; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java index 2db6a029bac5..e614facce5c0 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java @@ -202,11 +202,11 @@ protected Builder(FakeBigDecimalMap200Response instance) { this.instance = instance; } - public FakeBigDecimalMap200Response.Builder someId(.annotation.Nullable BigDecimal someId) { + public FakeBigDecimalMap200Response.Builder someId(BigDecimal someId) { this.instance.someId = someId; return this; } - public FakeBigDecimalMap200Response.Builder someMap(.annotation.Nullable Map someMap) { + public FakeBigDecimalMap200Response.Builder someMap(Map someMap) { this.instance.someMap = someMap; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 839a77774140..d2c43b30b05c 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -203,11 +203,11 @@ protected Builder(FileSchemaTestClass instance) { this.instance = instance; } - public FileSchemaTestClass.Builder _file(.annotation.Nullable ModelFile _file) { + public FileSchemaTestClass.Builder _file(ModelFile _file) { this.instance._file = _file; return this; } - public FileSchemaTestClass.Builder files(.annotation.Nullable List files) { + public FileSchemaTestClass.Builder files(List files) { this.instance.files = files; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Foo.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Foo.java index ffdaa332f82d..04cc9397fb66 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Foo.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Foo.java @@ -152,7 +152,7 @@ protected Builder(Foo instance) { this.instance = instance; } - public Foo.Builder bar(.annotation.Nullable String bar) { + public Foo.Builder bar(String bar) { this.instance.bar = bar; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java index 3c5f66d3350a..dcee9e7ef88d 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java @@ -153,7 +153,7 @@ protected Builder(FooGetDefaultResponse instance) { this.instance = instance; } - public FooGetDefaultResponse.Builder string(.annotation.Nullable Foo string) { + public FooGetDefaultResponse.Builder string(Foo string) { this.instance.string = string; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FormatTest.java index 88ea68cb714b..90598c74de3f 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FormatTest.java @@ -692,67 +692,67 @@ protected Builder(FormatTest instance) { this.instance = instance; } - public FormatTest.Builder integer(.annotation.Nullable Integer integer) { + public FormatTest.Builder integer(Integer integer) { this.instance.integer = integer; return this; } - public FormatTest.Builder int32(.annotation.Nullable Integer int32) { + public FormatTest.Builder int32(Integer int32) { this.instance.int32 = int32; return this; } - public FormatTest.Builder int64(.annotation.Nullable Long int64) { + public FormatTest.Builder int64(Long int64) { this.instance.int64 = int64; return this; } - public FormatTest.Builder number(.annotation.Nonnull BigDecimal number) { + public FormatTest.Builder number(BigDecimal number) { this.instance.number = number; return this; } - public FormatTest.Builder _float(.annotation.Nullable Float _float) { + public FormatTest.Builder _float(Float _float) { this.instance._float = _float; return this; } - public FormatTest.Builder _double(.annotation.Nullable Double _double) { + public FormatTest.Builder _double(Double _double) { this.instance._double = _double; return this; } - public FormatTest.Builder decimal(.annotation.Nullable BigDecimal decimal) { + public FormatTest.Builder decimal(BigDecimal decimal) { this.instance.decimal = decimal; return this; } - public FormatTest.Builder string(.annotation.Nullable String string) { + public FormatTest.Builder string(String string) { this.instance.string = string; return this; } - public FormatTest.Builder _byte(.annotation.Nonnull byte[] _byte) { + public FormatTest.Builder _byte(byte[] _byte) { this.instance._byte = _byte; return this; } - public FormatTest.Builder binary(.annotation.Nullable File binary) { + public FormatTest.Builder binary(File binary) { this.instance.binary = binary; return this; } - public FormatTest.Builder date(.annotation.Nonnull LocalDate date) { + public FormatTest.Builder date(LocalDate date) { this.instance.date = date; return this; } - public FormatTest.Builder dateTime(.annotation.Nullable OffsetDateTime dateTime) { + public FormatTest.Builder dateTime(OffsetDateTime dateTime) { this.instance.dateTime = dateTime; return this; } - public FormatTest.Builder uuid(.annotation.Nullable UUID uuid) { + public FormatTest.Builder uuid(UUID uuid) { this.instance.uuid = uuid; return this; } - public FormatTest.Builder password(.annotation.Nonnull String password) { + public FormatTest.Builder password(String password) { this.instance.password = password; return this; } - public FormatTest.Builder patternWithDigits(.annotation.Nullable String patternWithDigits) { + public FormatTest.Builder patternWithDigits(String patternWithDigits) { this.instance.patternWithDigits = patternWithDigits; return this; } - public FormatTest.Builder patternWithDigitsAndDelimiter(.annotation.Nullable String patternWithDigitsAndDelimiter) { + public FormatTest.Builder patternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) { this.instance.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/GrandparentAnimal.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/GrandparentAnimal.java index e93211c35fbd..d9ae136260f7 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/GrandparentAnimal.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/GrandparentAnimal.java @@ -174,7 +174,7 @@ protected Builder(GrandparentAnimal instance) { this.instance = instance; } - public GrandparentAnimal.Builder petType(.annotation.Nonnull String petType) { + public GrandparentAnimal.Builder petType(String petType) { this.instance.petType = petType; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index 583ed0e768ee..c1ebd7c7410f 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -177,11 +177,11 @@ protected Builder(HasOnlyReadOnly instance) { this.instance = instance; } - public HasOnlyReadOnly.Builder bar(.annotation.Nullable String bar) { + public HasOnlyReadOnly.Builder bar(String bar) { this.instance.bar = bar; return this; } - public HasOnlyReadOnly.Builder foo(.annotation.Nullable String foo) { + public HasOnlyReadOnly.Builder foo(String foo) { this.instance.foo = foo; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/HealthCheckResult.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/HealthCheckResult.java index fd924edb4b28..858ea584d117 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/HealthCheckResult.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/HealthCheckResult.java @@ -174,7 +174,7 @@ protected Builder(HealthCheckResult instance) { this.instance = instance; } - public HealthCheckResult.Builder nullableMessage(.annotation.Nullable String nullableMessage) { + public HealthCheckResult.Builder nullableMessage(String nullableMessage) { this.instance.nullableMessage = JsonNullable.of(nullableMessage); return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/IsoscelesTriangle.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/IsoscelesTriangle.java index 1184799e6015..a23e04252990 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/IsoscelesTriangle.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/IsoscelesTriangle.java @@ -187,11 +187,11 @@ protected Builder(IsoscelesTriangle instance) { this.instance = instance; } - public IsoscelesTriangle.Builder shapeType(.annotation.Nonnull String shapeType) { + public IsoscelesTriangle.Builder shapeType(String shapeType) { this.instance.shapeType = shapeType; return this; } - public IsoscelesTriangle.Builder triangleType(.annotation.Nonnull String triangleType) { + public IsoscelesTriangle.Builder triangleType(String triangleType) { this.instance.triangleType = triangleType; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/MapTest.java index b4b4dcabe238..96336a90f0d1 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/MapTest.java @@ -342,19 +342,19 @@ protected Builder(MapTest instance) { this.instance = instance; } - public MapTest.Builder mapMapOfString(.annotation.Nullable Map> mapMapOfString) { + public MapTest.Builder mapMapOfString(Map> mapMapOfString) { this.instance.mapMapOfString = mapMapOfString; return this; } - public MapTest.Builder mapOfEnumString(.annotation.Nullable Map mapOfEnumString) { + public MapTest.Builder mapOfEnumString(Map mapOfEnumString) { this.instance.mapOfEnumString = mapOfEnumString; return this; } - public MapTest.Builder directMap(.annotation.Nullable Map directMap) { + public MapTest.Builder directMap(Map directMap) { this.instance.directMap = directMap; return this; } - public MapTest.Builder indirectMap(.annotation.Nullable Map indirectMap) { + public MapTest.Builder indirectMap(Map indirectMap) { this.instance.indirectMap = indirectMap; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 56045c8850e3..def61869fea4 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -240,15 +240,15 @@ protected Builder(MixedPropertiesAndAdditionalPropertiesClass instance) { this.instance = instance; } - public MixedPropertiesAndAdditionalPropertiesClass.Builder uuid(.annotation.Nullable UUID uuid) { + public MixedPropertiesAndAdditionalPropertiesClass.Builder uuid(UUID uuid) { this.instance.uuid = uuid; return this; } - public MixedPropertiesAndAdditionalPropertiesClass.Builder dateTime(.annotation.Nullable OffsetDateTime dateTime) { + public MixedPropertiesAndAdditionalPropertiesClass.Builder dateTime(OffsetDateTime dateTime) { this.instance.dateTime = dateTime; return this; } - public MixedPropertiesAndAdditionalPropertiesClass.Builder map(.annotation.Nullable Map map) { + public MixedPropertiesAndAdditionalPropertiesClass.Builder map(Map map) { this.instance.map = map; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Model200Response.java index 4b29d7aed3f9..ecb066765fe5 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Model200Response.java @@ -187,11 +187,11 @@ protected Builder(Model200Response instance) { this.instance = instance; } - public Model200Response.Builder name(.annotation.Nullable Integer name) { + public Model200Response.Builder name(Integer name) { this.instance.name = name; return this; } - public Model200Response.Builder propertyClass(.annotation.Nullable String propertyClass) { + public Model200Response.Builder propertyClass(String propertyClass) { this.instance.propertyClass = propertyClass; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 95cc24aa2a7e..76faf44224c4 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -222,15 +222,15 @@ protected Builder(ModelApiResponse instance) { this.instance = instance; } - public ModelApiResponse.Builder code(.annotation.Nullable Integer code) { + public ModelApiResponse.Builder code(Integer code) { this.instance.code = code; return this; } - public ModelApiResponse.Builder type(.annotation.Nullable String type) { + public ModelApiResponse.Builder type(String type) { this.instance.type = type; return this; } - public ModelApiResponse.Builder message(.annotation.Nullable String message) { + public ModelApiResponse.Builder message(String message) { this.instance.message = message; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelFile.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelFile.java index 333204ac0850..2dcaff602131 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelFile.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelFile.java @@ -152,7 +152,7 @@ protected Builder(ModelFile instance) { this.instance = instance; } - public ModelFile.Builder sourceURI(.annotation.Nullable String sourceURI) { + public ModelFile.Builder sourceURI(String sourceURI) { this.instance.sourceURI = sourceURI; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelList.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelList.java index 32553bd95401..1c641c1462f5 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelList.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelList.java @@ -152,7 +152,7 @@ protected Builder(ModelList instance) { this.instance = instance; } - public ModelList.Builder _123list(.annotation.Nullable String _123list) { + public ModelList.Builder _123list(String _123list) { this.instance._123list = _123list; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelReturn.java index b53a1767f101..264a6d166064 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -152,7 +152,7 @@ protected Builder(ModelReturn instance) { this.instance = instance; } - public ModelReturn.Builder _return(.annotation.Nullable Integer _return) { + public ModelReturn.Builder _return(Integer _return) { this.instance._return = _return; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Name.java index 14b75487d9ed..8c1a3c0a9168 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Name.java @@ -247,19 +247,19 @@ protected Builder(Name instance) { this.instance = instance; } - public Name.Builder name(.annotation.Nonnull Integer name) { + public Name.Builder name(Integer name) { this.instance.name = name; return this; } - public Name.Builder snakeCase(.annotation.Nullable Integer snakeCase) { + public Name.Builder snakeCase(Integer snakeCase) { this.instance.snakeCase = snakeCase; return this; } - public Name.Builder property(.annotation.Nullable String property) { + public Name.Builder property(String property) { this.instance.property = property; return this; } - public Name.Builder _123number(.annotation.Nullable Integer _123number) { + public Name.Builder _123number(Integer _123number) { this.instance._123number = _123number; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/NullableClass.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/NullableClass.java index 68415991e5af..6569aaded6ce 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/NullableClass.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/NullableClass.java @@ -765,7 +765,7 @@ protected Builder(NullableClass instance) { this.instance = instance; } - public NullableClass.Builder integerProp(.annotation.Nullable Integer integerProp) { + public NullableClass.Builder integerProp(Integer integerProp) { this.instance.integerProp = JsonNullable.of(integerProp); return this; } @@ -773,7 +773,7 @@ public NullableClass.Builder integerProp(JsonNullable integerProp) { this.instance.integerProp = integerProp; return this; } - public NullableClass.Builder numberProp(.annotation.Nullable BigDecimal numberProp) { + public NullableClass.Builder numberProp(BigDecimal numberProp) { this.instance.numberProp = JsonNullable.of(numberProp); return this; } @@ -781,7 +781,7 @@ public NullableClass.Builder numberProp(JsonNullable numberProp) { this.instance.numberProp = numberProp; return this; } - public NullableClass.Builder booleanProp(.annotation.Nullable Boolean booleanProp) { + public NullableClass.Builder booleanProp(Boolean booleanProp) { this.instance.booleanProp = JsonNullable.of(booleanProp); return this; } @@ -789,7 +789,7 @@ public NullableClass.Builder booleanProp(JsonNullable booleanProp) { this.instance.booleanProp = booleanProp; return this; } - public NullableClass.Builder stringProp(.annotation.Nullable String stringProp) { + public NullableClass.Builder stringProp(String stringProp) { this.instance.stringProp = JsonNullable.of(stringProp); return this; } @@ -797,7 +797,7 @@ public NullableClass.Builder stringProp(JsonNullable stringProp) { this.instance.stringProp = stringProp; return this; } - public NullableClass.Builder dateProp(.annotation.Nullable LocalDate dateProp) { + public NullableClass.Builder dateProp(LocalDate dateProp) { this.instance.dateProp = JsonNullable.of(dateProp); return this; } @@ -805,7 +805,7 @@ public NullableClass.Builder dateProp(JsonNullable dateProp) { this.instance.dateProp = dateProp; return this; } - public NullableClass.Builder datetimeProp(.annotation.Nullable OffsetDateTime datetimeProp) { + public NullableClass.Builder datetimeProp(OffsetDateTime datetimeProp) { this.instance.datetimeProp = JsonNullable.of(datetimeProp); return this; } @@ -813,7 +813,7 @@ public NullableClass.Builder datetimeProp(JsonNullable datetimeP this.instance.datetimeProp = datetimeProp; return this; } - public NullableClass.Builder arrayNullableProp(.annotation.Nullable List arrayNullableProp) { + public NullableClass.Builder arrayNullableProp(List arrayNullableProp) { this.instance.arrayNullableProp = JsonNullable.>of(arrayNullableProp); return this; } @@ -821,7 +821,7 @@ public NullableClass.Builder arrayNullableProp(JsonNullable> arrayN this.instance.arrayNullableProp = arrayNullableProp; return this; } - public NullableClass.Builder arrayAndItemsNullableProp(.annotation.Nullable List arrayAndItemsNullableProp) { + public NullableClass.Builder arrayAndItemsNullableProp(List arrayAndItemsNullableProp) { this.instance.arrayAndItemsNullableProp = JsonNullable.>of(arrayAndItemsNullableProp); return this; } @@ -829,11 +829,11 @@ public NullableClass.Builder arrayAndItemsNullableProp(JsonNullable this.instance.arrayAndItemsNullableProp = arrayAndItemsNullableProp; return this; } - public NullableClass.Builder arrayItemsNullable(.annotation.Nullable List arrayItemsNullable) { + public NullableClass.Builder arrayItemsNullable(List arrayItemsNullable) { this.instance.arrayItemsNullable = arrayItemsNullable; return this; } - public NullableClass.Builder objectNullableProp(.annotation.Nullable Map objectNullableProp) { + public NullableClass.Builder objectNullableProp(Map objectNullableProp) { this.instance.objectNullableProp = JsonNullable.>of(objectNullableProp); return this; } @@ -841,7 +841,7 @@ public NullableClass.Builder objectNullableProp(JsonNullable this.instance.objectNullableProp = objectNullableProp; return this; } - public NullableClass.Builder objectAndItemsNullableProp(.annotation.Nullable Map objectAndItemsNullableProp) { + public NullableClass.Builder objectAndItemsNullableProp(Map objectAndItemsNullableProp) { this.instance.objectAndItemsNullableProp = JsonNullable.>of(objectAndItemsNullableProp); return this; } @@ -849,7 +849,7 @@ public NullableClass.Builder objectAndItemsNullableProp(JsonNullable objectItemsNullable) { + public NullableClass.Builder objectItemsNullable(Map objectItemsNullable) { this.instance.objectItemsNullable = objectItemsNullable; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/NumberOnly.java index 0193072086d1..e65f78226378 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -153,7 +153,7 @@ protected Builder(NumberOnly instance) { this.instance = instance; } - public NumberOnly.Builder justNumber(.annotation.Nullable BigDecimal justNumber) { + public NumberOnly.Builder justNumber(BigDecimal justNumber) { this.instance.justNumber = justNumber; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java index 5c18e344ecc3..7502eed1c39c 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java @@ -279,19 +279,19 @@ protected Builder(ObjectWithDeprecatedFields instance) { this.instance = instance; } - public ObjectWithDeprecatedFields.Builder uuid(.annotation.Nullable String uuid) { + public ObjectWithDeprecatedFields.Builder uuid(String uuid) { this.instance.uuid = uuid; return this; } - public ObjectWithDeprecatedFields.Builder id(.annotation.Nullable BigDecimal id) { + public ObjectWithDeprecatedFields.Builder id(BigDecimal id) { this.instance.id = id; return this; } - public ObjectWithDeprecatedFields.Builder deprecatedRef(.annotation.Nullable DeprecatedObject deprecatedRef) { + public ObjectWithDeprecatedFields.Builder deprecatedRef(DeprecatedObject deprecatedRef) { this.instance.deprecatedRef = deprecatedRef; return this; } - public ObjectWithDeprecatedFields.Builder bars(.annotation.Nullable List bars) { + public ObjectWithDeprecatedFields.Builder bars(List bars) { this.instance.bars = bars; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Order.java index 8e8c7f89fbdd..adf6c74405eb 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Order.java @@ -365,27 +365,27 @@ protected Builder(Order instance) { this.instance = instance; } - public Order.Builder id(.annotation.Nullable Long id) { + public Order.Builder id(Long id) { this.instance.id = id; return this; } - public Order.Builder petId(.annotation.Nullable Long petId) { + public Order.Builder petId(Long petId) { this.instance.petId = petId; return this; } - public Order.Builder quantity(.annotation.Nullable Integer quantity) { + public Order.Builder quantity(Integer quantity) { this.instance.quantity = quantity; return this; } - public Order.Builder shipDate(.annotation.Nullable OffsetDateTime shipDate) { + public Order.Builder shipDate(OffsetDateTime shipDate) { this.instance.shipDate = shipDate; return this; } - public Order.Builder status(.annotation.Nullable StatusEnum status) { + public Order.Builder status(StatusEnum status) { this.instance.status = status; return this; } - public Order.Builder complete(.annotation.Nullable Boolean complete) { + public Order.Builder complete(Boolean complete) { this.instance.complete = complete; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterComposite.java index 6f68cfeeaa49..efcb70ac783a 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -223,15 +223,15 @@ protected Builder(OuterComposite instance) { this.instance = instance; } - public OuterComposite.Builder myNumber(.annotation.Nullable BigDecimal myNumber) { + public OuterComposite.Builder myNumber(BigDecimal myNumber) { this.instance.myNumber = myNumber; return this; } - public OuterComposite.Builder myString(.annotation.Nullable String myString) { + public OuterComposite.Builder myString(String myString) { this.instance.myString = myString; return this; } - public OuterComposite.Builder myBoolean(.annotation.Nullable Boolean myBoolean) { + public OuterComposite.Builder myBoolean(Boolean myBoolean) { this.instance.myBoolean = myBoolean; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ParentPet.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ParentPet.java index da67647f4e05..94d852271e5a 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ParentPet.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ParentPet.java @@ -152,7 +152,7 @@ protected Builder(ParentPet instance) { } - public ParentPet.Builder petType(.annotation.Nonnull String petType) { // inherited: true + public ParentPet.Builder petType(String petType) { // inherited: true super.petType(petType); return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Pet.java index 6b36c1de1383..38a64a1abf66 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Pet.java @@ -393,27 +393,27 @@ protected Builder(Pet instance) { this.instance = instance; } - public Pet.Builder id(.annotation.Nullable Long id) { + public Pet.Builder id(Long id) { this.instance.id = id; return this; } - public Pet.Builder category(.annotation.Nullable Category category) { + public Pet.Builder category(Category category) { this.instance.category = category; return this; } - public Pet.Builder name(.annotation.Nonnull String name) { + public Pet.Builder name(String name) { this.instance.name = name; return this; } - public Pet.Builder photoUrls(.annotation.Nonnull List photoUrls) { + public Pet.Builder photoUrls(List photoUrls) { this.instance.photoUrls = photoUrls; return this; } - public Pet.Builder tags(.annotation.Nullable List tags) { + public Pet.Builder tags(List tags) { this.instance.tags = tags; return this; } - public Pet.Builder status(.annotation.Nullable StatusEnum status) { + public Pet.Builder status(StatusEnum status) { this.instance.status = status; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java index 08780a788255..ddda7f7cef92 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java @@ -152,7 +152,7 @@ protected Builder(QuadrilateralInterface instance) { this.instance = instance; } - public QuadrilateralInterface.Builder quadrilateralType(.annotation.Nonnull String quadrilateralType) { + public QuadrilateralInterface.Builder quadrilateralType(String quadrilateralType) { this.instance.quadrilateralType = quadrilateralType; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index ef4dd8860515..9281997a1969 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -185,11 +185,11 @@ protected Builder(ReadOnlyFirst instance) { this.instance = instance; } - public ReadOnlyFirst.Builder bar(.annotation.Nullable String bar) { + public ReadOnlyFirst.Builder bar(String bar) { this.instance.bar = bar; return this; } - public ReadOnlyFirst.Builder baz(.annotation.Nullable String baz) { + public ReadOnlyFirst.Builder baz(String baz) { this.instance.baz = baz; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ScaleneTriangle.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ScaleneTriangle.java index 7ab05c9f14b1..82f984e9818f 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ScaleneTriangle.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ScaleneTriangle.java @@ -187,11 +187,11 @@ protected Builder(ScaleneTriangle instance) { this.instance = instance; } - public ScaleneTriangle.Builder shapeType(.annotation.Nonnull String shapeType) { + public ScaleneTriangle.Builder shapeType(String shapeType) { this.instance.shapeType = shapeType; return this; } - public ScaleneTriangle.Builder triangleType(.annotation.Nonnull String triangleType) { + public ScaleneTriangle.Builder triangleType(String triangleType) { this.instance.triangleType = triangleType; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ShapeInterface.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ShapeInterface.java index b59f0264b5f7..b49236122522 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ShapeInterface.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ShapeInterface.java @@ -152,7 +152,7 @@ protected Builder(ShapeInterface instance) { this.instance = instance; } - public ShapeInterface.Builder shapeType(.annotation.Nonnull String shapeType) { + public ShapeInterface.Builder shapeType(String shapeType) { this.instance.shapeType = shapeType; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java index 8342f9fd8ba1..4fd6fd223789 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java @@ -187,11 +187,11 @@ protected Builder(SimpleQuadrilateral instance) { this.instance = instance; } - public SimpleQuadrilateral.Builder shapeType(.annotation.Nonnull String shapeType) { + public SimpleQuadrilateral.Builder shapeType(String shapeType) { this.instance.shapeType = shapeType; return this; } - public SimpleQuadrilateral.Builder quadrilateralType(.annotation.Nonnull String quadrilateralType) { + public SimpleQuadrilateral.Builder quadrilateralType(String quadrilateralType) { this.instance.quadrilateralType = quadrilateralType; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/SpecialModelName.java index 7f91aeaefdca..f50d14a4114e 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -187,11 +187,11 @@ protected Builder(SpecialModelName instance) { this.instance = instance; } - public SpecialModelName.Builder $specialPropertyName(.annotation.Nullable Long $specialPropertyName) { + public SpecialModelName.Builder $specialPropertyName(Long $specialPropertyName) { this.instance.$specialPropertyName = $specialPropertyName; return this; } - public SpecialModelName.Builder specialModelName(.annotation.Nullable String specialModelName) { + public SpecialModelName.Builder specialModelName(String specialModelName) { this.instance.specialModelName = specialModelName; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Tag.java index bbfdfa9fa9d5..0f39e5849db0 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Tag.java @@ -187,11 +187,11 @@ protected Builder(Tag instance) { this.instance = instance; } - public Tag.Builder id(.annotation.Nullable Long id) { + public Tag.Builder id(Long id) { this.instance.id = id; return this; } - public Tag.Builder name(.annotation.Nullable String name) { + public Tag.Builder name(String name) { this.instance.name = name; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java index 53f3de5d9e3d..57573b14117e 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java @@ -200,7 +200,7 @@ protected Builder(TestInlineFreeformAdditionalPropertiesRequest instance) { this.instance = instance; } - public TestInlineFreeformAdditionalPropertiesRequest.Builder someProperty(.annotation.Nullable String someProperty) { + public TestInlineFreeformAdditionalPropertiesRequest.Builder someProperty(String someProperty) { this.instance.someProperty = someProperty; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/TriangleInterface.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/TriangleInterface.java index 94ca0221fab2..de4bb88b95ea 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/TriangleInterface.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/TriangleInterface.java @@ -152,7 +152,7 @@ protected Builder(TriangleInterface instance) { this.instance = instance; } - public TriangleInterface.Builder triangleType(.annotation.Nonnull String triangleType) { + public TriangleInterface.Builder triangleType(String triangleType) { this.instance.triangleType = triangleType; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/User.java index b1ac94f25339..392e98c5cc00 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/User.java @@ -573,43 +573,43 @@ protected Builder(User instance) { this.instance = instance; } - public User.Builder id(.annotation.Nullable Long id) { + public User.Builder id(Long id) { this.instance.id = id; return this; } - public User.Builder username(.annotation.Nullable String username) { + public User.Builder username(String username) { this.instance.username = username; return this; } - public User.Builder firstName(.annotation.Nullable String firstName) { + public User.Builder firstName(String firstName) { this.instance.firstName = firstName; return this; } - public User.Builder lastName(.annotation.Nullable String lastName) { + public User.Builder lastName(String lastName) { this.instance.lastName = lastName; return this; } - public User.Builder email(.annotation.Nullable String email) { + public User.Builder email(String email) { this.instance.email = email; return this; } - public User.Builder password(.annotation.Nullable String password) { + public User.Builder password(String password) { this.instance.password = password; return this; } - public User.Builder phone(.annotation.Nullable String phone) { + public User.Builder phone(String phone) { this.instance.phone = phone; return this; } - public User.Builder userStatus(.annotation.Nullable Integer userStatus) { + public User.Builder userStatus(Integer userStatus) { this.instance.userStatus = userStatus; return this; } - public User.Builder objectWithNoDeclaredProps(.annotation.Nullable Object objectWithNoDeclaredProps) { + public User.Builder objectWithNoDeclaredProps(Object objectWithNoDeclaredProps) { this.instance.objectWithNoDeclaredProps = objectWithNoDeclaredProps; return this; } - public User.Builder objectWithNoDeclaredPropsNullable(.annotation.Nullable Object objectWithNoDeclaredPropsNullable) { + public User.Builder objectWithNoDeclaredPropsNullable(Object objectWithNoDeclaredPropsNullable) { this.instance.objectWithNoDeclaredPropsNullable = JsonNullable.of(objectWithNoDeclaredPropsNullable); return this; } @@ -617,7 +617,7 @@ public User.Builder objectWithNoDeclaredPropsNullable(JsonNullable objec this.instance.objectWithNoDeclaredPropsNullable = objectWithNoDeclaredPropsNullable; return this; } - public User.Builder anyTypeProp(.annotation.Nullable Object anyTypeProp) { + public User.Builder anyTypeProp(Object anyTypeProp) { this.instance.anyTypeProp = JsonNullable.of(anyTypeProp); return this; } @@ -625,7 +625,7 @@ public User.Builder anyTypeProp(JsonNullable anyTypeProp) { this.instance.anyTypeProp = anyTypeProp; return this; } - public User.Builder anyTypePropNullable(.annotation.Nullable Object anyTypePropNullable) { + public User.Builder anyTypePropNullable(Object anyTypePropNullable) { this.instance.anyTypePropNullable = JsonNullable.of(anyTypePropNullable); return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Whale.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Whale.java index 6b5e75bc994b..27fe86483e0e 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Whale.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Whale.java @@ -222,15 +222,15 @@ protected Builder(Whale instance) { this.instance = instance; } - public Whale.Builder hasBaleen(.annotation.Nullable Boolean hasBaleen) { + public Whale.Builder hasBaleen(Boolean hasBaleen) { this.instance.hasBaleen = hasBaleen; return this; } - public Whale.Builder hasTeeth(.annotation.Nullable Boolean hasTeeth) { + public Whale.Builder hasTeeth(Boolean hasTeeth) { this.instance.hasTeeth = hasTeeth; return this; } - public Whale.Builder className(.annotation.Nonnull String className) { + public Whale.Builder className(String className) { this.instance.className = className; return this; } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Zebra.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Zebra.java index 32a6002496bc..2741cd52c14f 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Zebra.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Zebra.java @@ -272,11 +272,11 @@ protected Builder(Zebra instance) { this.instance = instance; } - public Zebra.Builder type(.annotation.Nullable TypeEnum type) { + public Zebra.Builder type(TypeEnum type) { this.instance.type = type; return this; } - public Zebra.Builder className(.annotation.Nonnull String className) { + public Zebra.Builder className(String className) { this.instance.className = className; return this; } diff --git a/samples/client/petstore/java/okhttp-gson-3.1-duplicated-operationid/git_push.sh b/samples/client/petstore/java/okhttp-gson-3.1-duplicated-operationid/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1-duplicated-operationid/git_push.sh +++ b/samples/client/petstore/java/okhttp-gson-3.1-duplicated-operationid/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/okhttp-gson-3.1/git_push.sh b/samples/client/petstore/java/okhttp-gson-3.1/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/git_push.sh +++ b/samples/client/petstore/java/okhttp-gson-3.1/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/okhttp-gson-awsv4signature/git_push.sh b/samples/client/petstore/java/okhttp-gson-awsv4signature/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/okhttp-gson-awsv4signature/git_push.sh +++ b/samples/client/petstore/java/okhttp-gson-awsv4signature/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java index e69de29bb2d1..6ae354daf9f4 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java @@ -0,0 +1,75 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.auth; + +import org.openapitools.client.ApiException; +import org.openapitools.client.Pair; + +import java.net.URI; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.function.Supplier; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.25.0-SNAPSHOT") +public class HttpBearerAuth implements Authentication { + private final String scheme; + private Supplier tokenSupplier; + + public HttpBearerAuth(String scheme) { + this.scheme = scheme; + } + + /** + * Gets the token, which together with the scheme, will be sent as the value of the Authorization header. + * + * @return The bearer token + */ + public String getBearerToken() { + return tokenSupplier.get(); + } + + /** + * Sets the token, which together with the scheme, will be sent as the value of the Authorization header. + * + * @param bearerToken The bearer token to send in the Authorization header + */ + public void setBearerToken(String bearerToken) { + this.tokenSupplier = () -> bearerToken; + } + + /** + * Sets the supplier of tokens, which together with the scheme, will be sent as the value of the Authorization header. + * + * @param tokenSupplier The supplier of bearer tokens to send in the Authorization header + */ + public void setBearerToken(Supplier tokenSupplier) { + this.tokenSupplier = tokenSupplier; + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, + String payload, String method, URI uri) throws ApiException { + String bearerToken = Optional.ofNullable(tokenSupplier).map(Supplier::get).orElse(null); + if (bearerToken == null) { + return; + } + + headerParams.put("Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken); + } + + private static String upperCaseBearer(String scheme) { + return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme; + } +} diff --git a/samples/client/petstore/java/okhttp-gson-group-parameter/git_push.sh b/samples/client/petstore/java/okhttp-gson-group-parameter/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/okhttp-gson-group-parameter/git_push.sh +++ b/samples/client/petstore/java/okhttp-gson-group-parameter/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/okhttp-gson-nullable-required/git_push.sh b/samples/client/petstore/java/okhttp-gson-nullable-required/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/okhttp-gson-nullable-required/git_push.sh +++ b/samples/client/petstore/java/okhttp-gson-nullable-required/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/git_push.sh b/samples/client/petstore/java/okhttp-gson-parcelableModel/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/git_push.sh +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/git_push.sh b/samples/client/petstore/java/okhttp-gson-swagger1/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger1/git_push.sh +++ b/samples/client/petstore/java/okhttp-gson-swagger1/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/okhttp-gson-swagger2/git_push.sh b/samples/client/petstore/java/okhttp-gson-swagger2/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger2/git_push.sh +++ b/samples/client/petstore/java/okhttp-gson-swagger2/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/okhttp-gson/git_push.sh b/samples/client/petstore/java/okhttp-gson/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/okhttp-gson/git_push.sh +++ b/samples/client/petstore/java/okhttp-gson/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/rest-assured-jackson/git_push.sh b/samples/client/petstore/java/rest-assured-jackson/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/rest-assured-jackson/git_push.sh +++ b/samples/client/petstore/java/rest-assured-jackson/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/rest-assured/git_push.sh b/samples/client/petstore/java/rest-assured/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/rest-assured/git_push.sh +++ b/samples/client/petstore/java/rest-assured/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/restclient-nullable-arrays/git_push.sh b/samples/client/petstore/java/restclient-nullable-arrays/git_push.sh index f53a75d4fabe..a35991cd51a1 100755 --- a/samples/client/petstore/java/restclient-nullable-arrays/git_push.sh +++ b/samples/client/petstore/java/restclient-nullable-arrays/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson2/git_push.sh b/samples/client/petstore/java/restclient-springBoot4-jackson2/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/restclient-springBoot4-jackson2/git_push.sh +++ b/samples/client/petstore/java/restclient-springBoot4-jackson2/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/git_push.sh b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/git_push.sh +++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/src/main/java/org/openapitools/client/model/FileContent.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/src/main/java/org/openapitools/client/model/FileContent.java index a96749d9ef05..b0f00682525b 100644 --- a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/src/main/java/org/openapitools/client/model/FileContent.java +++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/src/main/java/org/openapitools/client/model/FileContent.java @@ -195,11 +195,11 @@ public FileContent.Builder name(String name) { this.instance.name = name; return this; } - public FileContent.Builder size(Integer size) { + public FileContent.Builder size(@Nullable Integer size) { this.instance.size = size; return this; } - public FileContent.Builder virusScan(VirusScanEnum virusScan) { + public FileContent.Builder virusScan(@Nullable VirusScanEnum virusScan) { this.instance.virusScan = virusScan; return this; } diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/src/main/java/org/openapitools/client/model/Foo.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/src/main/java/org/openapitools/client/model/Foo.java index 7d14872465f0..e5cc9c951158 100644 --- a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/src/main/java/org/openapitools/client/model/Foo.java +++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/src/main/java/org/openapitools/client/model/Foo.java @@ -603,11 +603,11 @@ protected Builder(Foo instance) { this.instance = instance; } - public Foo.Builder dt(java.time.Instant dt) { + public Foo.Builder dt(java.time.@Nullable Instant dt) { this.instance.dt = dt; return this; } - public Foo.Builder nullableDt(java.time.Instant nullableDt) { + public Foo.Builder nullableDt(java.time.@Nullable Instant nullableDt) { this.instance.nullableDt = JsonNullable.of(nullableDt); return this; } @@ -615,11 +615,11 @@ public Foo.Builder nullableDt(JsonNullable nullableDt) { this.instance.nullableDt = nullableDt; return this; } - public Foo.Builder binary(File binary) { + public Foo.Builder binary(@Nullable File binary) { this.instance.binary = binary; return this; } - public Foo.Builder nullableBinary(File nullableBinary) { + public Foo.Builder nullableBinary(@Nullable File nullableBinary) { this.instance.nullableBinary = JsonNullable.of(nullableBinary); return this; } @@ -627,15 +627,15 @@ public Foo.Builder nullableBinary(JsonNullable nullableBinary) { this.instance.nullableBinary = nullableBinary; return this; } - public Foo.Builder listOfDt(List listOfDt) { + public Foo.Builder listOfDt(@Nullable List listOfDt) { this.instance.listOfDt = listOfDt; return this; } - public Foo.Builder listMinIntems(List listMinIntems) { + public Foo.Builder listMinIntems(@Nullable List listMinIntems) { this.instance.listMinIntems = listMinIntems; return this; } - public Foo.Builder nullableListMinIntems(List nullableListMinIntems) { + public Foo.Builder nullableListMinIntems(@Nullable List nullableListMinIntems) { this.instance.nullableListMinIntems = JsonNullable.>of(nullableListMinIntems); return this; } @@ -647,11 +647,11 @@ public Foo.Builder requiredDt(java.time.Instant requiredDt) { this.instance.requiredDt = requiredDt; return this; } - public Foo.Builder number(java.math.BigDecimal number) { + public Foo.Builder number(java.math.@Nullable BigDecimal number) { this.instance.number = number; return this; } - public Foo.Builder nullableNumber(java.math.BigDecimal nullableNumber) { + public Foo.Builder nullableNumber(java.math.@Nullable BigDecimal nullableNumber) { this.instance.nullableNumber = JsonNullable.of(nullableNumber); return this; } @@ -659,7 +659,7 @@ public Foo.Builder nullableNumber(JsonNullable nullableNum this.instance.nullableNumber = nullableNumber; return this; } - public Foo.Builder color(String color) { + public Foo.Builder color(@Nullable String color) { this.instance.color = color; return this; } @@ -667,7 +667,7 @@ public Foo.Builder requiredColor(String requiredColor) { this.instance.requiredColor = requiredColor; return this; } - public Foo.Builder nullableColor(String nullableColor) { + public Foo.Builder nullableColor(@Nullable String nullableColor) { this.instance.nullableColor = JsonNullable.of(nullableColor); return this; } diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/src/main/java/org/openapitools/client/model/RequiredAndNullable.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/src/main/java/org/openapitools/client/model/RequiredAndNullable.java index 52e671d1cee2..55653e9e6161 100644 --- a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/src/main/java/org/openapitools/client/model/RequiredAndNullable.java +++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/src/main/java/org/openapitools/client/model/RequiredAndNullable.java @@ -262,15 +262,15 @@ protected Builder(RequiredAndNullable instance) { this.instance = instance; } - public RequiredAndNullable.Builder str(String str) { + public RequiredAndNullable.Builder str(@Nullable String str) { this.instance.str = str; return this; } - public RequiredAndNullable.Builder _file(File _file) { + public RequiredAndNullable.Builder _file(@Nullable File _file) { this.instance._file = _file; return this; } - public RequiredAndNullable.Builder color(String color) { + public RequiredAndNullable.Builder color(@Nullable String color) { this.instance.color = color; return this; } @@ -278,7 +278,7 @@ public RequiredAndNullable.Builder onlyRequired(String onlyRequired) { this.instance.onlyRequired = onlyRequired; return this; } - public RequiredAndNullable.Builder _list(List _list) { + public RequiredAndNullable.Builder _list(@Nullable List _list) { this.instance._list = _list; return this; } diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/git_push.sh b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/git_push.sh +++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/FileContent.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/FileContent.java index a96749d9ef05..b0f00682525b 100644 --- a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/FileContent.java +++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/FileContent.java @@ -195,11 +195,11 @@ public FileContent.Builder name(String name) { this.instance.name = name; return this; } - public FileContent.Builder size(Integer size) { + public FileContent.Builder size(@Nullable Integer size) { this.instance.size = size; return this; } - public FileContent.Builder virusScan(VirusScanEnum virusScan) { + public FileContent.Builder virusScan(@Nullable VirusScanEnum virusScan) { this.instance.virusScan = virusScan; return this; } diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/Foo.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/Foo.java index 1371c0badfc0..ef899ba2185c 100644 --- a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/Foo.java +++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/Foo.java @@ -544,31 +544,31 @@ protected Builder(Foo instance) { this.instance = instance; } - public Foo.Builder dt(java.time.Instant dt) { + public Foo.Builder dt(java.time.@Nullable Instant dt) { this.instance.dt = dt; return this; } - public Foo.Builder nullableDt(java.time.Instant nullableDt) { + public Foo.Builder nullableDt(java.time.@Nullable Instant nullableDt) { this.instance.nullableDt = nullableDt; return this; } - public Foo.Builder binary(File binary) { + public Foo.Builder binary(@Nullable File binary) { this.instance.binary = binary; return this; } - public Foo.Builder nullableBinary(File nullableBinary) { + public Foo.Builder nullableBinary(@Nullable File nullableBinary) { this.instance.nullableBinary = nullableBinary; return this; } - public Foo.Builder listOfDt(List listOfDt) { + public Foo.Builder listOfDt(@Nullable List listOfDt) { this.instance.listOfDt = listOfDt; return this; } - public Foo.Builder listMinIntems(List listMinIntems) { + public Foo.Builder listMinIntems(@Nullable List listMinIntems) { this.instance.listMinIntems = listMinIntems; return this; } - public Foo.Builder nullableListMinIntems(List nullableListMinIntems) { + public Foo.Builder nullableListMinIntems(@Nullable List nullableListMinIntems) { this.instance.nullableListMinIntems = nullableListMinIntems; return this; } @@ -576,15 +576,15 @@ public Foo.Builder requiredDt(java.time.Instant requiredDt) { this.instance.requiredDt = requiredDt; return this; } - public Foo.Builder number(java.math.BigDecimal number) { + public Foo.Builder number(java.math.@Nullable BigDecimal number) { this.instance.number = number; return this; } - public Foo.Builder nullableNumber(java.math.BigDecimal nullableNumber) { + public Foo.Builder nullableNumber(java.math.@Nullable BigDecimal nullableNumber) { this.instance.nullableNumber = nullableNumber; return this; } - public Foo.Builder color(String color) { + public Foo.Builder color(@Nullable String color) { this.instance.color = color; return this; } @@ -592,7 +592,7 @@ public Foo.Builder requiredColor(String requiredColor) { this.instance.requiredColor = requiredColor; return this; } - public Foo.Builder nullableColor(String nullableColor) { + public Foo.Builder nullableColor(@Nullable String nullableColor) { this.instance.nullableColor = nullableColor; return this; } diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/RequiredAndNullable.java b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/RequiredAndNullable.java index 52e671d1cee2..55653e9e6161 100644 --- a/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/RequiredAndNullable.java +++ b/samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/RequiredAndNullable.java @@ -262,15 +262,15 @@ protected Builder(RequiredAndNullable instance) { this.instance = instance; } - public RequiredAndNullable.Builder str(String str) { + public RequiredAndNullable.Builder str(@Nullable String str) { this.instance.str = str; return this; } - public RequiredAndNullable.Builder _file(File _file) { + public RequiredAndNullable.Builder _file(@Nullable File _file) { this.instance._file = _file; return this; } - public RequiredAndNullable.Builder color(String color) { + public RequiredAndNullable.Builder color(@Nullable String color) { this.instance.color = color; return this; } @@ -278,7 +278,7 @@ public RequiredAndNullable.Builder onlyRequired(String onlyRequired) { this.instance.onlyRequired = onlyRequired; return this; } - public RequiredAndNullable.Builder _list(List _list) { + public RequiredAndNullable.Builder _list(@Nullable List _list) { this.instance._list = _list; return this; } diff --git a/samples/client/petstore/java/restclient-springBoot4-jackson3/git_push.sh b/samples/client/petstore/java/restclient-springBoot4-jackson3/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/restclient-springBoot4-jackson3/git_push.sh +++ b/samples/client/petstore/java/restclient-springBoot4-jackson3/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/restclient-swagger2/git_push.sh b/samples/client/petstore/java/restclient-swagger2/git_push.sh index f53a75d4fabe..a35991cd51a1 100755 --- a/samples/client/petstore/java/restclient-swagger2/git_push.sh +++ b/samples/client/petstore/java/restclient-swagger2/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/restclient-useSingleRequestParameter-static/git_push.sh b/samples/client/petstore/java/restclient-useSingleRequestParameter-static/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/restclient-useSingleRequestParameter-static/git_push.sh +++ b/samples/client/petstore/java/restclient-useSingleRequestParameter-static/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/restclient-useSingleRequestParameter/git_push.sh b/samples/client/petstore/java/restclient-useSingleRequestParameter/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/restclient-useSingleRequestParameter/git_push.sh +++ b/samples/client/petstore/java/restclient-useSingleRequestParameter/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/resteasy/git_push.sh b/samples/client/petstore/java/resteasy/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/resteasy/git_push.sh +++ b/samples/client/petstore/java/resteasy/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/resttemplate-jakarta/git_push.sh b/samples/client/petstore/java/resttemplate-jakarta/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/resttemplate-jakarta/git_push.sh +++ b/samples/client/petstore/java/resttemplate-jakarta/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/resttemplate-springBoot4-jackson2/git_push.sh b/samples/client/petstore/java/resttemplate-springBoot4-jackson2/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/resttemplate-springBoot4-jackson2/git_push.sh +++ b/samples/client/petstore/java/resttemplate-springBoot4-jackson2/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/resttemplate-springBoot4-jackson3-jspecify/git_push.sh b/samples/client/petstore/java/resttemplate-springBoot4-jackson3-jspecify/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/resttemplate-springBoot4-jackson3-jspecify/git_push.sh +++ b/samples/client/petstore/java/resttemplate-springBoot4-jackson3-jspecify/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/resttemplate-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/FileContent.java b/samples/client/petstore/java/resttemplate-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/FileContent.java index a96749d9ef05..b0f00682525b 100644 --- a/samples/client/petstore/java/resttemplate-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/FileContent.java +++ b/samples/client/petstore/java/resttemplate-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/FileContent.java @@ -195,11 +195,11 @@ public FileContent.Builder name(String name) { this.instance.name = name; return this; } - public FileContent.Builder size(Integer size) { + public FileContent.Builder size(@Nullable Integer size) { this.instance.size = size; return this; } - public FileContent.Builder virusScan(VirusScanEnum virusScan) { + public FileContent.Builder virusScan(@Nullable VirusScanEnum virusScan) { this.instance.virusScan = virusScan; return this; } diff --git a/samples/client/petstore/java/resttemplate-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/Foo.java b/samples/client/petstore/java/resttemplate-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/Foo.java index 1371c0badfc0..ef899ba2185c 100644 --- a/samples/client/petstore/java/resttemplate-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/Foo.java +++ b/samples/client/petstore/java/resttemplate-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/Foo.java @@ -544,31 +544,31 @@ protected Builder(Foo instance) { this.instance = instance; } - public Foo.Builder dt(java.time.Instant dt) { + public Foo.Builder dt(java.time.@Nullable Instant dt) { this.instance.dt = dt; return this; } - public Foo.Builder nullableDt(java.time.Instant nullableDt) { + public Foo.Builder nullableDt(java.time.@Nullable Instant nullableDt) { this.instance.nullableDt = nullableDt; return this; } - public Foo.Builder binary(File binary) { + public Foo.Builder binary(@Nullable File binary) { this.instance.binary = binary; return this; } - public Foo.Builder nullableBinary(File nullableBinary) { + public Foo.Builder nullableBinary(@Nullable File nullableBinary) { this.instance.nullableBinary = nullableBinary; return this; } - public Foo.Builder listOfDt(List listOfDt) { + public Foo.Builder listOfDt(@Nullable List listOfDt) { this.instance.listOfDt = listOfDt; return this; } - public Foo.Builder listMinIntems(List listMinIntems) { + public Foo.Builder listMinIntems(@Nullable List listMinIntems) { this.instance.listMinIntems = listMinIntems; return this; } - public Foo.Builder nullableListMinIntems(List nullableListMinIntems) { + public Foo.Builder nullableListMinIntems(@Nullable List nullableListMinIntems) { this.instance.nullableListMinIntems = nullableListMinIntems; return this; } @@ -576,15 +576,15 @@ public Foo.Builder requiredDt(java.time.Instant requiredDt) { this.instance.requiredDt = requiredDt; return this; } - public Foo.Builder number(java.math.BigDecimal number) { + public Foo.Builder number(java.math.@Nullable BigDecimal number) { this.instance.number = number; return this; } - public Foo.Builder nullableNumber(java.math.BigDecimal nullableNumber) { + public Foo.Builder nullableNumber(java.math.@Nullable BigDecimal nullableNumber) { this.instance.nullableNumber = nullableNumber; return this; } - public Foo.Builder color(String color) { + public Foo.Builder color(@Nullable String color) { this.instance.color = color; return this; } @@ -592,7 +592,7 @@ public Foo.Builder requiredColor(String requiredColor) { this.instance.requiredColor = requiredColor; return this; } - public Foo.Builder nullableColor(String nullableColor) { + public Foo.Builder nullableColor(@Nullable String nullableColor) { this.instance.nullableColor = nullableColor; return this; } diff --git a/samples/client/petstore/java/resttemplate-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/RequiredAndNullable.java b/samples/client/petstore/java/resttemplate-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/RequiredAndNullable.java index 52e671d1cee2..55653e9e6161 100644 --- a/samples/client/petstore/java/resttemplate-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/RequiredAndNullable.java +++ b/samples/client/petstore/java/resttemplate-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/RequiredAndNullable.java @@ -262,15 +262,15 @@ protected Builder(RequiredAndNullable instance) { this.instance = instance; } - public RequiredAndNullable.Builder str(String str) { + public RequiredAndNullable.Builder str(@Nullable String str) { this.instance.str = str; return this; } - public RequiredAndNullable.Builder _file(File _file) { + public RequiredAndNullable.Builder _file(@Nullable File _file) { this.instance._file = _file; return this; } - public RequiredAndNullable.Builder color(String color) { + public RequiredAndNullable.Builder color(@Nullable String color) { this.instance.color = color; return this; } @@ -278,7 +278,7 @@ public RequiredAndNullable.Builder onlyRequired(String onlyRequired) { this.instance.onlyRequired = onlyRequired; return this; } - public RequiredAndNullable.Builder _list(List _list) { + public RequiredAndNullable.Builder _list(@Nullable List _list) { this.instance._list = _list; return this; } diff --git a/samples/client/petstore/java/resttemplate-springBoot4-jackson3/git_push.sh b/samples/client/petstore/java/resttemplate-springBoot4-jackson3/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/resttemplate-springBoot4-jackson3/git_push.sh +++ b/samples/client/petstore/java/resttemplate-springBoot4-jackson3/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/resttemplate-swagger2/git_push.sh b/samples/client/petstore/java/resttemplate-swagger2/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/resttemplate-swagger2/git_push.sh +++ b/samples/client/petstore/java/resttemplate-swagger2/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/resttemplate/git_push.sh b/samples/client/petstore/java/resttemplate/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/resttemplate/git_push.sh +++ b/samples/client/petstore/java/resttemplate/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 5d1a152b181d..0f65806d8c3d 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -169,11 +169,11 @@ protected Builder(AdditionalPropertiesClass instance) { this.instance = instance; } - public AdditionalPropertiesClass.Builder mapProperty(.annotation.Nullable Map mapProperty) { + public AdditionalPropertiesClass.Builder mapProperty(Map mapProperty) { this.instance.mapProperty = mapProperty; return this; } - public AdditionalPropertiesClass.Builder mapOfMapProperty(.annotation.Nullable Map> mapOfMapProperty) { + public AdditionalPropertiesClass.Builder mapOfMapProperty(Map> mapOfMapProperty) { this.instance.mapOfMapProperty = mapOfMapProperty; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java index 50d847512cad..2dc96b24c019 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java @@ -152,11 +152,11 @@ protected Builder(AllOfWithSingleRef instance) { this.instance = instance; } - public AllOfWithSingleRef.Builder username(.annotation.Nullable String username) { + public AllOfWithSingleRef.Builder username(String username) { this.instance.username = username; return this; } - public AllOfWithSingleRef.Builder singleRefType(.annotation.Nullable SingleRefType singleRefType) { + public AllOfWithSingleRef.Builder singleRefType(SingleRefType singleRefType) { this.instance.singleRefType = singleRefType; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Animal.java index 071cf0af0e43..bc426078b815 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Animal.java @@ -164,11 +164,11 @@ protected Builder(Animal instance) { this.instance = instance; } - public Animal.Builder className(.annotation.Nonnull String className) { + public Animal.Builder className(String className) { this.instance.className = className; return this; } - public Animal.Builder color(.annotation.Nullable String color) { + public Animal.Builder color(String color) { this.instance.color = color; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index cc3fd4127ad0..a84b55d58fb7 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -130,7 +130,7 @@ protected Builder(ArrayOfArrayOfNumberOnly instance) { this.instance = instance; } - public ArrayOfArrayOfNumberOnly.Builder arrayArrayNumber(.annotation.Nullable List> arrayArrayNumber) { + public ArrayOfArrayOfNumberOnly.Builder arrayArrayNumber(List> arrayArrayNumber) { this.instance.arrayArrayNumber = arrayArrayNumber; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index c718c52cd465..97964d91bd16 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -130,7 +130,7 @@ protected Builder(ArrayOfNumberOnly instance) { this.instance = instance; } - public ArrayOfNumberOnly.Builder arrayNumber(.annotation.Nullable List arrayNumber) { + public ArrayOfNumberOnly.Builder arrayNumber(List arrayNumber) { this.instance.arrayNumber = arrayNumber; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayTest.java index 93abb14d4456..de75936524de 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -212,15 +212,15 @@ protected Builder(ArrayTest instance) { this.instance = instance; } - public ArrayTest.Builder arrayOfString(.annotation.Nullable List arrayOfString) { + public ArrayTest.Builder arrayOfString(List arrayOfString) { this.instance.arrayOfString = arrayOfString; return this; } - public ArrayTest.Builder arrayArrayOfInteger(.annotation.Nullable List> arrayArrayOfInteger) { + public ArrayTest.Builder arrayArrayOfInteger(List> arrayArrayOfInteger) { this.instance.arrayArrayOfInteger = arrayArrayOfInteger; return this; } - public ArrayTest.Builder arrayArrayOfModel(.annotation.Nullable List> arrayArrayOfModel) { + public ArrayTest.Builder arrayArrayOfModel(List> arrayArrayOfModel) { this.instance.arrayArrayOfModel = arrayArrayOfModel; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Capitalization.java index b6e4f65c4f3f..faa935b6705d 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Capitalization.java @@ -283,27 +283,27 @@ protected Builder(Capitalization instance) { this.instance = instance; } - public Capitalization.Builder smallCamel(.annotation.Nullable String smallCamel) { + public Capitalization.Builder smallCamel(String smallCamel) { this.instance.smallCamel = smallCamel; return this; } - public Capitalization.Builder capitalCamel(.annotation.Nullable String capitalCamel) { + public Capitalization.Builder capitalCamel(String capitalCamel) { this.instance.capitalCamel = capitalCamel; return this; } - public Capitalization.Builder smallSnake(.annotation.Nullable String smallSnake) { + public Capitalization.Builder smallSnake(String smallSnake) { this.instance.smallSnake = smallSnake; return this; } - public Capitalization.Builder capitalSnake(.annotation.Nullable String capitalSnake) { + public Capitalization.Builder capitalSnake(String capitalSnake) { this.instance.capitalSnake = capitalSnake; return this; } - public Capitalization.Builder scAETHFlowPoints(.annotation.Nullable String scAETHFlowPoints) { + public Capitalization.Builder scAETHFlowPoints(String scAETHFlowPoints) { this.instance.scAETHFlowPoints = scAETHFlowPoints; return this; } - public Capitalization.Builder ATT_NAME(.annotation.Nullable String ATT_NAME) { + public Capitalization.Builder ATT_NAME(String ATT_NAME) { this.instance.ATT_NAME = ATT_NAME; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Cat.java index c3dd7fd591e1..278d26e9e079 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Cat.java @@ -145,17 +145,17 @@ protected Builder(Cat instance) { this.instance = instance; } - public Cat.Builder declawed(.annotation.Nullable Boolean declawed) { + public Cat.Builder declawed(Boolean declawed) { this.instance.declawed = declawed; return this; } - public Cat.Builder className(.annotation.Nonnull String className) { // inherited: true + public Cat.Builder className(String className) { // inherited: true super.className(className); return this; } - public Cat.Builder color(.annotation.Nullable String color) { // inherited: true + public Cat.Builder color(String color) { // inherited: true super.color(color); return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Category.java index 88abcdf20dfc..4dde8649ac28 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Category.java @@ -151,11 +151,11 @@ protected Builder(Category instance) { this.instance = instance; } - public Category.Builder id(.annotation.Nullable Long id) { + public Category.Builder id(Long id) { this.instance.id = id; return this; } - public Category.Builder name(.annotation.Nonnull String name) { + public Category.Builder name(String name) { this.instance.name = name; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ChildWithNullable.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ChildWithNullable.java index 8fb171486b6a..b056f8e4513a 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ChildWithNullable.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ChildWithNullable.java @@ -157,17 +157,17 @@ protected Builder(ChildWithNullable instance) { this.instance = instance; } - public ChildWithNullable.Builder otherProperty(.annotation.Nullable String otherProperty) { + public ChildWithNullable.Builder otherProperty(String otherProperty) { this.instance.otherProperty = otherProperty; return this; } - public ChildWithNullable.Builder type(.annotation.Nullable TypeEnum type) { // inherited: true + public ChildWithNullable.Builder type(TypeEnum type) { // inherited: true super.type(type); return this; } - public ChildWithNullable.Builder nullableProperty(.annotation.Nullable String nullableProperty) { // inherited: true + public ChildWithNullable.Builder nullableProperty(String nullableProperty) { // inherited: true super.nullableProperty(nullableProperty); return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ClassModel.java index a18529fae23d..93192f9a9183 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ClassModel.java @@ -118,7 +118,7 @@ protected Builder(ClassModel instance) { this.instance = instance; } - public ClassModel.Builder propertyClass(.annotation.Nullable String propertyClass) { + public ClassModel.Builder propertyClass(String propertyClass) { this.instance.propertyClass = propertyClass; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Client.java index 6e32bada2a42..b03bf4786e7b 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Client.java @@ -118,7 +118,7 @@ protected Builder(Client instance) { this.instance = instance; } - public Client.Builder client(.annotation.Nullable String client) { + public Client.Builder client(String client) { this.instance.client = client; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/DeprecatedObject.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/DeprecatedObject.java index 6748d931ee44..831cb3b9d51b 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/DeprecatedObject.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/DeprecatedObject.java @@ -120,7 +120,7 @@ protected Builder(DeprecatedObject instance) { this.instance = instance; } - public DeprecatedObject.Builder name(.annotation.Nullable String name) { + public DeprecatedObject.Builder name(String name) { this.instance.name = name; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Dog.java index 5a87a5f719a8..fa93dc88078d 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Dog.java @@ -145,17 +145,17 @@ protected Builder(Dog instance) { this.instance = instance; } - public Dog.Builder breed(.annotation.Nullable String breed) { + public Dog.Builder breed(String breed) { this.instance.breed = breed; return this; } - public Dog.Builder className(.annotation.Nonnull String className) { // inherited: true + public Dog.Builder className(String className) { // inherited: true super.className(className); return this; } - public Dog.Builder color(.annotation.Nullable String color) { // inherited: true + public Dog.Builder color(String color) { // inherited: true super.color(color); return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumArrays.java index cd9758fc99ab..2893ccf2b399 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -232,11 +232,11 @@ protected Builder(EnumArrays instance) { this.instance = instance; } - public EnumArrays.Builder justSymbol(.annotation.Nullable JustSymbolEnum justSymbol) { + public EnumArrays.Builder justSymbol(JustSymbolEnum justSymbol) { this.instance.justSymbol = justSymbol; return this; } - public EnumArrays.Builder arrayEnum(.annotation.Nullable List arrayEnum) { + public EnumArrays.Builder arrayEnum(List arrayEnum) { this.instance.arrayEnum = arrayEnum; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumTest.java index 4e65a8796762..25f047074e34 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/EnumTest.java @@ -521,23 +521,23 @@ protected Builder(EnumTest instance) { this.instance = instance; } - public EnumTest.Builder enumString(.annotation.Nullable EnumStringEnum enumString) { + public EnumTest.Builder enumString(EnumStringEnum enumString) { this.instance.enumString = enumString; return this; } - public EnumTest.Builder enumStringRequired(.annotation.Nonnull EnumStringRequiredEnum enumStringRequired) { + public EnumTest.Builder enumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.instance.enumStringRequired = enumStringRequired; return this; } - public EnumTest.Builder enumInteger(.annotation.Nullable EnumIntegerEnum enumInteger) { + public EnumTest.Builder enumInteger(EnumIntegerEnum enumInteger) { this.instance.enumInteger = enumInteger; return this; } - public EnumTest.Builder enumNumber(.annotation.Nullable EnumNumberEnum enumNumber) { + public EnumTest.Builder enumNumber(EnumNumberEnum enumNumber) { this.instance.enumNumber = enumNumber; return this; } - public EnumTest.Builder outerEnum(.annotation.Nullable OuterEnum outerEnum) { + public EnumTest.Builder outerEnum(OuterEnum outerEnum) { this.instance.outerEnum = JsonNullable.of(outerEnum); return this; } @@ -545,15 +545,15 @@ public EnumTest.Builder outerEnum(JsonNullable outerEnum) { this.instance.outerEnum = outerEnum; return this; } - public EnumTest.Builder outerEnumInteger(.annotation.Nullable OuterEnumInteger outerEnumInteger) { + public EnumTest.Builder outerEnumInteger(OuterEnumInteger outerEnumInteger) { this.instance.outerEnumInteger = outerEnumInteger; return this; } - public EnumTest.Builder outerEnumDefaultValue(.annotation.Nullable OuterEnumDefaultValue outerEnumDefaultValue) { + public EnumTest.Builder outerEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) { this.instance.outerEnumDefaultValue = outerEnumDefaultValue; return this; } - public EnumTest.Builder outerEnumIntegerDefaultValue(.annotation.Nullable OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) { + public EnumTest.Builder outerEnumIntegerDefaultValue(OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) { this.instance.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java index 4a4785724749..eba73f33be81 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java @@ -163,11 +163,11 @@ protected Builder(FakeBigDecimalMap200Response instance) { this.instance = instance; } - public FakeBigDecimalMap200Response.Builder someId(.annotation.Nullable BigDecimal someId) { + public FakeBigDecimalMap200Response.Builder someId(BigDecimal someId) { this.instance.someId = someId; return this; } - public FakeBigDecimalMap200Response.Builder someMap(.annotation.Nullable Map someMap) { + public FakeBigDecimalMap200Response.Builder someMap(Map someMap) { this.instance.someMap = someMap; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 112ae4d5dbc4..3d1a8e5740c3 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -163,11 +163,11 @@ protected Builder(FileSchemaTestClass instance) { this.instance = instance; } - public FileSchemaTestClass.Builder _file(.annotation.Nullable ModelFile _file) { + public FileSchemaTestClass.Builder _file(ModelFile _file) { this.instance._file = _file; return this; } - public FileSchemaTestClass.Builder files(.annotation.Nullable List files) { + public FileSchemaTestClass.Builder files(List files) { this.instance.files = files; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Foo.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Foo.java index dac480a051cf..9f4b2e91c61e 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Foo.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Foo.java @@ -118,7 +118,7 @@ protected Builder(Foo instance) { this.instance = instance; } - public Foo.Builder bar(.annotation.Nullable String bar) { + public Foo.Builder bar(String bar) { this.instance.bar = bar; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java index b6eafbb28bdb..13d7b413442d 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java @@ -120,7 +120,7 @@ protected Builder(FooGetDefaultResponse instance) { this.instance = instance; } - public FooGetDefaultResponse.Builder string(.annotation.Nullable Foo string) { + public FooGetDefaultResponse.Builder string(Foo string) { this.instance.string = string; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FormatTest.java index daebe3165087..fa88652ee1e4 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/FormatTest.java @@ -629,67 +629,67 @@ protected Builder(FormatTest instance) { this.instance = instance; } - public FormatTest.Builder integer(.annotation.Nullable Integer integer) { + public FormatTest.Builder integer(Integer integer) { this.instance.integer = integer; return this; } - public FormatTest.Builder int32(.annotation.Nullable Integer int32) { + public FormatTest.Builder int32(Integer int32) { this.instance.int32 = int32; return this; } - public FormatTest.Builder int64(.annotation.Nullable Long int64) { + public FormatTest.Builder int64(Long int64) { this.instance.int64 = int64; return this; } - public FormatTest.Builder number(.annotation.Nonnull BigDecimal number) { + public FormatTest.Builder number(BigDecimal number) { this.instance.number = number; return this; } - public FormatTest.Builder _float(.annotation.Nullable Float _float) { + public FormatTest.Builder _float(Float _float) { this.instance._float = _float; return this; } - public FormatTest.Builder _double(.annotation.Nullable Double _double) { + public FormatTest.Builder _double(Double _double) { this.instance._double = _double; return this; } - public FormatTest.Builder decimal(.annotation.Nullable BigDecimal decimal) { + public FormatTest.Builder decimal(BigDecimal decimal) { this.instance.decimal = decimal; return this; } - public FormatTest.Builder string(.annotation.Nullable String string) { + public FormatTest.Builder string(String string) { this.instance.string = string; return this; } - public FormatTest.Builder _byte(.annotation.Nonnull byte[] _byte) { + public FormatTest.Builder _byte(byte[] _byte) { this.instance._byte = _byte; return this; } - public FormatTest.Builder binary(.annotation.Nullable File binary) { + public FormatTest.Builder binary(File binary) { this.instance.binary = binary; return this; } - public FormatTest.Builder date(.annotation.Nonnull LocalDate date) { + public FormatTest.Builder date(LocalDate date) { this.instance.date = date; return this; } - public FormatTest.Builder dateTime(.annotation.Nullable OffsetDateTime dateTime) { + public FormatTest.Builder dateTime(OffsetDateTime dateTime) { this.instance.dateTime = dateTime; return this; } - public FormatTest.Builder uuid(.annotation.Nullable UUID uuid) { + public FormatTest.Builder uuid(UUID uuid) { this.instance.uuid = uuid; return this; } - public FormatTest.Builder password(.annotation.Nonnull String password) { + public FormatTest.Builder password(String password) { this.instance.password = password; return this; } - public FormatTest.Builder patternWithDigits(.annotation.Nullable String patternWithDigits) { + public FormatTest.Builder patternWithDigits(String patternWithDigits) { this.instance.patternWithDigits = patternWithDigits; return this; } - public FormatTest.Builder patternWithDigitsAndDelimiter(.annotation.Nullable String patternWithDigitsAndDelimiter) { + public FormatTest.Builder patternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) { this.instance.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index 65f72986f4f3..a653e468a719 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -134,11 +134,11 @@ protected Builder(HasOnlyReadOnly instance) { this.instance = instance; } - public HasOnlyReadOnly.Builder bar(.annotation.Nullable String bar) { + public HasOnlyReadOnly.Builder bar(String bar) { this.instance.bar = bar; return this; } - public HasOnlyReadOnly.Builder foo(.annotation.Nullable String foo) { + public HasOnlyReadOnly.Builder foo(String foo) { this.instance.foo = foo; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/HealthCheckResult.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/HealthCheckResult.java index 13071b660e4a..dd17123eac3f 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/HealthCheckResult.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/HealthCheckResult.java @@ -141,7 +141,7 @@ protected Builder(HealthCheckResult instance) { this.instance = instance; } - public HealthCheckResult.Builder nullableMessage(.annotation.Nullable String nullableMessage) { + public HealthCheckResult.Builder nullableMessage(String nullableMessage) { this.instance.nullableMessage = JsonNullable.of(nullableMessage); return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/MapTest.java index ad867704788a..1eea6e308972 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/MapTest.java @@ -286,19 +286,19 @@ protected Builder(MapTest instance) { this.instance = instance; } - public MapTest.Builder mapMapOfString(.annotation.Nullable Map> mapMapOfString) { + public MapTest.Builder mapMapOfString(Map> mapMapOfString) { this.instance.mapMapOfString = mapMapOfString; return this; } - public MapTest.Builder mapOfEnumString(.annotation.Nullable Map mapOfEnumString) { + public MapTest.Builder mapOfEnumString(Map mapOfEnumString) { this.instance.mapOfEnumString = mapOfEnumString; return this; } - public MapTest.Builder directMap(.annotation.Nullable Map directMap) { + public MapTest.Builder directMap(Map directMap) { this.instance.directMap = directMap; return this; } - public MapTest.Builder indirectMap(.annotation.Nullable Map indirectMap) { + public MapTest.Builder indirectMap(Map indirectMap) { this.instance.indirectMap = indirectMap; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 5013de30d3e2..2fe879d645f6 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -197,15 +197,15 @@ protected Builder(MixedPropertiesAndAdditionalPropertiesClass instance) { this.instance = instance; } - public MixedPropertiesAndAdditionalPropertiesClass.Builder uuid(.annotation.Nullable UUID uuid) { + public MixedPropertiesAndAdditionalPropertiesClass.Builder uuid(UUID uuid) { this.instance.uuid = uuid; return this; } - public MixedPropertiesAndAdditionalPropertiesClass.Builder dateTime(.annotation.Nullable OffsetDateTime dateTime) { + public MixedPropertiesAndAdditionalPropertiesClass.Builder dateTime(OffsetDateTime dateTime) { this.instance.dateTime = dateTime; return this; } - public MixedPropertiesAndAdditionalPropertiesClass.Builder map(.annotation.Nullable Map map) { + public MixedPropertiesAndAdditionalPropertiesClass.Builder map(Map map) { this.instance.map = map; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Model200Response.java index 9db5f6fd2585..cf1e7cb7ffa4 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Model200Response.java @@ -152,11 +152,11 @@ protected Builder(Model200Response instance) { this.instance = instance; } - public Model200Response.Builder name(.annotation.Nullable Integer name) { + public Model200Response.Builder name(Integer name) { this.instance.name = name; return this; } - public Model200Response.Builder propertyClass(.annotation.Nullable String propertyClass) { + public Model200Response.Builder propertyClass(String propertyClass) { this.instance.propertyClass = propertyClass; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 2bf29f1b8aaf..617f4a76d42d 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -185,15 +185,15 @@ protected Builder(ModelApiResponse instance) { this.instance = instance; } - public ModelApiResponse.Builder code(.annotation.Nullable Integer code) { + public ModelApiResponse.Builder code(Integer code) { this.instance.code = code; return this; } - public ModelApiResponse.Builder type(.annotation.Nullable String type) { + public ModelApiResponse.Builder type(String type) { this.instance.type = type; return this; } - public ModelApiResponse.Builder message(.annotation.Nullable String message) { + public ModelApiResponse.Builder message(String message) { this.instance.message = message; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelFile.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelFile.java index 5d60492d1ddc..90dbe3ef32de 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelFile.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelFile.java @@ -119,7 +119,7 @@ protected Builder(ModelFile instance) { this.instance = instance; } - public ModelFile.Builder sourceURI(.annotation.Nullable String sourceURI) { + public ModelFile.Builder sourceURI(String sourceURI) { this.instance.sourceURI = sourceURI; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelList.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelList.java index a435cfd4cda2..f6391ab22c8e 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelList.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelList.java @@ -119,7 +119,7 @@ protected Builder(ModelList instance) { this.instance = instance; } - public ModelList.Builder _123list(.annotation.Nullable String _123list) { + public ModelList.Builder _123list(String _123list) { this.instance._123list = _123list; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelReturn.java index d8d11febd626..30ad3b06a933 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -119,7 +119,7 @@ protected Builder(ModelReturn instance) { this.instance = instance; } - public ModelReturn.Builder _return(.annotation.Nullable Integer _return) { + public ModelReturn.Builder _return(Integer _return) { this.instance._return = _return; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Name.java index b57fd1808fab..946cd9c9e73b 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Name.java @@ -207,19 +207,19 @@ protected Builder(Name instance) { this.instance = instance; } - public Name.Builder name(.annotation.Nonnull Integer name) { + public Name.Builder name(Integer name) { this.instance.name = name; return this; } - public Name.Builder snakeCase(.annotation.Nullable Integer snakeCase) { + public Name.Builder snakeCase(Integer snakeCase) { this.instance.snakeCase = snakeCase; return this; } - public Name.Builder property(.annotation.Nullable String property) { + public Name.Builder property(String property) { this.instance.property = property; return this; } - public Name.Builder _123number(.annotation.Nullable Integer _123number) { + public Name.Builder _123number(Integer _123number) { this.instance._123number = _123number; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/NullableClass.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/NullableClass.java index 8732abf49871..1dfe7ed13186 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/NullableClass.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/NullableClass.java @@ -697,7 +697,7 @@ protected Builder(NullableClass instance) { this.instance = instance; } - public NullableClass.Builder integerProp(.annotation.Nullable Integer integerProp) { + public NullableClass.Builder integerProp(Integer integerProp) { this.instance.integerProp = JsonNullable.of(integerProp); return this; } @@ -705,7 +705,7 @@ public NullableClass.Builder integerProp(JsonNullable integerProp) { this.instance.integerProp = integerProp; return this; } - public NullableClass.Builder numberProp(.annotation.Nullable BigDecimal numberProp) { + public NullableClass.Builder numberProp(BigDecimal numberProp) { this.instance.numberProp = JsonNullable.of(numberProp); return this; } @@ -713,7 +713,7 @@ public NullableClass.Builder numberProp(JsonNullable numberProp) { this.instance.numberProp = numberProp; return this; } - public NullableClass.Builder booleanProp(.annotation.Nullable Boolean booleanProp) { + public NullableClass.Builder booleanProp(Boolean booleanProp) { this.instance.booleanProp = JsonNullable.of(booleanProp); return this; } @@ -721,7 +721,7 @@ public NullableClass.Builder booleanProp(JsonNullable booleanProp) { this.instance.booleanProp = booleanProp; return this; } - public NullableClass.Builder stringProp(.annotation.Nullable String stringProp) { + public NullableClass.Builder stringProp(String stringProp) { this.instance.stringProp = JsonNullable.of(stringProp); return this; } @@ -729,7 +729,7 @@ public NullableClass.Builder stringProp(JsonNullable stringProp) { this.instance.stringProp = stringProp; return this; } - public NullableClass.Builder dateProp(.annotation.Nullable LocalDate dateProp) { + public NullableClass.Builder dateProp(LocalDate dateProp) { this.instance.dateProp = JsonNullable.of(dateProp); return this; } @@ -737,7 +737,7 @@ public NullableClass.Builder dateProp(JsonNullable dateProp) { this.instance.dateProp = dateProp; return this; } - public NullableClass.Builder datetimeProp(.annotation.Nullable OffsetDateTime datetimeProp) { + public NullableClass.Builder datetimeProp(OffsetDateTime datetimeProp) { this.instance.datetimeProp = JsonNullable.of(datetimeProp); return this; } @@ -745,7 +745,7 @@ public NullableClass.Builder datetimeProp(JsonNullable datetimeP this.instance.datetimeProp = datetimeProp; return this; } - public NullableClass.Builder arrayNullableProp(.annotation.Nullable List arrayNullableProp) { + public NullableClass.Builder arrayNullableProp(List arrayNullableProp) { this.instance.arrayNullableProp = JsonNullable.>of(arrayNullableProp); return this; } @@ -753,7 +753,7 @@ public NullableClass.Builder arrayNullableProp(JsonNullable> arrayN this.instance.arrayNullableProp = arrayNullableProp; return this; } - public NullableClass.Builder arrayAndItemsNullableProp(.annotation.Nullable List arrayAndItemsNullableProp) { + public NullableClass.Builder arrayAndItemsNullableProp(List arrayAndItemsNullableProp) { this.instance.arrayAndItemsNullableProp = JsonNullable.>of(arrayAndItemsNullableProp); return this; } @@ -761,11 +761,11 @@ public NullableClass.Builder arrayAndItemsNullableProp(JsonNullable this.instance.arrayAndItemsNullableProp = arrayAndItemsNullableProp; return this; } - public NullableClass.Builder arrayItemsNullable(.annotation.Nullable List arrayItemsNullable) { + public NullableClass.Builder arrayItemsNullable(List arrayItemsNullable) { this.instance.arrayItemsNullable = arrayItemsNullable; return this; } - public NullableClass.Builder objectNullableProp(.annotation.Nullable Map objectNullableProp) { + public NullableClass.Builder objectNullableProp(Map objectNullableProp) { this.instance.objectNullableProp = JsonNullable.>of(objectNullableProp); return this; } @@ -773,7 +773,7 @@ public NullableClass.Builder objectNullableProp(JsonNullable this.instance.objectNullableProp = objectNullableProp; return this; } - public NullableClass.Builder objectAndItemsNullableProp(.annotation.Nullable Map objectAndItemsNullableProp) { + public NullableClass.Builder objectAndItemsNullableProp(Map objectAndItemsNullableProp) { this.instance.objectAndItemsNullableProp = JsonNullable.>of(objectAndItemsNullableProp); return this; } @@ -781,7 +781,7 @@ public NullableClass.Builder objectAndItemsNullableProp(JsonNullable objectItemsNullable) { + public NullableClass.Builder objectItemsNullable(Map objectItemsNullable) { this.instance.objectItemsNullable = objectItemsNullable; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/NumberOnly.java index 360a46048e09..43ef5188ca1a 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -119,7 +119,7 @@ protected Builder(NumberOnly instance) { this.instance = instance; } - public NumberOnly.Builder justNumber(.annotation.Nullable BigDecimal justNumber) { + public NumberOnly.Builder justNumber(BigDecimal justNumber) { this.instance.justNumber = justNumber; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java index 3d60a2eb82c4..89efce0ec410 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java @@ -236,19 +236,19 @@ protected Builder(ObjectWithDeprecatedFields instance) { this.instance = instance; } - public ObjectWithDeprecatedFields.Builder uuid(.annotation.Nullable String uuid) { + public ObjectWithDeprecatedFields.Builder uuid(String uuid) { this.instance.uuid = uuid; return this; } - public ObjectWithDeprecatedFields.Builder id(.annotation.Nullable BigDecimal id) { + public ObjectWithDeprecatedFields.Builder id(BigDecimal id) { this.instance.id = id; return this; } - public ObjectWithDeprecatedFields.Builder deprecatedRef(.annotation.Nullable DeprecatedObject deprecatedRef) { + public ObjectWithDeprecatedFields.Builder deprecatedRef(DeprecatedObject deprecatedRef) { this.instance.deprecatedRef = deprecatedRef; return this; } - public ObjectWithDeprecatedFields.Builder bars(.annotation.Nullable List bars) { + public ObjectWithDeprecatedFields.Builder bars(List bars) { this.instance.bars = bars; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Order.java index ff098f5316c6..82d9b4836612 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Order.java @@ -321,27 +321,27 @@ protected Builder(Order instance) { this.instance = instance; } - public Order.Builder id(.annotation.Nullable Long id) { + public Order.Builder id(Long id) { this.instance.id = id; return this; } - public Order.Builder petId(.annotation.Nullable Long petId) { + public Order.Builder petId(Long petId) { this.instance.petId = petId; return this; } - public Order.Builder quantity(.annotation.Nullable Integer quantity) { + public Order.Builder quantity(Integer quantity) { this.instance.quantity = quantity; return this; } - public Order.Builder shipDate(.annotation.Nullable OffsetDateTime shipDate) { + public Order.Builder shipDate(OffsetDateTime shipDate) { this.instance.shipDate = shipDate; return this; } - public Order.Builder status(.annotation.Nullable StatusEnum status) { + public Order.Builder status(StatusEnum status) { this.instance.status = status; return this; } - public Order.Builder complete(.annotation.Nullable Boolean complete) { + public Order.Builder complete(Boolean complete) { this.instance.complete = complete; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterComposite.java index d9bf311f48a3..d3a84eef904d 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -185,15 +185,15 @@ protected Builder(OuterComposite instance) { this.instance = instance; } - public OuterComposite.Builder myNumber(.annotation.Nullable BigDecimal myNumber) { + public OuterComposite.Builder myNumber(BigDecimal myNumber) { this.instance.myNumber = myNumber; return this; } - public OuterComposite.Builder myString(.annotation.Nullable String myString) { + public OuterComposite.Builder myString(String myString) { this.instance.myString = myString; return this; } - public OuterComposite.Builder myBoolean(.annotation.Nullable Boolean myBoolean) { + public OuterComposite.Builder myBoolean(Boolean myBoolean) { this.instance.myBoolean = myBoolean; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java index 22aeb1b7b14d..43543ddf8ae6 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java @@ -119,7 +119,7 @@ protected Builder(OuterObjectWithEnumProperty instance) { this.instance = instance; } - public OuterObjectWithEnumProperty.Builder value(.annotation.Nonnull OuterEnumInteger value) { + public OuterObjectWithEnumProperty.Builder value(OuterEnumInteger value) { this.instance.value = value; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ParentWithNullable.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ParentWithNullable.java index 31aff58da34f..b65eaddab496 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ParentWithNullable.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ParentWithNullable.java @@ -219,11 +219,11 @@ protected Builder(ParentWithNullable instance) { this.instance = instance; } - public ParentWithNullable.Builder type(.annotation.Nullable TypeEnum type) { + public ParentWithNullable.Builder type(TypeEnum type) { this.instance.type = type; return this; } - public ParentWithNullable.Builder nullableProperty(.annotation.Nullable String nullableProperty) { + public ParentWithNullable.Builder nullableProperty(String nullableProperty) { this.instance.nullableProperty = JsonNullable.of(nullableProperty); return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Pet.java index 4840104bcb33..751b311efbc0 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Pet.java @@ -345,27 +345,27 @@ protected Builder(Pet instance) { this.instance = instance; } - public Pet.Builder id(.annotation.Nullable Long id) { + public Pet.Builder id(Long id) { this.instance.id = id; return this; } - public Pet.Builder category(.annotation.Nullable Category category) { + public Pet.Builder category(Category category) { this.instance.category = category; return this; } - public Pet.Builder name(.annotation.Nonnull String name) { + public Pet.Builder name(String name) { this.instance.name = name; return this; } - public Pet.Builder photoUrls(.annotation.Nonnull Set photoUrls) { + public Pet.Builder photoUrls(Set photoUrls) { this.instance.photoUrls = photoUrls; return this; } - public Pet.Builder tags(.annotation.Nullable List tags) { + public Pet.Builder tags(List tags) { this.instance.tags = tags; return this; } - public Pet.Builder status(.annotation.Nullable StatusEnum status) { + public Pet.Builder status(StatusEnum status) { this.instance.status = status; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index 11a2c9f76076..95bd3f297768 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -150,11 +150,11 @@ protected Builder(ReadOnlyFirst instance) { this.instance = instance; } - public ReadOnlyFirst.Builder bar(.annotation.Nullable String bar) { + public ReadOnlyFirst.Builder bar(String bar) { this.instance.bar = bar; return this; } - public ReadOnlyFirst.Builder baz(.annotation.Nullable String baz) { + public ReadOnlyFirst.Builder baz(String baz) { this.instance.baz = baz; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/SpecialModelName.java index befac3502b08..cc3bf2274e87 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -119,7 +119,7 @@ protected Builder(SpecialModelName instance) { this.instance = instance; } - public SpecialModelName.Builder $specialPropertyName(.annotation.Nullable Long $specialPropertyName) { + public SpecialModelName.Builder $specialPropertyName(Long $specialPropertyName) { this.instance.$specialPropertyName = $specialPropertyName; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Tag.java index b7c3951c22ae..9255abc312b6 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/Tag.java @@ -151,11 +151,11 @@ protected Builder(Tag instance) { this.instance = instance; } - public Tag.Builder id(.annotation.Nullable Long id) { + public Tag.Builder id(Long id) { this.instance.id = id; return this; } - public Tag.Builder name(.annotation.Nullable String name) { + public Tag.Builder name(String name) { this.instance.name = name; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java index 90a0d191e345..5ca65c138163 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java @@ -168,7 +168,7 @@ protected Builder(TestInlineFreeformAdditionalPropertiesRequest instance) { this.instance = instance; } - public TestInlineFreeformAdditionalPropertiesRequest.Builder someProperty(.annotation.Nullable String someProperty) { + public TestInlineFreeformAdditionalPropertiesRequest.Builder someProperty(String someProperty) { this.instance.someProperty = someProperty; return this; } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/User.java index 29511a2c8e25..41846ea56d4c 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/User.java @@ -349,35 +349,35 @@ protected Builder(User instance) { this.instance = instance; } - public User.Builder id(.annotation.Nullable Long id) { + public User.Builder id(Long id) { this.instance.id = id; return this; } - public User.Builder username(.annotation.Nullable String username) { + public User.Builder username(String username) { this.instance.username = username; return this; } - public User.Builder firstName(.annotation.Nullable String firstName) { + public User.Builder firstName(String firstName) { this.instance.firstName = firstName; return this; } - public User.Builder lastName(.annotation.Nullable String lastName) { + public User.Builder lastName(String lastName) { this.instance.lastName = lastName; return this; } - public User.Builder email(.annotation.Nullable String email) { + public User.Builder email(String email) { this.instance.email = email; return this; } - public User.Builder password(.annotation.Nullable String password) { + public User.Builder password(String password) { this.instance.password = password; return this; } - public User.Builder phone(.annotation.Nullable String phone) { + public User.Builder phone(String phone) { this.instance.phone = phone; return this; } - public User.Builder userStatus(.annotation.Nullable Integer userStatus) { + public User.Builder userStatus(Integer userStatus) { this.instance.userStatus = userStatus; return this; } diff --git a/samples/client/petstore/java/retrofit2-play26/git_push.sh b/samples/client/petstore/java/retrofit2-play26/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/retrofit2-play26/git_push.sh +++ b/samples/client/petstore/java/retrofit2-play26/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/retrofit2/git_push.sh b/samples/client/petstore/java/retrofit2/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/retrofit2/git_push.sh +++ b/samples/client/petstore/java/retrofit2/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/retrofit2rx3/git_push.sh b/samples/client/petstore/java/retrofit2rx3/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/retrofit2rx3/git_push.sh +++ b/samples/client/petstore/java/retrofit2rx3/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/vertx-no-nullable/git_push.sh b/samples/client/petstore/java/vertx-no-nullable/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/vertx-no-nullable/git_push.sh +++ b/samples/client/petstore/java/vertx-no-nullable/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/vertx-supportVertxFuture/git_push.sh b/samples/client/petstore/java/vertx-supportVertxFuture/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/vertx-supportVertxFuture/git_push.sh +++ b/samples/client/petstore/java/vertx-supportVertxFuture/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/vertx/git_push.sh b/samples/client/petstore/java/vertx/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/vertx/git_push.sh +++ b/samples/client/petstore/java/vertx/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/vertx5-supportVertxFuture/git_push.sh b/samples/client/petstore/java/vertx5-supportVertxFuture/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/vertx5-supportVertxFuture/git_push.sh +++ b/samples/client/petstore/java/vertx5-supportVertxFuture/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/vertx5/git_push.sh b/samples/client/petstore/java/vertx5/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/vertx5/git_push.sh +++ b/samples/client/petstore/java/vertx5/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/webclient-jakarta/git_push.sh b/samples/client/petstore/java/webclient-jakarta/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/webclient-jakarta/git_push.sh +++ b/samples/client/petstore/java/webclient-jakarta/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/webclient-nullable-arrays/git_push.sh b/samples/client/petstore/java/webclient-nullable-arrays/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/webclient-nullable-arrays/git_push.sh +++ b/samples/client/petstore/java/webclient-nullable-arrays/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/webclient-springBoot4-jackson3-jspecify/git_push.sh b/samples/client/petstore/java/webclient-springBoot4-jackson3-jspecify/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/webclient-springBoot4-jackson3-jspecify/git_push.sh +++ b/samples/client/petstore/java/webclient-springBoot4-jackson3-jspecify/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/webclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/FileContent.java b/samples/client/petstore/java/webclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/FileContent.java index be515019c1b1..f93380d95eac 100644 --- a/samples/client/petstore/java/webclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/FileContent.java +++ b/samples/client/petstore/java/webclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/FileContent.java @@ -194,11 +194,11 @@ public FileContent.Builder name(String name) { this.instance.name = name; return this; } - public FileContent.Builder size(Integer size) { + public FileContent.Builder size(@Nullable Integer size) { this.instance.size = size; return this; } - public FileContent.Builder virusScan(VirusScanEnum virusScan) { + public FileContent.Builder virusScan(@Nullable VirusScanEnum virusScan) { this.instance.virusScan = virusScan; return this; } diff --git a/samples/client/petstore/java/webclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/Foo.java b/samples/client/petstore/java/webclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/Foo.java index 85505efe219b..7157e7d7261d 100644 --- a/samples/client/petstore/java/webclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/Foo.java +++ b/samples/client/petstore/java/webclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/Foo.java @@ -543,31 +543,31 @@ protected Builder(Foo instance) { this.instance = instance; } - public Foo.Builder dt(java.time.Instant dt) { + public Foo.Builder dt(java.time.@Nullable Instant dt) { this.instance.dt = dt; return this; } - public Foo.Builder nullableDt(java.time.Instant nullableDt) { + public Foo.Builder nullableDt(java.time.@Nullable Instant nullableDt) { this.instance.nullableDt = nullableDt; return this; } - public Foo.Builder binary(File binary) { + public Foo.Builder binary(@Nullable File binary) { this.instance.binary = binary; return this; } - public Foo.Builder nullableBinary(File nullableBinary) { + public Foo.Builder nullableBinary(@Nullable File nullableBinary) { this.instance.nullableBinary = nullableBinary; return this; } - public Foo.Builder listOfDt(List listOfDt) { + public Foo.Builder listOfDt(@Nullable List listOfDt) { this.instance.listOfDt = listOfDt; return this; } - public Foo.Builder listMinIntems(List listMinIntems) { + public Foo.Builder listMinIntems(@Nullable List listMinIntems) { this.instance.listMinIntems = listMinIntems; return this; } - public Foo.Builder nullableListMinIntems(List nullableListMinIntems) { + public Foo.Builder nullableListMinIntems(@Nullable List nullableListMinIntems) { this.instance.nullableListMinIntems = nullableListMinIntems; return this; } @@ -575,15 +575,15 @@ public Foo.Builder requiredDt(java.time.Instant requiredDt) { this.instance.requiredDt = requiredDt; return this; } - public Foo.Builder number(java.math.BigDecimal number) { + public Foo.Builder number(java.math.@Nullable BigDecimal number) { this.instance.number = number; return this; } - public Foo.Builder nullableNumber(java.math.BigDecimal nullableNumber) { + public Foo.Builder nullableNumber(java.math.@Nullable BigDecimal nullableNumber) { this.instance.nullableNumber = nullableNumber; return this; } - public Foo.Builder color(String color) { + public Foo.Builder color(@Nullable String color) { this.instance.color = color; return this; } @@ -591,7 +591,7 @@ public Foo.Builder requiredColor(String requiredColor) { this.instance.requiredColor = requiredColor; return this; } - public Foo.Builder nullableColor(String nullableColor) { + public Foo.Builder nullableColor(@Nullable String nullableColor) { this.instance.nullableColor = nullableColor; return this; } diff --git a/samples/client/petstore/java/webclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/RequiredAndNullable.java b/samples/client/petstore/java/webclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/RequiredAndNullable.java index 0f084bc5aea1..9c18ec5777e1 100644 --- a/samples/client/petstore/java/webclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/RequiredAndNullable.java +++ b/samples/client/petstore/java/webclient-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/model/RequiredAndNullable.java @@ -261,15 +261,15 @@ protected Builder(RequiredAndNullable instance) { this.instance = instance; } - public RequiredAndNullable.Builder str(String str) { + public RequiredAndNullable.Builder str(@Nullable String str) { this.instance.str = str; return this; } - public RequiredAndNullable.Builder _file(File _file) { + public RequiredAndNullable.Builder _file(@Nullable File _file) { this.instance._file = _file; return this; } - public RequiredAndNullable.Builder color(String color) { + public RequiredAndNullable.Builder color(@Nullable String color) { this.instance.color = color; return this; } @@ -277,7 +277,7 @@ public RequiredAndNullable.Builder onlyRequired(String onlyRequired) { this.instance.onlyRequired = onlyRequired; return this; } - public RequiredAndNullable.Builder _list(List _list) { + public RequiredAndNullable.Builder _list(@Nullable List _list) { this.instance._list = _list; return this; } diff --git a/samples/client/petstore/java/webclient-springBoot4-jackson3/git_push.sh b/samples/client/petstore/java/webclient-springBoot4-jackson3/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/webclient-springBoot4-jackson3/git_push.sh +++ b/samples/client/petstore/java/webclient-springBoot4-jackson3/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/webclient-swagger2/git_push.sh b/samples/client/petstore/java/webclient-swagger2/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/webclient-swagger2/git_push.sh +++ b/samples/client/petstore/java/webclient-swagger2/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/webclient-useSingleRequestParameter/git_push.sh b/samples/client/petstore/java/webclient-useSingleRequestParameter/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/webclient-useSingleRequestParameter/git_push.sh +++ b/samples/client/petstore/java/webclient-useSingleRequestParameter/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/java/webclient/git_push.sh b/samples/client/petstore/java/webclient/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/java/webclient/git_push.sh +++ b/samples/client/petstore/java/webclient/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/javascript-apollo/git_push.sh b/samples/client/petstore/javascript-apollo/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/javascript-apollo/git_push.sh +++ b/samples/client/petstore/javascript-apollo/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/javascript-es6/git_push.sh b/samples/client/petstore/javascript-es6/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/javascript-es6/git_push.sh +++ b/samples/client/petstore/javascript-es6/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/javascript-promise-es6/git_push.sh b/samples/client/petstore/javascript-promise-es6/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/client/petstore/javascript-promise-es6/git_push.sh +++ b/samples/client/petstore/javascript-promise-es6/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/client/petstore/kotlin-explicit/src/main/kotlin/org/openapitools/client/models/Tag.kt b/samples/client/petstore/kotlin-explicit/src/main/kotlin/org/openapitools/client/models/Tag.kt index e69de29bb2d1..843047a1b08e 100644 --- a/samples/client/petstore/kotlin-explicit/src/main/kotlin/org/openapitools/client/models/Tag.kt +++ b/samples/client/petstore/kotlin-explicit/src/main/kotlin/org/openapitools/client/models/Tag.kt @@ -0,0 +1,50 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "DuplicatedCode", + "EnumEntryName", + "RemoveRedundantQualifierName", + "RemoveRedundantCallsOfConversionMethods", + "REDUNDANT_CALL_OF_CONVERSION_METHOD", + "RedundantUnitReturnType", + "RemoveEmptyClassBody", + "UnnecessaryVariable", + "UnusedImport", + "UnnecessaryVariable", + "unused" +) + +package org.openapitools.client.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * A tag for a pet + * + * @param id + * @param name + */ + + +public data class Tag ( + + @Json(name = "id") + val id: kotlin.Long? = null, + + @Json(name = "name") + val name: kotlin.String? = null + +) { + + +} + diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/git_push.sh b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/git_push.sh +++ b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/git_push.sh b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/git_push.sh +++ b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/fake_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/fake_api.dart index 2c26b06536d9..6e7485dfd447 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/fake_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/fake_api.dart @@ -304,6 +304,7 @@ class FakeApi { final _queryParameters = { if (query1 != null) r'query_1': encodeQueryParameter(_serializers, query1, const FullType(String)), }; + removeNullQueryParameters(_queryParameters); dynamic _bodyData; @@ -1042,6 +1043,7 @@ class FakeApi { final _queryParameters = { r'query': encodeQueryParameter(_serializers, query, const FullType(String)), }; + removeNullQueryParameters(_queryParameters); dynamic _bodyData; @@ -1345,6 +1347,7 @@ class FakeApi { if (enumQueryDouble != null) r'enum_query_double': encodeQueryParameter(_serializers, enumQueryDouble, const FullType(double)), if (enumQueryModelArray != null) r'enum_query_model_array': encodeCollectionQueryParameter(_serializers, enumQueryModelArray, const FullType(BuiltList, [FullType(ModelEnumClass)]), format: ListFormat.multi,), }; + removeNullQueryParameters(_queryParameters); dynamic _bodyData; @@ -1440,6 +1443,7 @@ class FakeApi { if (stringGroup != null) r'string_group': encodeQueryParameter(_serializers, stringGroup, const FullType(int)), if (int64Group != null) r'int64_group': encodeQueryParameter(_serializers, int64Group, const FullType(int)), }; + removeNullQueryParameters(_queryParameters); final _response = await _dio.request( _path, @@ -1782,6 +1786,7 @@ class FakeApi { if (language != null) r'language': encodeQueryParameter(_serializers, language, const FullType(BuiltMap, [FullType(String), FullType(String)]), ), r'allowEmpty': encodeQueryParameter(_serializers, allowEmpty, const FullType(String)), }; + removeNullQueryParameters(_queryParameters); final _response = await _dio.request( _path, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/pet_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/pet_api.dart index a4da1c5ff6db..31b6293f771a 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/pet_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/pet_api.dart @@ -192,6 +192,7 @@ class PetApi { final _queryParameters = { r'status': encodeCollectionQueryParameter(_serializers, status, const FullType(BuiltList, [FullType(String)]), format: ListFormat.csv,), }; + removeNullQueryParameters(_queryParameters); final _response = await _dio.request( _path, @@ -278,6 +279,7 @@ class PetApi { final _queryParameters = { r'tags': encodeCollectionQueryParameter(_serializers, tags, const FullType(BuiltSet, [FullType(String)]), format: ListFormat.csv,), }; + removeNullQueryParameters(_queryParameters); final _response = await _dio.request( _path, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/user_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/user_api.dart index 2a7e5132a60a..8f3475040c7f 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/user_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/user_api.dart @@ -385,6 +385,7 @@ class UserApi { r'username': encodeQueryParameter(_serializers, username, const FullType(String)), r'password': encodeQueryParameter(_serializers, password, const FullType(String)), }; + removeNullQueryParameters(_queryParameters); final _response = await _dio.request( _path, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api_util.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api_util.dart index ed3bb12f25b8..2332266910e5 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api_util.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api_util.dart @@ -38,7 +38,7 @@ dynamic encodeQueryParameter( FullType type, ) { if (value == null) { - return ''; + return null; } if (value is String || value is num || value is bool) { return value; @@ -52,7 +52,7 @@ dynamic encodeQueryParameter( specifiedType: type, ); if (serialized == null) { - return ''; + return null; } if (serialized is String) { return serialized; @@ -60,18 +60,29 @@ dynamic encodeQueryParameter( return serialized; } -ListParam encodeCollectionQueryParameter( +ListParam? encodeCollectionQueryParameter( Serializers serializers, dynamic value, FullType type, { ListFormat format = ListFormat.multi, }) { + if (value == null) { + return null; + } final serialized = serializers.serialize( value as Object, specifiedType: type, ); + if (serialized == null) { + return null; + } if (value is BuiltList || value is BuiltSet) { return ListParam(List.of((serialized as Iterable).cast()), format); } throw ArgumentError('Invalid value passed to encodeCollectionQueryParameter'); } + +void removeNullQueryParameters(Map queryParameters) { + queryParameters.removeWhere((_, value) => value == null); +} + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/serializers.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/serializers.dart index 4a1884a3eca2..8a99a2fdf732 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/serializers.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/serializers.dart @@ -202,7 +202,7 @@ Serializers serializers = (_$serializers.toBuilder() ) ..addBuilderFactory( const FullType(BuiltList, [FullType.nullable(JsonObject)]), - () => ListBuilder(), + () => ListBuilder(), ) ..addBuilderFactory( const FullType(BuiltList, [FullType(Tag)]), diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/git_push.sh b/samples/openapi3/client/petstore/dart2/petstore_client_lib/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/git_push.sh +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/git_push.sh b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/git_push.sh +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/openapi3/client/petstore/go-petstore-generateMarshalJSON-false/git_push.sh b/samples/openapi3/client/petstore/go-petstore-generateMarshalJSON-false/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/openapi3/client/petstore/go-petstore-generateMarshalJSON-false/git_push.sh +++ b/samples/openapi3/client/petstore/go-petstore-generateMarshalJSON-false/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/openapi3/client/petstore/go-petstore-withXml/git_push.sh b/samples/openapi3/client/petstore/go-petstore-withXml/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/openapi3/client/petstore/go-petstore-withXml/git_push.sh +++ b/samples/openapi3/client/petstore/go-petstore-withXml/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/openapi3/client/petstore/go/go-petstore-aws-signature/git_push.sh b/samples/openapi3/client/petstore/go/go-petstore-aws-signature/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/openapi3/client/petstore/go/go-petstore-aws-signature/git_push.sh +++ b/samples/openapi3/client/petstore/go/go-petstore-aws-signature/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/openapi3/client/petstore/go/go-petstore/git_push.sh b/samples/openapi3/client/petstore/go/go-petstore/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/git_push.sh +++ b/samples/openapi3/client/petstore/go/go-petstore/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/git_push.sh b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/git_push.sh +++ b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-swagger1/git_push.sh b/samples/openapi3/client/petstore/java/jersey2-java8-swagger1/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-swagger1/git_push.sh +++ b/samples/openapi3/client/petstore/java/jersey2-java8-swagger1/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-swagger2/git_push.sh b/samples/openapi3/client/petstore/java/jersey2-java8-swagger2/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-swagger2/git_push.sh +++ b/samples/openapi3/client/petstore/java/jersey2-java8-swagger2/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/git_push.sh b/samples/openapi3/client/petstore/java/jersey2-java8/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/git_push.sh +++ b/samples/openapi3/client/petstore/java/jersey2-java8/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/git_push.sh b/samples/server/petstore/cpp-restbed/generated/3_0/git_push.sh index f53a75d4fabe..a35991cd51a1 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/git_push.sh +++ b/samples/server/petstore/cpp-restbed/generated/3_0/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Category.java index 4012cb04f231..4712b79a3cac 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Category.java @@ -2,7 +2,6 @@ import java.net.URI; import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import org.openapitools.jackson.nullable.JsonNullable; diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/ModelApiResponse.java index 9ee0c1b2807d..bfdb5b06105f 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -2,7 +2,6 @@ import java.net.URI; import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Order.java index 05024e14114d..f4c5514f4426 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Order.java @@ -2,7 +2,6 @@ import java.net.URI; import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Pet.java index 30902a60c2df..04a85884f067 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Pet.java @@ -2,7 +2,6 @@ import java.net.URI; import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -51,7 +50,9 @@ public class Pet { /** * pet status in the store + * @deprecated deprecated */ + @Deprecated public enum StatusEnum { AVAILABLE("available"), diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Tag.java index 59823ce029a6..671b2504940e 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/Tag.java @@ -2,7 +2,6 @@ import java.net.URI; import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import org.openapitools.jackson.nullable.JsonNullable; diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/User.java index dde60f69542a..e6053f2676f6 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/model/User.java @@ -2,7 +2,6 @@ import java.net.URI; import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import org.openapitools.jackson.nullable.JsonNullable; diff --git a/samples/server/petstore/java-vertx-web-interface-only/.openapi-generator/FILES b/samples/server/petstore/java-vertx-web-interface-only/.openapi-generator/FILES index 08e93e05a0c4..42a4804d571b 100644 --- a/samples/server/petstore/java-vertx-web-interface-only/.openapi-generator/FILES +++ b/samples/server/petstore/java-vertx-web-interface-only/.openapi-generator/FILES @@ -1,16 +1,12 @@ README.md pom.xml src/main/java/org/openapitools/vertxweb/server/ApiResponse.java -src/main/java/org/openapitools/vertxweb/server/HttpServerVerticle.java src/main/java/org/openapitools/vertxweb/server/api/PetApi.java src/main/java/org/openapitools/vertxweb/server/api/PetApiHandler.java -src/main/java/org/openapitools/vertxweb/server/api/PetApiImpl.java src/main/java/org/openapitools/vertxweb/server/api/StoreApi.java src/main/java/org/openapitools/vertxweb/server/api/StoreApiHandler.java -src/main/java/org/openapitools/vertxweb/server/api/StoreApiImpl.java src/main/java/org/openapitools/vertxweb/server/api/UserApi.java src/main/java/org/openapitools/vertxweb/server/api/UserApiHandler.java -src/main/java/org/openapitools/vertxweb/server/api/UserApiImpl.java src/main/java/org/openapitools/vertxweb/server/model/Category.java src/main/java/org/openapitools/vertxweb/server/model/ModelApiResponse.java src/main/java/org/openapitools/vertxweb/server/model/Order.java diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/README.md b/samples/server/petstore/jaxrs-resteasy/eap-joda/README.md index e69de29bb2d1..74db54ed53ee 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/README.md +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/README.md @@ -0,0 +1,19 @@ +# JAX-RS/Resteasy server with OpenAPI for Jboss EAP + +## Overview +This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using an +[OpenAPI-Spec](https://openapis.org), you can easily generate a server stub. + +This is an example of building a OpenAPI-enabled JAX-RS server. +This example uses the [JAX-RS](https://jax-rs-spec.java.net/) framework for Jboss Resteasy. + +You can deploy the WAR file to Jboss EAP or any other JEE server supporting Jboss Resteasy. + +You can then view the OpenAPI v2 specification here: + +``` +http://localhost:8080/v2/swagger.json +``` + +Note that if you have configured the `host` to be something other than localhost, the calls through +swagger-ui will be directed to that host and not localhost! \ No newline at end of file From a67de53d00899034e31e58dbcc607ab123d4644f Mon Sep 17 00:00:00 2001 From: fstotz Date: Wed, 19 Aug 2026 13:49:16 +0200 Subject: [PATCH 08/14] handle required null query params --- .../src/main/resources/dart/libraries/dio/api.mustache | 8 +++++++- .../dio/serialization/built_value/api_util.mustache | 9 ++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/api.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/api.mustache index f233cbe26652..3b67752fecba 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/api.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/api.mustache @@ -87,7 +87,13 @@ class {{classname}} { {{^required}}{{^isNullable}}if ({{{paramName}}} != null) {{/isNullable}}{{/required}}r'{{baseName}}': {{#includeLibraryTemplate}}api/query_param{{/includeLibraryTemplate}}, {{/queryParams}} }; - removeNullQueryParameters(_queryParameters);{{/hasQueryParams}}{{#hasBodyOrFormParams}} + removeNullQueryParametersExcept( + _queryParameters, + { + {{#queryParams}}{{#required}}{{#isNullable}}r'{{baseName}}', + {{/isNullable}}{{/required}}{{/queryParams}} + }, + );{{/hasQueryParams}}{{#hasBodyOrFormParams}} dynamic _bodyData; diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api_util.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api_util.mustache index 35b746d293fc..ded1e417d0f6 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api_util.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api_util.mustache @@ -80,6 +80,13 @@ ListParam? encodeCollectionQueryParameter( } void removeNullQueryParameters(Map queryParameters) { - queryParameters.removeWhere((_, value) => value == null); + queryParameters.removeWhere((key, value) => value == null); +} + +void removeNullQueryParametersExcept( + Map queryParameters, + Set requiredParameters, +) { + queryParameters.removeWhere((key, value) => value == null && !requiredParameters.contains(key)); } From b31388584315d5f0d35c4cd80264c3648309a1f0 Mon Sep 17 00:00:00 2001 From: fstotz Date: Wed, 19 Aug 2026 15:11:50 +0200 Subject: [PATCH 09/14] fix json_serializable --- .../languages/DartDioClientCodegen.java | 4 ++- .../built_value/api_util.mustache | 12 +------ .../remove_null_query_parameters.mustache | 10 ++++++ .../json_serializable/api_util.mustache | 3 ++ .../dart-dio/anyof/lib/src/api_util.dart | 6 ++++ .../binary_response/.openapi-generator/FILES | 1 + .../binary_response/lib/src/api_util.dart | 15 ++++++++ .../dart-dio/oneof/lib/src/api_util.dart | 6 ++++ .../lib/src/api_util.dart | 6 ++++ .../oneof_primitive/lib/src/api_util.dart | 6 ++++ .../lib/src/api/pet_api.dart | 14 ++++++-- .../lib/src/api/user_api.dart | 7 +++- .../lib/src/api_util.dart | 6 ++++ .../.openapi-generator/FILES | 1 + .../analysis_options.yaml | 7 ++++ .../lib/src/api/fake_api.dart | 36 ++++++++++++++++--- .../lib/src/api/pet_api.dart | 15 ++++++-- .../lib/src/api/store_api.dart | 1 + .../lib/src/api/user_api.dart | 8 ++++- .../lib/src/api_util.dart | 15 ++++++++ .../lib/src/api/fake_api.dart | 35 +++++++++++++++--- .../lib/src/api/pet_api.dart | 14 ++++++-- .../lib/src/api/user_api.dart | 7 +++- .../lib/src/api_util.dart | 6 ++++ 24 files changed, 210 insertions(+), 31 deletions(-) create mode 100644 modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/common/remove_null_query_parameters.mustache create mode 100644 modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/api_util.mustache create mode 100644 samples/openapi3/client/petstore/dart-dio/binary_response/lib/src/api_util.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api_util.dart diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java index 5acaa6b8052a..c9050b0c63af 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java @@ -296,6 +296,7 @@ private void configureSerializationLibraryBuiltValue(String srcFolder) { private void configureSerializationLibraryJsonSerializable(String srcFolder) { supportingFiles.add(new SupportingFile("serialization/json_serializable/build.yaml.mustache", "" /* main project dir */, "build.yaml")); + supportingFiles.add(new SupportingFile("serialization/json_serializable/api_util.mustache", srcFolder, "api_util.dart")); supportingFiles.add(new SupportingFile("serialization/json_serializable/deserialize.mustache", srcFolder, "deserialize.dart")); @@ -1078,7 +1079,8 @@ private void processImports(List operationList, java.util.func } } - if (SERIALIZATION_LIBRARY_BUILT_VALUE.equals(library) && (op.getHasFormParams() || op.getHasQueryParams() || op.getHasPathParams())) { + if ((SERIALIZATION_LIBRARY_BUILT_VALUE.equals(library) || SERIALIZATION_LIBRARY_JSON_SERIALIZABLE.equals(library)) + && (op.getHasFormParams() || op.getHasQueryParams() || op.getHasPathParams())) { resultImports.add("package:" + pubName + "/" + sourceFolder + "/api_util.dart"); } diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api_util.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api_util.mustache index ded1e417d0f6..4645de35885c 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api_util.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api_util.mustache @@ -79,14 +79,4 @@ ListParam? encodeCollectionQueryParameter( throw ArgumentError('Invalid value passed to encodeCollectionQueryParameter'); } -void removeNullQueryParameters(Map queryParameters) { - queryParameters.removeWhere((key, value) => value == null); -} - -void removeNullQueryParametersExcept( - Map queryParameters, - Set requiredParameters, -) { - queryParameters.removeWhere((key, value) => value == null && !requiredParameters.contains(key)); -} - +{{>serialization/common/remove_null_query_parameters}} diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/common/remove_null_query_parameters.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/common/remove_null_query_parameters.mustache new file mode 100644 index 000000000000..d0d334c48b07 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/common/remove_null_query_parameters.mustache @@ -0,0 +1,10 @@ +void removeNullQueryParameters(Map queryParameters) { + queryParameters.removeWhere((_, value) => value == null); +} + +void removeNullQueryParametersExcept( + Map queryParameters, + Set requiredParameters, +) { + queryParameters.removeWhere((key, value) => value == null && !requiredParameters.contains(key)); +} diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/api_util.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/api_util.mustache new file mode 100644 index 000000000000..69d4c33a95c9 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/api_util.mustache @@ -0,0 +1,3 @@ +{{>header}} + +{{>serialization/common/remove_null_query_parameters}} diff --git a/samples/openapi3/client/petstore/dart-dio/anyof/lib/src/api_util.dart b/samples/openapi3/client/petstore/dart-dio/anyof/lib/src/api_util.dart index 2332266910e5..bb8b4984b5dd 100644 --- a/samples/openapi3/client/petstore/dart-dio/anyof/lib/src/api_util.dart +++ b/samples/openapi3/client/petstore/dart-dio/anyof/lib/src/api_util.dart @@ -86,3 +86,9 @@ void removeNullQueryParameters(Map queryParameters) { queryParameters.removeWhere((_, value) => value == null); } +void removeNullQueryParametersExcept( + Map queryParameters, + Set requiredParameters, +) { + queryParameters.removeWhere((key, value) => value == null && !requiredParameters.contains(key)); +} diff --git a/samples/openapi3/client/petstore/dart-dio/binary_response/.openapi-generator/FILES b/samples/openapi3/client/petstore/dart-dio/binary_response/.openapi-generator/FILES index 809d28620973..fbf70217c43d 100644 --- a/samples/openapi3/client/petstore/dart-dio/binary_response/.openapi-generator/FILES +++ b/samples/openapi3/client/petstore/dart-dio/binary_response/.openapi-generator/FILES @@ -6,6 +6,7 @@ doc/DefaultApi.md lib/openapi.dart lib/src/api.dart lib/src/api/default_api.dart +lib/src/api_util.dart lib/src/auth/api_key_auth.dart lib/src/auth/auth.dart lib/src/auth/basic_auth.dart diff --git a/samples/openapi3/client/petstore/dart-dio/binary_response/lib/src/api_util.dart b/samples/openapi3/client/petstore/dart-dio/binary_response/lib/src/api_util.dart new file mode 100644 index 000000000000..a108a5f35211 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/binary_response/lib/src/api_util.dart @@ -0,0 +1,15 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + + +void removeNullQueryParameters(Map queryParameters) { + queryParameters.removeWhere((_, value) => value == null); +} + +void removeNullQueryParametersExcept( + Map queryParameters, + Set requiredParameters, +) { + queryParameters.removeWhere((key, value) => value == null && !requiredParameters.contains(key)); +} diff --git a/samples/openapi3/client/petstore/dart-dio/oneof/lib/src/api_util.dart b/samples/openapi3/client/petstore/dart-dio/oneof/lib/src/api_util.dart index 2332266910e5..bb8b4984b5dd 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof/lib/src/api_util.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof/lib/src/api_util.dart @@ -86,3 +86,9 @@ void removeNullQueryParameters(Map queryParameters) { queryParameters.removeWhere((_, value) => value == null); } +void removeNullQueryParametersExcept( + Map queryParameters, + Set requiredParameters, +) { + queryParameters.removeWhere((key, value) => value == null && !requiredParameters.contains(key)); +} diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/api_util.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/api_util.dart index 2332266910e5..bb8b4984b5dd 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/api_util.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/api_util.dart @@ -86,3 +86,9 @@ void removeNullQueryParameters(Map queryParameters) { queryParameters.removeWhere((_, value) => value == null); } +void removeNullQueryParametersExcept( + Map queryParameters, + Set requiredParameters, +) { + queryParameters.removeWhere((key, value) => value == null && !requiredParameters.contains(key)); +} diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_primitive/lib/src/api_util.dart b/samples/openapi3/client/petstore/dart-dio/oneof_primitive/lib/src/api_util.dart index 2332266910e5..bb8b4984b5dd 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_primitive/lib/src/api_util.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_primitive/lib/src/api_util.dart @@ -86,3 +86,9 @@ void removeNullQueryParameters(Map queryParameters) { queryParameters.removeWhere((_, value) => value == null); } +void removeNullQueryParametersExcept( + Map queryParameters, + Set requiredParameters, +) { + queryParameters.removeWhere((key, value) => value == null && !requiredParameters.contains(key)); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/api/pet_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/api/pet_api.dart index 6a5a753ced8a..da8118d6a4fe 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/api/pet_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/api/pet_api.dart @@ -220,7 +220,12 @@ class PetApi { final _queryParameters = { r'status': encodeCollectionQueryParameter(_serializers, status, const FullType(BuiltList, [FullType(String)]), format: ListFormat.csv,), }; - removeNullQueryParameters(_queryParameters); + removeNullQueryParametersExcept( + _queryParameters, + { + + }, + ); final _response = await _dio.request( _path, @@ -307,7 +312,12 @@ class PetApi { final _queryParameters = { r'tags': encodeCollectionQueryParameter(_serializers, tags, const FullType(BuiltList, [FullType(String)]), format: ListFormat.csv,), }; - removeNullQueryParameters(_queryParameters); + removeNullQueryParametersExcept( + _queryParameters, + { + + }, + ); final _response = await _dio.request( _path, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/api/user_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/api/user_api.dart index c933a70d4a14..766f64ac953a 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/api/user_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/api/user_api.dart @@ -414,7 +414,12 @@ class UserApi { r'username': encodeQueryParameter(_serializers, username, const FullType(String)), r'password': encodeQueryParameter(_serializers, password, const FullType(String)), }; - removeNullQueryParameters(_queryParameters); + removeNullQueryParametersExcept( + _queryParameters, + { + + }, + ); final _response = await _dio.request( _path, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/api_util.dart b/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/api_util.dart index 2332266910e5..bb8b4984b5dd 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/api_util.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/api_util.dart @@ -86,3 +86,9 @@ void removeNullQueryParameters(Map queryParameters) { queryParameters.removeWhere((_, value) => value == null); } +void removeNullQueryParametersExcept( + Map queryParameters, + Set requiredParameters, +) { + queryParameters.removeWhere((key, value) => value == null && !requiredParameters.contains(key)); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/.openapi-generator/FILES b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/.openapi-generator/FILES index a3483714374f..27b493adc77b 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/.openapi-generator/FILES +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/.openapi-generator/FILES @@ -74,6 +74,7 @@ lib/src/api/fake_classname_tags123_api.dart lib/src/api/pet_api.dart lib/src/api/store_api.dart lib/src/api/user_api.dart +lib/src/api_util.dart lib/src/auth/api_key_auth.dart lib/src/auth/auth.dart lib/src/auth/basic_auth.dart diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/analysis_options.yaml b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/analysis_options.yaml index 70524126e3fe..7178f7373cb2 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/analysis_options.yaml +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/analysis_options.yaml @@ -6,5 +6,12 @@ analyzer: exclude: - test/*.dart - lib/src/model/*.g.dart + - build/** + - android/** + - ios/** + - web/** + - windows/** + - macos/** + - linux/** errors: deprecated_member_use_from_same_package: ignore diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/fake_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/fake_api.dart index acd9fe3a06aa..880cffb4a4bd 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/fake_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/fake_api.dart @@ -9,6 +9,7 @@ import 'dart:convert'; import 'package:openapi/src/deserialize.dart'; import 'package:dio/dio.dart'; +import 'package:openapi/src/api_util.dart'; import 'package:openapi/src/model/child_with_nullable.dart'; import 'package:openapi/src/model/fake_big_decimal_map200_response.dart'; import 'package:openapi/src/model/file_schema_test_class.dart'; @@ -289,7 +290,12 @@ _responseData = rawData == null ? null : deserialize{ if (query1 != null) r'query_1': query1, }; - removeNullQueryParameters(_queryParameters); + removeNullQueryParametersExcept( + _queryParameters, + { + + }, + ); dynamic _bodyData; @@ -1017,7 +1023,12 @@ _responseData = rawData == null ? null : deserialize{ r'query': query, }; - removeNullQueryParameters(_queryParameters); + removeNullQueryParametersExcept( + _queryParameters, + { + + }, + ); dynamic _bodyData; @@ -1316,7 +1327,12 @@ _responseData = rawData == null ? null : deserialize(r if (enumQueryDouble != null) r'enum_query_double': enumQueryDouble, if (enumQueryModelArray != null) r'enum_query_model_array': enumQueryModelArray, }; - removeNullQueryParameters(_queryParameters); + removeNullQueryParametersExcept( + _queryParameters, + { + + }, + ); dynamic _bodyData; @@ -1412,7 +1428,12 @@ _responseData = rawData == null ? null : deserialize(r if (stringGroup != null) r'string_group': stringGroup, if (int64Group != null) r'int64_group': int64Group, }; - removeNullQueryParameters(_queryParameters); + removeNullQueryParametersExcept( + _queryParameters, + { + + }, + ); final _response = await _dio.request( _path, @@ -1752,7 +1773,12 @@ _responseData = rawData == null ? null : deserialize(r if (language != null) r'language': language, r'allowEmpty': allowEmpty, }; - removeNullQueryParameters(_queryParameters); + removeNullQueryParametersExcept( + _queryParameters, + { + + }, + ); final _response = await _dio.request( _path, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/pet_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/pet_api.dart index 82285367e8f8..589fed703a3e 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/pet_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/pet_api.dart @@ -9,6 +9,7 @@ import 'dart:convert'; import 'package:openapi/src/deserialize.dart'; import 'package:dio/dio.dart'; +import 'package:openapi/src/api_util.dart'; import 'package:openapi/src/model/api_response.dart'; import 'package:openapi/src/model/pet.dart'; @@ -188,7 +189,12 @@ class PetApi { final _queryParameters = { r'status': status, }; - removeNullQueryParameters(_queryParameters); + removeNullQueryParametersExcept( + _queryParameters, + { + + }, + ); final _response = await _dio.request( _path, @@ -272,7 +278,12 @@ _responseData = rawData == null ? null : deserialize, Pet>(rawData, 'L final _queryParameters = { r'tags': tags, }; - removeNullQueryParameters(_queryParameters); + removeNullQueryParametersExcept( + _queryParameters, + { + + }, + ); final _response = await _dio.request( _path, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/store_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/store_api.dart index 272e45a0ef6c..84390e79da2b 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/store_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/store_api.dart @@ -9,6 +9,7 @@ import 'dart:convert'; import 'package:openapi/src/deserialize.dart'; import 'package:dio/dio.dart'; +import 'package:openapi/src/api_util.dart'; import 'package:openapi/src/model/order.dart'; class StoreApi { diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/user_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/user_api.dart index 14aa3292bdbd..fe753ed26fd7 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/user_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/user_api.dart @@ -9,6 +9,7 @@ import 'dart:convert'; import 'package:openapi/src/deserialize.dart'; import 'package:dio/dio.dart'; +import 'package:openapi/src/api_util.dart'; import 'package:openapi/src/model/user.dart'; class UserApi { @@ -376,7 +377,12 @@ _responseData = rawData == null ? null : deserialize(rawData, 'User' r'username': username, r'password': password, }; - removeNullQueryParameters(_queryParameters); + removeNullQueryParametersExcept( + _queryParameters, + { + + }, + ); final _response = await _dio.request( _path, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api_util.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api_util.dart new file mode 100644 index 000000000000..a108a5f35211 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api_util.dart @@ -0,0 +1,15 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + + +void removeNullQueryParameters(Map queryParameters) { + queryParameters.removeWhere((_, value) => value == null); +} + +void removeNullQueryParametersExcept( + Map queryParameters, + Set requiredParameters, +) { + queryParameters.removeWhere((key, value) => value == null && !requiredParameters.contains(key)); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/fake_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/fake_api.dart index 6e7485dfd447..01c58e499058 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/fake_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/fake_api.dart @@ -304,7 +304,12 @@ class FakeApi { final _queryParameters = { if (query1 != null) r'query_1': encodeQueryParameter(_serializers, query1, const FullType(String)), }; - removeNullQueryParameters(_queryParameters); + removeNullQueryParametersExcept( + _queryParameters, + { + + }, + ); dynamic _bodyData; @@ -1043,7 +1048,12 @@ class FakeApi { final _queryParameters = { r'query': encodeQueryParameter(_serializers, query, const FullType(String)), }; - removeNullQueryParameters(_queryParameters); + removeNullQueryParametersExcept( + _queryParameters, + { + + }, + ); dynamic _bodyData; @@ -1347,7 +1357,12 @@ class FakeApi { if (enumQueryDouble != null) r'enum_query_double': encodeQueryParameter(_serializers, enumQueryDouble, const FullType(double)), if (enumQueryModelArray != null) r'enum_query_model_array': encodeCollectionQueryParameter(_serializers, enumQueryModelArray, const FullType(BuiltList, [FullType(ModelEnumClass)]), format: ListFormat.multi,), }; - removeNullQueryParameters(_queryParameters); + removeNullQueryParametersExcept( + _queryParameters, + { + + }, + ); dynamic _bodyData; @@ -1443,7 +1458,12 @@ class FakeApi { if (stringGroup != null) r'string_group': encodeQueryParameter(_serializers, stringGroup, const FullType(int)), if (int64Group != null) r'int64_group': encodeQueryParameter(_serializers, int64Group, const FullType(int)), }; - removeNullQueryParameters(_queryParameters); + removeNullQueryParametersExcept( + _queryParameters, + { + + }, + ); final _response = await _dio.request( _path, @@ -1786,7 +1806,12 @@ class FakeApi { if (language != null) r'language': encodeQueryParameter(_serializers, language, const FullType(BuiltMap, [FullType(String), FullType(String)]), ), r'allowEmpty': encodeQueryParameter(_serializers, allowEmpty, const FullType(String)), }; - removeNullQueryParameters(_queryParameters); + removeNullQueryParametersExcept( + _queryParameters, + { + + }, + ); final _response = await _dio.request( _path, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/pet_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/pet_api.dart index 31b6293f771a..607f31158806 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/pet_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/pet_api.dart @@ -192,7 +192,12 @@ class PetApi { final _queryParameters = { r'status': encodeCollectionQueryParameter(_serializers, status, const FullType(BuiltList, [FullType(String)]), format: ListFormat.csv,), }; - removeNullQueryParameters(_queryParameters); + removeNullQueryParametersExcept( + _queryParameters, + { + + }, + ); final _response = await _dio.request( _path, @@ -279,7 +284,12 @@ class PetApi { final _queryParameters = { r'tags': encodeCollectionQueryParameter(_serializers, tags, const FullType(BuiltSet, [FullType(String)]), format: ListFormat.csv,), }; - removeNullQueryParameters(_queryParameters); + removeNullQueryParametersExcept( + _queryParameters, + { + + }, + ); final _response = await _dio.request( _path, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/user_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/user_api.dart index 8f3475040c7f..1896433d1fe4 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/user_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/user_api.dart @@ -385,7 +385,12 @@ class UserApi { r'username': encodeQueryParameter(_serializers, username, const FullType(String)), r'password': encodeQueryParameter(_serializers, password, const FullType(String)), }; - removeNullQueryParameters(_queryParameters); + removeNullQueryParametersExcept( + _queryParameters, + { + + }, + ); final _response = await _dio.request( _path, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api_util.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api_util.dart index 2332266910e5..bb8b4984b5dd 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api_util.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api_util.dart @@ -86,3 +86,9 @@ void removeNullQueryParameters(Map queryParameters) { queryParameters.removeWhere((_, value) => value == null); } +void removeNullQueryParametersExcept( + Map queryParameters, + Set requiredParameters, +) { + queryParameters.removeWhere((key, value) => value == null && !requiredParameters.contains(key)); +} From 11075d9310bfebb3ea9568ff179c20f3d1154f7f Mon Sep 17 00:00:00 2001 From: fstotz Date: Wed, 19 Aug 2026 15:30:17 +0200 Subject: [PATCH 10/14] fix onOf anyof combination mapping --- .../languages/DartDioClientCodegen.java | 37 +++++++++++++- .../codegen/dart/dio/DartDioModelTest.java | 20 ++++++++ ...e_23717_inherited_discriminator_oneof.yaml | 51 +++++++++++++++++++ .../analysis_options.yaml | 7 --- 4 files changed, 107 insertions(+), 8 deletions(-) create mode 100644 modules/openapi-generator/src/test/resources/bugs/issue_23717_inherited_discriminator_oneof.yaml diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java index c9050b0c63af..2ea6d14d8e11 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java @@ -669,15 +669,18 @@ protected CodegenDiscriminator createDiscriminator(String schemaName, Schema sch return sub; } - // For inherited discriminators, keep only real allOf descendants of this schema + // For inherited discriminators, keep real allOf descendants of this schema // (e.g. Reptile keeps Crocodile/Turtle, but not Bird from Animal's mapping). + // Also preserve alternatives declared directly in this schema's oneOf/anyOf. Set descendantSchemaNames = getAllOfDescendants(schemaName).stream() .map(MappedModel::getSchemaName) .filter(Objects::nonNull) .collect(Collectors.toSet()); + Set declaredAlternatives = getComposedAlternativeSchemaNames(schema); if (ModelUtils.isComposedSchema(schema) && schema.getAllOf() != null) { filterMappedModels(sub, mappedModel -> descendantSchemaNames.contains(mappedModel.getSchemaName()) + || declaredAlternatives.contains(mappedModel.getSchemaName()) || schemaName.equals(mappedModel.getSchemaName())); } @@ -801,6 +804,38 @@ private Discriminator getSchemaLocalDiscriminator(Schema schema) { return null; } + /** + * Gets schema names referenced directly by oneOf/anyOf in the provided schema. + */ + private Set getComposedAlternativeSchemaNames(Schema schema) { + Set alternatives = new HashSet<>(); + if (schema == null || !ModelUtils.isComposedSchema(schema)) { + return alternatives; + } + + List oneOfSchemas = schema.getOneOf(); + if (oneOfSchemas != null) { + for (Schema oneOfSchema : oneOfSchemas) { + String ref = oneOfSchema != null ? oneOfSchema.get$ref() : null; + if (ref != null) { + alternatives.add(ModelUtils.getSimpleRef(ref)); + } + } + } + + List anyOfSchemas = schema.getAnyOf(); + if (anyOfSchemas != null) { + for (Schema anyOfSchema : anyOfSchemas) { + String ref = anyOfSchema != null ? anyOfSchema.get$ref() : null; + if (ref != null) { + alternatives.add(ModelUtils.getSimpleRef(ref)); + } + } + } + + return alternatives; + } + @Override public Map postProcessAllModels(Map objs) { objs = super.postProcessAllModels(objs); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioModelTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioModelTest.java index 469f7a36ea89..6524dcd3efe6 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioModelTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioModelTest.java @@ -485,6 +485,26 @@ public void discriminatorChecksSubclassesBeforeParentTypes() { Assert.assertTrue(animalNonSelfMappedModelOrder.indexOf("Crocodile") < animalNonSelfMappedModelOrder.indexOf("Reptile")); } + @Test(description = "preserves declared oneOf alternatives on inherited discriminators") + public void inheritedDiscriminatorKeepsDeclaredOneOfAlternatives() { + OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/bugs/issue_23717_inherited_discriminator_oneof.yaml"); + + final DefaultCodegen codegen = new DartDioClientCodegen(); + codegen.additionalProperties().put(CodegenConstants.SERIALIZATION_LIBRARY, DartDioClientCodegen.SERIALIZATION_LIBRARY_BUILT_VALUE); + codegen.processOpts(); + codegen.setOpenAPI(openAPI); + + final Schema reptileSchema = openAPI.getComponents().getSchemas().get("Reptile"); + final CodegenModel reptileModel = codegen.fromModel("Reptile", reptileSchema); + + Assert.assertNotNull(reptileModel.discriminator); + Assert.assertNotNull(reptileModel.discriminator.getMapping()); + Assert.assertTrue(reptileModel.discriminator.getMapping().containsKey("Reptile")); + Assert.assertTrue(reptileModel.discriminator.getMapping().containsKey("Lizard")); + Assert.assertTrue(reptileModel.discriminator.getMapping().containsKey("Snake")); + Assert.assertFalse(reptileModel.discriminator.getMapping().containsKey("Bird")); + } + @DataProvider(name = "modelNames") public static Object[][] modelNames() { return new Object[][]{ diff --git a/modules/openapi-generator/src/test/resources/bugs/issue_23717_inherited_discriminator_oneof.yaml b/modules/openapi-generator/src/test/resources/bugs/issue_23717_inherited_discriminator_oneof.yaml new file mode 100644 index 000000000000..15c944d7f8be --- /dev/null +++ b/modules/openapi-generator/src/test/resources/bugs/issue_23717_inherited_discriminator_oneof.yaml @@ -0,0 +1,51 @@ +openapi: 3.0.0 +info: + title: Test API + version: v1 +paths: {} +components: + schemas: + Animal: + type: object + discriminator: + propertyName: type + mapping: + Bird: '#/components/schemas/Bird' + Reptile: '#/components/schemas/Reptile' + Lizard: '#/components/schemas/Lizard' + Snake: '#/components/schemas/Snake' + properties: + type: + type: string + Bird: + allOf: + - $ref: '#/components/schemas/Animal' + - type: object + properties: + wingSpan: + type: number + format: double + Reptile: + allOf: + - $ref: '#/components/schemas/Animal' + - type: object + properties: + scaleColor: + type: string + oneOf: + - $ref: '#/components/schemas/Lizard' + - $ref: '#/components/schemas/Snake' + Lizard: + allOf: + - $ref: '#/components/schemas/Animal' + - type: object + properties: + canRegrowTail: + type: boolean + Snake: + allOf: + - $ref: '#/components/schemas/Animal' + - type: object + properties: + venomous: + type: boolean diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/analysis_options.yaml b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/analysis_options.yaml index 7178f7373cb2..70524126e3fe 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/analysis_options.yaml +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/analysis_options.yaml @@ -6,12 +6,5 @@ analyzer: exclude: - test/*.dart - lib/src/model/*.g.dart - - build/** - - android/** - - ios/** - - web/** - - windows/** - - macos/** - - linux/** errors: deprecated_member_use_from_same_package: ignore From 460b0cb86bbe5ad89b58e01785d29f94cb214a61 Mon Sep 17 00:00:00 2001 From: fstotz Date: Wed, 19 Aug 2026 15:32:55 +0200 Subject: [PATCH 11/14] cleanup --- .../common/remove_null_query_parameters.mustache | 4 ---- 1 file changed, 4 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/common/remove_null_query_parameters.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/common/remove_null_query_parameters.mustache index d0d334c48b07..8c395ffe3588 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/common/remove_null_query_parameters.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/common/remove_null_query_parameters.mustache @@ -1,7 +1,3 @@ -void removeNullQueryParameters(Map queryParameters) { - queryParameters.removeWhere((_, value) => value == null); -} - void removeNullQueryParametersExcept( Map queryParameters, Set requiredParameters, From 6ac19a2124f7d643a4b12c1ea2674d569d289c37 Mon Sep 17 00:00:00 2001 From: fstotz Date: Wed, 19 Aug 2026 16:43:39 +0200 Subject: [PATCH 12/14] address issue from review --- .../codegen/languages/DartDioClientCodegen.java | 15 +++++++++++---- .../resources/dart/libraries/dio/api.mustache | 2 +- .../built_value/api/path_param.mustache | 1 + .../json_serializable/api/path_param.mustache | 1 + .../petstore/dart-dio/anyof/lib/src/api_util.dart | 4 ---- .../binary_response/lib/src/api_util.dart | 4 ---- .../petstore/dart-dio/oneof/lib/src/api_util.dart | 4 ---- .../lib/src/api_util.dart | 4 ---- .../oneof_primitive/lib/src/api_util.dart | 4 ---- .../petstore-timemachine/lib/src/api/pet_api.dart | 12 ++++++++---- .../lib/src/api/store_api.dart | 6 ++++-- .../lib/src/api/user_api.dart | 9 ++++++--- .../petstore-timemachine/lib/src/api_util.dart | 4 ---- .../lib/src/api/pet_api.dart | 15 ++++++++++----- .../lib/src/api/store_api.dart | 6 ++++-- .../lib/src/api/user_api.dart | 9 ++++++--- .../lib/src/api_util.dart | 4 ---- .../lib/src/api/pet_api.dart | 15 ++++++++++----- .../lib/src/api/store_api.dart | 6 ++++-- .../lib/src/api/user_api.dart | 9 ++++++--- .../lib/src/api_util.dart | 4 ---- 21 files changed, 72 insertions(+), 66 deletions(-) create mode 100644 modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api/path_param.mustache create mode 100644 modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/api/path_param.mustache diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java index 2ea6d14d8e11..a38eb7298b22 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java @@ -656,6 +656,7 @@ protected CodegenDiscriminator createDiscriminator(String schemaName, Schema sch // Defensive copy: avoid mutating shared mapping objects from the parsed spec. sub.setMapping(new LinkedHashMap<>(sub.getMapping())); } + sub.setVendorExtensions(new LinkedHashMap<>(ObjectUtils.firstNonNull(sub.getVendorExtensions(), Collections.emptyMap()))); Discriminator originalDiscriminator = getSchemaLocalDiscriminator(schema); if (originalDiscriminator != null) { @@ -712,12 +713,18 @@ private void prepareDiscriminatorTemplateData(CodegenDiscriminator discriminator } } - discriminator.getVendorExtensions().put(X_DISCRIMINATOR_MAPPED_MODELS_NONSELF, nonSelfMappedModels); - discriminator.getVendorExtensions().put(X_HAS_DISCRIMINATOR_SELF_MAPPING, selfMappingName != null); + Map discriminatorVendorExtensions = discriminator.getVendorExtensions(); + if (discriminatorVendorExtensions == null) { + discriminatorVendorExtensions = new LinkedHashMap<>(); + discriminator.setVendorExtensions(discriminatorVendorExtensions); + } + + discriminatorVendorExtensions.put(X_DISCRIMINATOR_MAPPED_MODELS_NONSELF, nonSelfMappedModels); + discriminatorVendorExtensions.put(X_HAS_DISCRIMINATOR_SELF_MAPPING, selfMappingName != null); if (selfMappingName != null) { - discriminator.getVendorExtensions().put(X_DISCRIMINATOR_SELF_MAPPING_NAME, selfMappingName); + discriminatorVendorExtensions.put(X_DISCRIMINATOR_SELF_MAPPING_NAME, selfMappingName); } else { - discriminator.getVendorExtensions().remove(X_DISCRIMINATOR_SELF_MAPPING_NAME); + discriminatorVendorExtensions.remove(X_DISCRIMINATOR_SELF_MAPPING_NAME); } } diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/api.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/api.mustache index 3b67752fecba..8cad7e99c36e 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/api.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/api.mustache @@ -51,7 +51,7 @@ class {{classname}} { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'{{{path}}}'{{#pathParams}}.replaceAll('{' r'{{{baseName}}}' '}', {{#includeLibraryTemplate}}api/query_param{{/includeLibraryTemplate}}.toString()){{/pathParams}}; + final _path = r'{{{path}}}'{{#pathParams}}.replaceAll('{' r'{{{baseName}}}' '}', {{#includeLibraryTemplate}}api/path_param{{/includeLibraryTemplate}}){{/pathParams}}; final _options = Options( method: r'{{#lambda.uppercase}}{{httpMethod}}{{/lambda.uppercase}}', {{#isResponseFile}} diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api/path_param.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api/path_param.mustache new file mode 100644 index 000000000000..48038fa2aa5a --- /dev/null +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api/path_param.mustache @@ -0,0 +1 @@ +({{>serialization/built_value/api/query_param}}{{#isNullable}}?.toString() ?? ''{{/isNullable}}{{^isNullable}}.toString(){{/isNullable}}) diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/api/path_param.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/api/path_param.mustache new file mode 100644 index 000000000000..66786128a3c8 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/api/path_param.mustache @@ -0,0 +1 @@ +{{{paramName}}}{{#isNullable}}?.toString() ?? ''{{/isNullable}}{{^isNullable}}.toString(){{/isNullable}} diff --git a/samples/openapi3/client/petstore/dart-dio/anyof/lib/src/api_util.dart b/samples/openapi3/client/petstore/dart-dio/anyof/lib/src/api_util.dart index bb8b4984b5dd..041445388322 100644 --- a/samples/openapi3/client/petstore/dart-dio/anyof/lib/src/api_util.dart +++ b/samples/openapi3/client/petstore/dart-dio/anyof/lib/src/api_util.dart @@ -82,10 +82,6 @@ ListParam? encodeCollectionQueryParameter( throw ArgumentError('Invalid value passed to encodeCollectionQueryParameter'); } -void removeNullQueryParameters(Map queryParameters) { - queryParameters.removeWhere((_, value) => value == null); -} - void removeNullQueryParametersExcept( Map queryParameters, Set requiredParameters, diff --git a/samples/openapi3/client/petstore/dart-dio/binary_response/lib/src/api_util.dart b/samples/openapi3/client/petstore/dart-dio/binary_response/lib/src/api_util.dart index a108a5f35211..e139907e3020 100644 --- a/samples/openapi3/client/petstore/dart-dio/binary_response/lib/src/api_util.dart +++ b/samples/openapi3/client/petstore/dart-dio/binary_response/lib/src/api_util.dart @@ -3,10 +3,6 @@ // -void removeNullQueryParameters(Map queryParameters) { - queryParameters.removeWhere((_, value) => value == null); -} - void removeNullQueryParametersExcept( Map queryParameters, Set requiredParameters, diff --git a/samples/openapi3/client/petstore/dart-dio/oneof/lib/src/api_util.dart b/samples/openapi3/client/petstore/dart-dio/oneof/lib/src/api_util.dart index bb8b4984b5dd..041445388322 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof/lib/src/api_util.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof/lib/src/api_util.dart @@ -82,10 +82,6 @@ ListParam? encodeCollectionQueryParameter( throw ArgumentError('Invalid value passed to encodeCollectionQueryParameter'); } -void removeNullQueryParameters(Map queryParameters) { - queryParameters.removeWhere((_, value) => value == null); -} - void removeNullQueryParametersExcept( Map queryParameters, Set requiredParameters, diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/api_util.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/api_util.dart index bb8b4984b5dd..041445388322 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/api_util.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/api_util.dart @@ -82,10 +82,6 @@ ListParam? encodeCollectionQueryParameter( throw ArgumentError('Invalid value passed to encodeCollectionQueryParameter'); } -void removeNullQueryParameters(Map queryParameters) { - queryParameters.removeWhere((_, value) => value == null); -} - void removeNullQueryParametersExcept( Map queryParameters, Set requiredParameters, diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_primitive/lib/src/api_util.dart b/samples/openapi3/client/petstore/dart-dio/oneof_primitive/lib/src/api_util.dart index bb8b4984b5dd..041445388322 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_primitive/lib/src/api_util.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_primitive/lib/src/api_util.dart @@ -82,10 +82,6 @@ ListParam? encodeCollectionQueryParameter( throw ArgumentError('Invalid value passed to encodeCollectionQueryParameter'); } -void removeNullQueryParameters(Map queryParameters) { - queryParameters.removeWhere((_, value) => value == null); -} - void removeNullQueryParametersExcept( Map queryParameters, Set requiredParameters, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/api/pet_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/api/pet_api.dart index da8118d6a4fe..1c36b02277c9 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/api/pet_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/api/pet_api.dart @@ -146,7 +146,8 @@ class PetApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', encodeQueryParameter(_serializers, petId, const FullType(int)).toString()); + final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', (encodeQueryParameter(_serializers, petId, const FullType(int)).toString()) +); final _options = Options( method: r'DELETE', headers: { @@ -382,7 +383,8 @@ class PetApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', encodeQueryParameter(_serializers, petId, const FullType(int)).toString()); + final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', (encodeQueryParameter(_serializers, petId, const FullType(int)).toString()) +); final _options = Options( method: r'GET', headers: { @@ -570,7 +572,8 @@ class PetApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', encodeQueryParameter(_serializers, petId, const FullType(int)).toString()); + final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', (encodeQueryParameter(_serializers, petId, const FullType(int)).toString()) +); final _options = Options( method: r'POST', headers: { @@ -648,7 +651,8 @@ class PetApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/pet/{petId}/uploadImage'.replaceAll('{' r'petId' '}', encodeQueryParameter(_serializers, petId, const FullType(int)).toString()); + final _path = r'/pet/{petId}/uploadImage'.replaceAll('{' r'petId' '}', (encodeQueryParameter(_serializers, petId, const FullType(int)).toString()) +); final _options = Options( method: r'POST', headers: { diff --git a/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/api/store_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/api/store_api.dart index 5ad35b28d39a..fec3deedda98 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/api/store_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/api/store_api.dart @@ -43,7 +43,8 @@ class StoreApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/store/order/{orderId}'.replaceAll('{' r'orderId' '}', encodeQueryParameter(_serializers, orderId, const FullType(String)).toString()); + final _path = r'/store/order/{orderId}'.replaceAll('{' r'orderId' '}', (encodeQueryParameter(_serializers, orderId, const FullType(String)).toString()) +); final _options = Options( method: r'DELETE', headers: { @@ -170,7 +171,8 @@ class StoreApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/store/order/{orderId}'.replaceAll('{' r'orderId' '}', encodeQueryParameter(_serializers, orderId, const FullType(int)).toString()); + final _path = r'/store/order/{orderId}'.replaceAll('{' r'orderId' '}', (encodeQueryParameter(_serializers, orderId, const FullType(int)).toString()) +); final _options = Options( method: r'GET', headers: { diff --git a/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/api/user_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/api/user_api.dart index 766f64ac953a..05af91b58a1f 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/api/user_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/api/user_api.dart @@ -266,7 +266,8 @@ class UserApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/user/{username}'.replaceAll('{' r'username' '}', encodeQueryParameter(_serializers, username, const FullType(String)).toString()); + final _path = r'/user/{username}'.replaceAll('{' r'username' '}', (encodeQueryParameter(_serializers, username, const FullType(String)).toString()) +); final _options = Options( method: r'DELETE', headers: { @@ -320,7 +321,8 @@ class UserApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/user/{username}'.replaceAll('{' r'username' '}', encodeQueryParameter(_serializers, username, const FullType(String)).toString()); + final _path = r'/user/{username}'.replaceAll('{' r'username' '}', (encodeQueryParameter(_serializers, username, const FullType(String)).toString()) +); final _options = Options( method: r'GET', headers: { @@ -535,7 +537,8 @@ class UserApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/user/{username}'.replaceAll('{' r'username' '}', encodeQueryParameter(_serializers, username, const FullType(String)).toString()); + final _path = r'/user/{username}'.replaceAll('{' r'username' '}', (encodeQueryParameter(_serializers, username, const FullType(String)).toString()) +); final _options = Options( method: r'PUT', headers: { diff --git a/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/api_util.dart b/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/api_util.dart index bb8b4984b5dd..041445388322 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/api_util.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/api_util.dart @@ -82,10 +82,6 @@ ListParam? encodeCollectionQueryParameter( throw ArgumentError('Invalid value passed to encodeCollectionQueryParameter'); } -void removeNullQueryParameters(Map queryParameters) { - queryParameters.removeWhere((_, value) => value == null); -} - void removeNullQueryParametersExcept( Map queryParameters, Set requiredParameters, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/pet_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/pet_api.dart index 589fed703a3e..fe00762da4de 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/pet_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/pet_api.dart @@ -115,7 +115,8 @@ class PetApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString()); + final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString() +); final _options = Options( method: r'DELETE', headers: { @@ -345,7 +346,8 @@ _responseData = rawData == null ? null : deserialize, Pet>(rawData, 'Se ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString()); + final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString() +); final _options = Options( method: r'GET', headers: { @@ -499,7 +501,8 @@ _responseData = rawData == null ? null : deserialize(rawData, 'Pet', g ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString()); + final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString() +); final _options = Options( method: r'POST', headers: { @@ -577,7 +580,8 @@ _responseData = rawData == null ? null : deserialize(rawData, 'Pet', g ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/pet/{petId}/uploadImage'.replaceAll('{' r'petId' '}', petId.toString()); + final _path = r'/pet/{petId}/uploadImage'.replaceAll('{' r'petId' '}', petId.toString() +); final _options = Options( method: r'POST', headers: { @@ -680,7 +684,8 @@ _responseData = rawData == null ? null : deserialize(r ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/fake/{petId}/uploadImageWithRequiredFile'.replaceAll('{' r'petId' '}', petId.toString()); + final _path = r'/fake/{petId}/uploadImageWithRequiredFile'.replaceAll('{' r'petId' '}', petId.toString() +); final _options = Options( method: r'POST', headers: { diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/store_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/store_api.dart index 84390e79da2b..629a61b6de32 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/store_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/store_api.dart @@ -41,7 +41,8 @@ class StoreApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/store/order/{order_id}'.replaceAll('{' r'order_id' '}', orderId.toString()); + final _path = r'/store/order/{order_id}'.replaceAll('{' r'order_id' '}', orderId.toString() +); final _options = Options( method: r'DELETE', headers: { @@ -165,7 +166,8 @@ _responseData = rawData == null ? null : deserialize, int>(rawD ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/store/order/{order_id}'.replaceAll('{' r'order_id' '}', orderId.toString()); + final _path = r'/store/order/{order_id}'.replaceAll('{' r'order_id' '}', orderId.toString() +); final _options = Options( method: r'GET', headers: { diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/user_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/user_api.dart index fe753ed26fd7..aefe94271343 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/user_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/user_api.dart @@ -239,7 +239,8 @@ class UserApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/user/{username}'.replaceAll('{' r'username' '}', username.toString()); + final _path = r'/user/{username}'.replaceAll('{' r'username' '}', username.toString() +); final _options = Options( method: r'DELETE', headers: { @@ -286,7 +287,8 @@ class UserApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/user/{username}'.replaceAll('{' r'username' '}', username.toString()); + final _path = r'/user/{username}'.replaceAll('{' r'username' '}', username.toString() +); final _options = Options( method: r'GET', headers: { @@ -491,7 +493,8 @@ _responseData = rawData == null ? null : deserialize(rawData, 'S ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/user/{username}'.replaceAll('{' r'username' '}', username.toString()); + final _path = r'/user/{username}'.replaceAll('{' r'username' '}', username.toString() +); final _options = Options( method: r'PUT', headers: { diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api_util.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api_util.dart index a108a5f35211..e139907e3020 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api_util.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api_util.dart @@ -3,10 +3,6 @@ // -void removeNullQueryParameters(Map queryParameters) { - queryParameters.removeWhere((_, value) => value == null); -} - void removeNullQueryParametersExcept( Map queryParameters, Set requiredParameters, diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/pet_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/pet_api.dart index 607f31158806..51a899e8de48 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/pet_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/pet_api.dart @@ -118,7 +118,8 @@ class PetApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', encodeQueryParameter(_serializers, petId, const FullType(int)).toString()); + final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', (encodeQueryParameter(_serializers, petId, const FullType(int)).toString()) +); final _options = Options( method: r'DELETE', headers: { @@ -354,7 +355,8 @@ class PetApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', encodeQueryParameter(_serializers, petId, const FullType(int)).toString()); + final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', (encodeQueryParameter(_serializers, petId, const FullType(int)).toString()) +); final _options = Options( method: r'GET', headers: { @@ -512,7 +514,8 @@ class PetApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', encodeQueryParameter(_serializers, petId, const FullType(int)).toString()); + final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', (encodeQueryParameter(_serializers, petId, const FullType(int)).toString()) +); final _options = Options( method: r'POST', headers: { @@ -590,7 +593,8 @@ class PetApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/pet/{petId}/uploadImage'.replaceAll('{' r'petId' '}', encodeQueryParameter(_serializers, petId, const FullType(int)).toString()); + final _path = r'/pet/{petId}/uploadImage'.replaceAll('{' r'petId' '}', (encodeQueryParameter(_serializers, petId, const FullType(int)).toString()) +); final _options = Options( method: r'POST', headers: { @@ -696,7 +700,8 @@ class PetApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/fake/{petId}/uploadImageWithRequiredFile'.replaceAll('{' r'petId' '}', encodeQueryParameter(_serializers, petId, const FullType(int)).toString()); + final _path = r'/fake/{petId}/uploadImageWithRequiredFile'.replaceAll('{' r'petId' '}', (encodeQueryParameter(_serializers, petId, const FullType(int)).toString()) +); final _options = Options( method: r'POST', headers: { diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/store_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/store_api.dart index 6f519ff8ee51..36f48e697dee 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/store_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/store_api.dart @@ -43,7 +43,8 @@ class StoreApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/store/order/{order_id}'.replaceAll('{' r'order_id' '}', encodeQueryParameter(_serializers, orderId, const FullType(String)).toString()); + final _path = r'/store/order/{order_id}'.replaceAll('{' r'order_id' '}', (encodeQueryParameter(_serializers, orderId, const FullType(String)).toString()) +); final _options = Options( method: r'DELETE', headers: { @@ -170,7 +171,8 @@ class StoreApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/store/order/{order_id}'.replaceAll('{' r'order_id' '}', encodeQueryParameter(_serializers, orderId, const FullType(int)).toString()); + final _path = r'/store/order/{order_id}'.replaceAll('{' r'order_id' '}', (encodeQueryParameter(_serializers, orderId, const FullType(int)).toString()) +); final _options = Options( method: r'GET', headers: { diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/user_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/user_api.dart index 1896433d1fe4..4c653f6871a2 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/user_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/user_api.dart @@ -244,7 +244,8 @@ class UserApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/user/{username}'.replaceAll('{' r'username' '}', encodeQueryParameter(_serializers, username, const FullType(String)).toString()); + final _path = r'/user/{username}'.replaceAll('{' r'username' '}', (encodeQueryParameter(_serializers, username, const FullType(String)).toString()) +); final _options = Options( method: r'DELETE', headers: { @@ -291,7 +292,8 @@ class UserApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/user/{username}'.replaceAll('{' r'username' '}', encodeQueryParameter(_serializers, username, const FullType(String)).toString()); + final _path = r'/user/{username}'.replaceAll('{' r'username' '}', (encodeQueryParameter(_serializers, username, const FullType(String)).toString()) +); final _options = Options( method: r'GET', headers: { @@ -499,7 +501,8 @@ class UserApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/user/{username}'.replaceAll('{' r'username' '}', encodeQueryParameter(_serializers, username, const FullType(String)).toString()); + final _path = r'/user/{username}'.replaceAll('{' r'username' '}', (encodeQueryParameter(_serializers, username, const FullType(String)).toString()) +); final _options = Options( method: r'PUT', headers: { diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api_util.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api_util.dart index bb8b4984b5dd..041445388322 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api_util.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api_util.dart @@ -82,10 +82,6 @@ ListParam? encodeCollectionQueryParameter( throw ArgumentError('Invalid value passed to encodeCollectionQueryParameter'); } -void removeNullQueryParameters(Map queryParameters) { - queryParameters.removeWhere((_, value) => value == null); -} - void removeNullQueryParametersExcept( Map queryParameters, Set requiredParameters, From 3afaa1d5e05d0c6f5a06a8efa0717aacb049e712 Mon Sep 17 00:00:00 2001 From: fstotz Date: Wed, 19 Aug 2026 16:56:58 +0200 Subject: [PATCH 13/14] address issue from review --- .../built_value/api/form_param.mustache | 1 + .../built_value/api/serialize.mustache | 2 +- .../lib/src/api/pet_api.dart | 4 +-- .../lib/src/api/fake_api.dart | 36 +++++++++---------- .../lib/src/api/pet_api.dart | 4 +-- 5 files changed, 24 insertions(+), 23 deletions(-) create mode 100644 modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api/form_param.mustache diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api/form_param.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api/form_param.mustache new file mode 100644 index 000000000000..f2d3b3ce76ab --- /dev/null +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api/form_param.mustache @@ -0,0 +1 @@ +{{#isContainer}}{{#isMap}}encodeFormParameter{{/isMap}}{{^isMap}}encodeCollectionFormParameter<{{{baseType}}}>{{/isMap}}{{/isContainer}}{{^isContainer}}encodeFormParameter{{/isContainer}}(_serializers, {{{paramName}}}, const FullType({{^isContainer}}{{{dataType}}}){{/isContainer}}{{#isContainer}}Built{{#isMap}}Map{{/isMap}}{{#isArray}}{{#uniqueItems}}Set{{/uniqueItems}}{{^uniqueItems}}List{{/uniqueItems}}{{/isArray}}, [{{#isMap}}FullType(String), {{/isMap}}FullType({{{baseType}}})]), {{#collectionFormat}}format: ListFormat.{{collectionFormat}},{{/collectionFormat}}{{/isContainer}}) \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api/serialize.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api/serialize.mustache index 6c4d370d86e9..5a9bab792ae2 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api/serialize.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api/serialize.mustache @@ -9,7 +9,7 @@ {{^isMultipart}} _bodyData = { {{#formParams}} - {{^required}}{{^isNullable}}if ({{{paramName}}} != null) {{/isNullable}}{{/required}}r'{{{baseName}}}': {{>serialization/built_value/api/query_param}}, + {{^required}}{{^isNullable}}if ({{{paramName}}} != null) {{/isNullable}}{{/required}}r'{{{baseName}}}': {{>serialization/built_value/api/form_param}}, {{/formParams}} }; {{/isMultipart}} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/api/pet_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/api/pet_api.dart index 1c36b02277c9..7e1c73bb8edf 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/api/pet_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore-timemachine/lib/src/api/pet_api.dart @@ -596,8 +596,8 @@ class PetApi { try { _bodyData = { - if (name != null) r'name': encodeQueryParameter(_serializers, name, const FullType(String)), - if (status != null) r'status': encodeQueryParameter(_serializers, status, const FullType(String)), + if (name != null) r'name': encodeFormParameter(_serializers, name, const FullType(String)), + if (status != null) r'status': encodeFormParameter(_serializers, status, const FullType(String)), }; } catch(error, stackTrace) { diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/fake_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/fake_api.dart index 01c58e499058..85929159abb4 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/fake_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/fake_api.dart @@ -1255,20 +1255,20 @@ class FakeApi { try { _bodyData = { - if (integer != null) r'integer': encodeQueryParameter(_serializers, integer, const FullType(int)), - if (int32 != null) r'int32': encodeQueryParameter(_serializers, int32, const FullType(int)), - if (int64 != null) r'int64': encodeQueryParameter(_serializers, int64, const FullType(int)), - r'number': encodeQueryParameter(_serializers, number, const FullType(num)), - if (float != null) r'float': encodeQueryParameter(_serializers, float, const FullType(double)), - r'double': encodeQueryParameter(_serializers, double_, const FullType(double)), - if (string != null) r'string': encodeQueryParameter(_serializers, string, const FullType(String)), - r'pattern_without_delimiter': encodeQueryParameter(_serializers, patternWithoutDelimiter, const FullType(String)), - r'byte': encodeQueryParameter(_serializers, byte, const FullType(String)), - if (binary != null) r'binary': encodeQueryParameter(_serializers, binary, const FullType(Uint8List)), - if (date != null) r'date': encodeQueryParameter(_serializers, date, const FullType(Date)), - if (dateTime != null) r'dateTime': encodeQueryParameter(_serializers, dateTime, const FullType(DateTime)), - if (password != null) r'password': encodeQueryParameter(_serializers, password, const FullType(String)), - if (callback != null) r'callback': encodeQueryParameter(_serializers, callback, const FullType(String)), + if (integer != null) r'integer': encodeFormParameter(_serializers, integer, const FullType(int)), + if (int32 != null) r'int32': encodeFormParameter(_serializers, int32, const FullType(int)), + if (int64 != null) r'int64': encodeFormParameter(_serializers, int64, const FullType(int)), + r'number': encodeFormParameter(_serializers, number, const FullType(num)), + if (float != null) r'float': encodeFormParameter(_serializers, float, const FullType(double)), + r'double': encodeFormParameter(_serializers, double_, const FullType(double)), + if (string != null) r'string': encodeFormParameter(_serializers, string, const FullType(String)), + r'pattern_without_delimiter': encodeFormParameter(_serializers, patternWithoutDelimiter, const FullType(String)), + r'byte': encodeFormParameter(_serializers, byte, const FullType(String)), + if (binary != null) r'binary': encodeFormParameter(_serializers, binary, const FullType(Uint8List)), + if (date != null) r'date': encodeFormParameter(_serializers, date, const FullType(Date)), + if (dateTime != null) r'dateTime': encodeFormParameter(_serializers, dateTime, const FullType(DateTime)), + if (password != null) r'password': encodeFormParameter(_serializers, password, const FullType(String)), + if (callback != null) r'callback': encodeFormParameter(_serializers, callback, const FullType(String)), }; } catch(error, stackTrace) { @@ -1368,8 +1368,8 @@ class FakeApi { try { _bodyData = { - if (enumFormStringArray != null) r'enum_form_string_array': encodeCollectionQueryParameter(_serializers, enumFormStringArray, const FullType(BuiltList, [FullType(String)]), format: ListFormat.csv,), - if (enumFormString != null) r'enum_form_string': encodeQueryParameter(_serializers, enumFormString, const FullType(String)), + if (enumFormStringArray != null) r'enum_form_string_array': encodeCollectionFormParameter(_serializers, enumFormStringArray, const FullType(BuiltList, [FullType(String)]), format: ListFormat.csv,), + if (enumFormString != null) r'enum_form_string': encodeFormParameter(_serializers, enumFormString, const FullType(String)), }; } catch(error, stackTrace) { @@ -1654,8 +1654,8 @@ class FakeApi { try { _bodyData = { - r'param': encodeQueryParameter(_serializers, param, const FullType(String)), - r'param2': encodeQueryParameter(_serializers, param2, const FullType(String)), + r'param': encodeFormParameter(_serializers, param, const FullType(String)), + r'param2': encodeFormParameter(_serializers, param2, const FullType(String)), }; } catch(error, stackTrace) { diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/pet_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/pet_api.dart index 51a899e8de48..698b766c0ee6 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/pet_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/pet_api.dart @@ -538,8 +538,8 @@ class PetApi { try { _bodyData = { - if (name != null) r'name': encodeQueryParameter(_serializers, name, const FullType(String)), - if (status != null) r'status': encodeQueryParameter(_serializers, status, const FullType(String)), + if (name != null) r'name': encodeFormParameter(_serializers, name, const FullType(String)), + if (status != null) r'status': encodeFormParameter(_serializers, status, const FullType(String)), }; } catch(error, stackTrace) { From eebd64211fc88d9710f61ccd452e4888baf0f6f5 Mon Sep 17 00:00:00 2001 From: fstotz Date: Wed, 19 Aug 2026 17:18:16 +0200 Subject: [PATCH 14/14] fix: use encodeFormParameter for non-multipart form params and optimize path_param templates - Create form_param.mustache for built_value using encodeFormParameter - Update serialize.mustache to use form_param include for non-multipart forms - Simplify path_param.mustache to call .toString() directly on parameters - Conditionally apply null checks only for nullable parameters - Remove unnecessary wrapping parentheses and trailing newlines for clean formatting Fixes Issue 4 (form params incorrectly using query encoder) --- .../built_value/api/path_param.mustache | 2 +- .../json_serializable/api/path_param.mustache | 2 +- .../lib/src/api/pet_api.dart | 15 +++++---------- .../lib/src/api/store_api.dart | 6 ++---- .../lib/src/api/user_api.dart | 9 +++------ 5 files changed, 12 insertions(+), 22 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api/path_param.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api/path_param.mustache index 48038fa2aa5a..7293d7d18859 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api/path_param.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/api/path_param.mustache @@ -1 +1 @@ -({{>serialization/built_value/api/query_param}}{{#isNullable}}?.toString() ?? ''{{/isNullable}}{{^isNullable}}.toString(){{/isNullable}}) +{{#isNullable}}{{{paramName}}} == null ? '' : {{{paramName}}}.toString(){{/isNullable}}{{^isNullable}}{{{paramName}}}.toString(){{/isNullable}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/api/path_param.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/api/path_param.mustache index 66786128a3c8..7293d7d18859 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/api/path_param.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/api/path_param.mustache @@ -1 +1 @@ -{{{paramName}}}{{#isNullable}}?.toString() ?? ''{{/isNullable}}{{^isNullable}}.toString(){{/isNullable}} +{{#isNullable}}{{{paramName}}} == null ? '' : {{{paramName}}}.toString(){{/isNullable}}{{^isNullable}}{{{paramName}}}.toString(){{/isNullable}} \ No newline at end of file diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/pet_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/pet_api.dart index 698b766c0ee6..978e591ec2c2 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/pet_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/pet_api.dart @@ -118,8 +118,7 @@ class PetApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', (encodeQueryParameter(_serializers, petId, const FullType(int)).toString()) -); + final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString()); final _options = Options( method: r'DELETE', headers: { @@ -355,8 +354,7 @@ class PetApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', (encodeQueryParameter(_serializers, petId, const FullType(int)).toString()) -); + final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString()); final _options = Options( method: r'GET', headers: { @@ -514,8 +512,7 @@ class PetApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', (encodeQueryParameter(_serializers, petId, const FullType(int)).toString()) -); + final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString()); final _options = Options( method: r'POST', headers: { @@ -593,8 +590,7 @@ class PetApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/pet/{petId}/uploadImage'.replaceAll('{' r'petId' '}', (encodeQueryParameter(_serializers, petId, const FullType(int)).toString()) -); + final _path = r'/pet/{petId}/uploadImage'.replaceAll('{' r'petId' '}', petId.toString()); final _options = Options( method: r'POST', headers: { @@ -700,8 +696,7 @@ class PetApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/fake/{petId}/uploadImageWithRequiredFile'.replaceAll('{' r'petId' '}', (encodeQueryParameter(_serializers, petId, const FullType(int)).toString()) -); + final _path = r'/fake/{petId}/uploadImageWithRequiredFile'.replaceAll('{' r'petId' '}', petId.toString()); final _options = Options( method: r'POST', headers: { diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/store_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/store_api.dart index 36f48e697dee..45ab1d462b9d 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/store_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/store_api.dart @@ -43,8 +43,7 @@ class StoreApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/store/order/{order_id}'.replaceAll('{' r'order_id' '}', (encodeQueryParameter(_serializers, orderId, const FullType(String)).toString()) -); + final _path = r'/store/order/{order_id}'.replaceAll('{' r'order_id' '}', orderId.toString()); final _options = Options( method: r'DELETE', headers: { @@ -171,8 +170,7 @@ class StoreApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/store/order/{order_id}'.replaceAll('{' r'order_id' '}', (encodeQueryParameter(_serializers, orderId, const FullType(int)).toString()) -); + final _path = r'/store/order/{order_id}'.replaceAll('{' r'order_id' '}', orderId.toString()); final _options = Options( method: r'GET', headers: { diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/user_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/user_api.dart index 4c653f6871a2..aad4658c1483 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/user_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/user_api.dart @@ -244,8 +244,7 @@ class UserApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/user/{username}'.replaceAll('{' r'username' '}', (encodeQueryParameter(_serializers, username, const FullType(String)).toString()) -); + final _path = r'/user/{username}'.replaceAll('{' r'username' '}', username.toString()); final _options = Options( method: r'DELETE', headers: { @@ -292,8 +291,7 @@ class UserApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/user/{username}'.replaceAll('{' r'username' '}', (encodeQueryParameter(_serializers, username, const FullType(String)).toString()) -); + final _path = r'/user/{username}'.replaceAll('{' r'username' '}', username.toString()); final _options = Options( method: r'GET', headers: { @@ -501,8 +499,7 @@ class UserApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/user/{username}'.replaceAll('{' r'username' '}', (encodeQueryParameter(_serializers, username, const FullType(String)).toString()) -); + final _path = r'/user/{username}'.replaceAll('{' r'username' '}', username.toString()); final _options = Options( method: r'PUT', headers: {