diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java
index b17662a636b..0284f6fb5a1 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java
@@ -546,4 +546,13 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege
public void setWithXml(boolean withXml) {
this.withXml = withXml;
}
+
+ @Override
+ public String toDefaultValue(Schema schema) {
+ if (schema.getDefault() != null) {
+ return schema.getDefault().toString();
+ } else {
+ return null;
+ }
+ }
}
diff --git a/modules/openapi-generator/src/main/resources/go/README.mustache b/modules/openapi-generator/src/main/resources/go/README.mustache
index 0f687049928..ee03ae60625 100644
--- a/modules/openapi-generator/src/main/resources/go/README.mustache
+++ b/modules/openapi-generator/src/main/resources/go/README.mustache
@@ -24,7 +24,6 @@ Install the following dependencies:
go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context
-go get gopkg.in/go-resty/resty.v0
go get github.com/antihax/optional
```
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/go/GoModelTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/go/GoModelTest.java
index a43a2615490..0513071ccbf 100644
--- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/go/GoModelTest.java
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/go/GoModelTest.java
@@ -38,7 +38,7 @@ public class GoModelTest {
Assert.assertEquals(property1.baseName, "id");
Assert.assertEquals(property1.datatype, "int64");
Assert.assertEquals(property1.name, "Id");
- Assert.assertEquals(property1.defaultValue, "null");
+ Assert.assertNull(property1.defaultValue);
Assert.assertEquals(property1.baseType, "int64");
Assert.assertTrue(property1.hasMore);
Assert.assertTrue(property1.required);
@@ -49,7 +49,7 @@ public class GoModelTest {
Assert.assertEquals(property2.baseName, "name");
Assert.assertEquals(property2.datatype, "string");
Assert.assertEquals(property2.name, "Name");
- Assert.assertEquals(property2.defaultValue, "null");
+ Assert.assertNull(property2.defaultValue);
Assert.assertEquals(property2.baseType, "string");
Assert.assertTrue(property2.hasMore);
Assert.assertTrue(property2.required);
@@ -61,7 +61,7 @@ public class GoModelTest {
Assert.assertEquals(property3.complexType, "time.Time");
Assert.assertEquals(property3.datatype, "time.Time");
Assert.assertEquals(property3.name, "CreatedAt");
- Assert.assertEquals(property3.defaultValue, "null");
+ Assert.assertNull(property3.defaultValue);
Assert.assertEquals(property3.baseType, "time.Time");
Assert.assertFalse(property3.hasMore);
Assert.assertFalse(property3.required);
@@ -88,7 +88,7 @@ public class GoModelTest {
Assert.assertEquals(property1.baseName, "id");
Assert.assertEquals(property1.datatype, "int64");
Assert.assertEquals(property1.name, "Id");
- Assert.assertEquals(property1.defaultValue, "null");
+ Assert.assertNull(property1.defaultValue);
Assert.assertEquals(property1.baseType, "int64");
Assert.assertTrue(property1.hasMore);
Assert.assertTrue(property1.required);
diff --git a/samples/client/petstore/go/go-petstore/README.md b/samples/client/petstore/go/go-petstore/README.md
index ebea7ab70d8..ce4cfaf8772 100644
--- a/samples/client/petstore/go/go-petstore/README.md
+++ b/samples/client/petstore/go/go-petstore/README.md
@@ -16,7 +16,6 @@ Install the following dependencies:
go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context
-go get gopkg.in/go-resty/resty.v0
go get github.com/antihax/optional
```
diff --git a/samples/client/petstore/go/go-petstore/docs/AdditionalPropertiesClass.md b/samples/client/petstore/go/go-petstore/docs/AdditionalPropertiesClass.md
index abdb42c8e01..0c8ba7085b3 100644
--- a/samples/client/petstore/go/go-petstore/docs/AdditionalPropertiesClass.md
+++ b/samples/client/petstore/go/go-petstore/docs/AdditionalPropertiesClass.md
@@ -3,8 +3,8 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**MapProperty** | **map[string]string** | | [optional] [default to null]
-**MapOfMapProperty** | [**map[string]map[string]string**](map.md) | | [optional] [default to null]
+**MapProperty** | **map[string]string** | | [optional]
+**MapOfMapProperty** | [**map[string]map[string]string**](map.md) | | [optional]
[[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/go/go-petstore/docs/Animal.md b/samples/client/petstore/go/go-petstore/docs/Animal.md
index e7163af792c..d7113331a60 100644
--- a/samples/client/petstore/go/go-petstore/docs/Animal.md
+++ b/samples/client/petstore/go/go-petstore/docs/Animal.md
@@ -3,8 +3,8 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**ClassName** | **string** | | [default to null]
-**Color** | **string** | | [optional] [default to null]
+**ClassName** | **string** | |
+**Color** | **string** | | [optional] [default to red]
[[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/go/go-petstore/docs/ApiResponse.md b/samples/client/petstore/go/go-petstore/docs/ApiResponse.md
index bd41c62af0f..f9b16338ecd 100644
--- a/samples/client/petstore/go/go-petstore/docs/ApiResponse.md
+++ b/samples/client/petstore/go/go-petstore/docs/ApiResponse.md
@@ -3,9 +3,9 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Code** | **int32** | | [optional] [default to null]
-**Type** | **string** | | [optional] [default to null]
-**Message** | **string** | | [optional] [default to null]
+**Code** | **int32** | | [optional]
+**Type** | **string** | | [optional]
+**Message** | **string** | | [optional]
[[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/go/go-petstore/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/go/go-petstore/docs/ArrayOfArrayOfNumberOnly.md
index 495038e58e1..a53147b6270 100644
--- a/samples/client/petstore/go/go-petstore/docs/ArrayOfArrayOfNumberOnly.md
+++ b/samples/client/petstore/go/go-petstore/docs/ArrayOfArrayOfNumberOnly.md
@@ -3,7 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**ArrayArrayNumber** | [**[][]float32**](array.md) | | [optional] [default to null]
+**ArrayArrayNumber** | [**[][]float32**](array.md) | | [optional]
[[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/go/go-petstore/docs/ArrayOfNumberOnly.md b/samples/client/petstore/go/go-petstore/docs/ArrayOfNumberOnly.md
index bd7a48160d2..19031e76d20 100644
--- a/samples/client/petstore/go/go-petstore/docs/ArrayOfNumberOnly.md
+++ b/samples/client/petstore/go/go-petstore/docs/ArrayOfNumberOnly.md
@@ -3,7 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**ArrayNumber** | **[]float32** | | [optional] [default to null]
+**ArrayNumber** | **[]float32** | | [optional]
[[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/go/go-petstore/docs/ArrayTest.md b/samples/client/petstore/go/go-petstore/docs/ArrayTest.md
index 6cf88880292..a46d1acf665 100644
--- a/samples/client/petstore/go/go-petstore/docs/ArrayTest.md
+++ b/samples/client/petstore/go/go-petstore/docs/ArrayTest.md
@@ -3,9 +3,9 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**ArrayOfString** | **[]string** | | [optional] [default to null]
-**ArrayArrayOfInteger** | [**[][]int64**](array.md) | | [optional] [default to null]
-**ArrayArrayOfModel** | [**[][]ReadOnlyFirst**](array.md) | | [optional] [default to null]
+**ArrayOfString** | **[]string** | | [optional]
+**ArrayArrayOfInteger** | [**[][]int64**](array.md) | | [optional]
+**ArrayArrayOfModel** | [**[][]ReadOnlyFirst**](array.md) | | [optional]
[[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/go/go-petstore/docs/Capitalization.md b/samples/client/petstore/go/go-petstore/docs/Capitalization.md
index 760ada1db2d..ac65ee37dba 100644
--- a/samples/client/petstore/go/go-petstore/docs/Capitalization.md
+++ b/samples/client/petstore/go/go-petstore/docs/Capitalization.md
@@ -3,12 +3,12 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**SmallCamel** | **string** | | [optional] [default to null]
-**CapitalCamel** | **string** | | [optional] [default to null]
-**SmallSnake** | **string** | | [optional] [default to null]
-**CapitalSnake** | **string** | | [optional] [default to null]
-**SCAETHFlowPoints** | **string** | | [optional] [default to null]
-**ATT_NAME** | **string** | Name of the pet | [optional] [default to null]
+**SmallCamel** | **string** | | [optional]
+**CapitalCamel** | **string** | | [optional]
+**SmallSnake** | **string** | | [optional]
+**CapitalSnake** | **string** | | [optional]
+**SCAETHFlowPoints** | **string** | | [optional]
+**ATT_NAME** | **string** | Name of the pet | [optional]
[[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/go/go-petstore/docs/Cat.md b/samples/client/petstore/go/go-petstore/docs/Cat.md
index 3a49c3ca62e..b51d5fd2b95 100644
--- a/samples/client/petstore/go/go-petstore/docs/Cat.md
+++ b/samples/client/petstore/go/go-petstore/docs/Cat.md
@@ -3,9 +3,9 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**ClassName** | **string** | | [default to null]
-**Color** | **string** | | [optional] [default to null]
-**Declawed** | **bool** | | [optional] [default to null]
+**ClassName** | **string** | |
+**Color** | **string** | | [optional] [default to red]
+**Declawed** | **bool** | | [optional]
[[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/go/go-petstore/docs/Category.md b/samples/client/petstore/go/go-petstore/docs/Category.md
index a64cb0a3904..a0f5c8446a5 100644
--- a/samples/client/petstore/go/go-petstore/docs/Category.md
+++ b/samples/client/petstore/go/go-petstore/docs/Category.md
@@ -3,8 +3,8 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Id** | **int64** | | [optional] [default to null]
-**Name** | **string** | | [optional] [default to null]
+**Id** | **int64** | | [optional]
+**Name** | **string** | | [optional]
[[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/go/go-petstore/docs/ClassModel.md b/samples/client/petstore/go/go-petstore/docs/ClassModel.md
index d9005f21a01..8d7a7284393 100644
--- a/samples/client/petstore/go/go-petstore/docs/ClassModel.md
+++ b/samples/client/petstore/go/go-petstore/docs/ClassModel.md
@@ -3,7 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Class** | **string** | | [optional] [default to null]
+**Class** | **string** | | [optional]
[[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/go/go-petstore/docs/Client.md b/samples/client/petstore/go/go-petstore/docs/Client.md
index d8edb814853..fdf5fd9a69d 100644
--- a/samples/client/petstore/go/go-petstore/docs/Client.md
+++ b/samples/client/petstore/go/go-petstore/docs/Client.md
@@ -3,7 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Client** | **string** | | [optional] [default to null]
+**Client** | **string** | | [optional]
[[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/go/go-petstore/docs/Dog.md b/samples/client/petstore/go/go-petstore/docs/Dog.md
index 7178972d5dc..13c0aa28e6b 100644
--- a/samples/client/petstore/go/go-petstore/docs/Dog.md
+++ b/samples/client/petstore/go/go-petstore/docs/Dog.md
@@ -3,9 +3,9 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**ClassName** | **string** | | [default to null]
-**Color** | **string** | | [optional] [default to null]
-**Breed** | **string** | | [optional] [default to null]
+**ClassName** | **string** | |
+**Color** | **string** | | [optional] [default to red]
+**Breed** | **string** | | [optional]
[[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/go/go-petstore/docs/EnumArrays.md b/samples/client/petstore/go/go-petstore/docs/EnumArrays.md
index 2ca85fdd1fb..9eca8b29032 100644
--- a/samples/client/petstore/go/go-petstore/docs/EnumArrays.md
+++ b/samples/client/petstore/go/go-petstore/docs/EnumArrays.md
@@ -3,8 +3,8 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**JustSymbol** | **string** | | [optional] [default to null]
-**ArrayEnum** | **[]string** | | [optional] [default to null]
+**JustSymbol** | **string** | | [optional]
+**ArrayEnum** | **[]string** | | [optional]
[[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/go/go-petstore/docs/EnumTest.md b/samples/client/petstore/go/go-petstore/docs/EnumTest.md
index c286c17df38..bd077c462cb 100644
--- a/samples/client/petstore/go/go-petstore/docs/EnumTest.md
+++ b/samples/client/petstore/go/go-petstore/docs/EnumTest.md
@@ -3,11 +3,11 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**EnumString** | **string** | | [optional] [default to null]
-**EnumStringRequired** | **string** | | [default to null]
-**EnumInteger** | **int32** | | [optional] [default to null]
-**EnumNumber** | **float64** | | [optional] [default to null]
-**OuterEnum** | [***OuterEnum**](OuterEnum.md) | | [optional] [default to null]
+**EnumString** | **string** | | [optional]
+**EnumStringRequired** | **string** | |
+**EnumInteger** | **int32** | | [optional]
+**EnumNumber** | **float64** | | [optional]
+**OuterEnum** | [***OuterEnum**](OuterEnum.md) | | [optional]
[[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/go/go-petstore/docs/FakeApi.md b/samples/client/petstore/go/go-petstore/docs/FakeApi.md
index 7c1b6d00025..0da61df6631 100644
--- a/samples/client/petstore/go/go-petstore/docs/FakeApi.md
+++ b/samples/client/petstore/go/go-petstore/docs/FakeApi.md
@@ -288,7 +288,7 @@ Name | Type | Description | Notes
**enumQueryInteger** | **optional.Int32**| Query parameter enum test (double) |
**enumQueryDouble** | **optional.Float64**| Query parameter enum test (double) |
**enumFormStringArray** | [**optional.Interface of []string**](array.md)| Form parameter enum test (string array) |
- **enumFormString** | **optional.String**| Form parameter enum test (string) |
+ **enumFormString** | **optional.String**| Form parameter enum test (string) | [default to -efg]
### Return type
diff --git a/samples/client/petstore/go/go-petstore/docs/FormatTest.md b/samples/client/petstore/go/go-petstore/docs/FormatTest.md
index 5d29ac67d02..1af8963ef61 100644
--- a/samples/client/petstore/go/go-petstore/docs/FormatTest.md
+++ b/samples/client/petstore/go/go-petstore/docs/FormatTest.md
@@ -3,19 +3,19 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Integer** | **int32** | | [optional] [default to null]
-**Int32** | **int32** | | [optional] [default to null]
-**Int64** | **int64** | | [optional] [default to null]
-**Number** | **float32** | | [default to null]
-**Float** | **float32** | | [optional] [default to null]
-**Double** | **float64** | | [optional] [default to null]
-**String** | **string** | | [optional] [default to null]
-**Byte** | **string** | | [default to null]
-**Binary** | [****os.File**](*os.File.md) | | [optional] [default to null]
-**Date** | **string** | | [default to null]
-**DateTime** | [**time.Time**](time.Time.md) | | [optional] [default to null]
-**Uuid** | **string** | | [optional] [default to null]
-**Password** | **string** | | [default to null]
+**Integer** | **int32** | | [optional]
+**Int32** | **int32** | | [optional]
+**Int64** | **int64** | | [optional]
+**Number** | **float32** | |
+**Float** | **float32** | | [optional]
+**Double** | **float64** | | [optional]
+**String** | **string** | | [optional]
+**Byte** | **string** | |
+**Binary** | [****os.File**](*os.File.md) | | [optional]
+**Date** | **string** | |
+**DateTime** | [**time.Time**](time.Time.md) | | [optional]
+**Uuid** | **string** | | [optional]
+**Password** | **string** | |
[[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/go/go-petstore/docs/HasOnlyReadOnly.md b/samples/client/petstore/go/go-petstore/docs/HasOnlyReadOnly.md
index 32dfdedcfe7..c259e8b325a 100644
--- a/samples/client/petstore/go/go-petstore/docs/HasOnlyReadOnly.md
+++ b/samples/client/petstore/go/go-petstore/docs/HasOnlyReadOnly.md
@@ -3,8 +3,8 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Bar** | **string** | | [optional] [default to null]
-**Foo** | **string** | | [optional] [default to null]
+**Bar** | **string** | | [optional]
+**Foo** | **string** | | [optional]
[[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/go/go-petstore/docs/List.md b/samples/client/petstore/go/go-petstore/docs/List.md
index 54fd3876c26..3255fa27868 100644
--- a/samples/client/petstore/go/go-petstore/docs/List.md
+++ b/samples/client/petstore/go/go-petstore/docs/List.md
@@ -3,7 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Var123List** | **string** | | [optional] [default to null]
+**Var123List** | **string** | | [optional]
[[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/go/go-petstore/docs/MapTest.md b/samples/client/petstore/go/go-petstore/docs/MapTest.md
index 6b70bf448e8..3f546994fd4 100644
--- a/samples/client/petstore/go/go-petstore/docs/MapTest.md
+++ b/samples/client/petstore/go/go-petstore/docs/MapTest.md
@@ -3,8 +3,8 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**MapMapOfString** | [**map[string]map[string]string**](map.md) | | [optional] [default to null]
-**MapOfEnumString** | **map[string]string** | | [optional] [default to null]
+**MapMapOfString** | [**map[string]map[string]string**](map.md) | | [optional]
+**MapOfEnumString** | **map[string]string** | | [optional]
[[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/go/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/go/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md
index c1733aa247b..0e5f61f6273 100644
--- a/samples/client/petstore/go/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md
+++ b/samples/client/petstore/go/go-petstore/docs/MixedPropertiesAndAdditionalPropertiesClass.md
@@ -3,9 +3,9 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Uuid** | **string** | | [optional] [default to null]
-**DateTime** | [**time.Time**](time.Time.md) | | [optional] [default to null]
-**Map** | [**map[string]Animal**](Animal.md) | | [optional] [default to null]
+**Uuid** | **string** | | [optional]
+**DateTime** | [**time.Time**](time.Time.md) | | [optional]
+**Map** | [**map[string]Animal**](Animal.md) | | [optional]
[[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/go/go-petstore/docs/Model200Response.md b/samples/client/petstore/go/go-petstore/docs/Model200Response.md
index 8b4bb38033d..c5abac20d86 100644
--- a/samples/client/petstore/go/go-petstore/docs/Model200Response.md
+++ b/samples/client/petstore/go/go-petstore/docs/Model200Response.md
@@ -3,8 +3,8 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Name** | **int32** | | [optional] [default to null]
-**Class** | **string** | | [optional] [default to null]
+**Name** | **int32** | | [optional]
+**Class** | **string** | | [optional]
[[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/go/go-petstore/docs/Name.md b/samples/client/petstore/go/go-petstore/docs/Name.md
index d677e60263f..fccddf63899 100644
--- a/samples/client/petstore/go/go-petstore/docs/Name.md
+++ b/samples/client/petstore/go/go-petstore/docs/Name.md
@@ -3,10 +3,10 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Name** | **int32** | | [default to null]
-**SnakeCase** | **int32** | | [optional] [default to null]
-**Property** | **string** | | [optional] [default to null]
-**Var123Number** | **int32** | | [optional] [default to null]
+**Name** | **int32** | |
+**SnakeCase** | **int32** | | [optional]
+**Property** | **string** | | [optional]
+**Var123Number** | **int32** | | [optional]
[[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/go/go-petstore/docs/NumberOnly.md b/samples/client/petstore/go/go-petstore/docs/NumberOnly.md
index 3ebbf2f0308..4d2ea1b0413 100644
--- a/samples/client/petstore/go/go-petstore/docs/NumberOnly.md
+++ b/samples/client/petstore/go/go-petstore/docs/NumberOnly.md
@@ -3,7 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**JustNumber** | **float32** | | [optional] [default to null]
+**JustNumber** | **float32** | | [optional]
[[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/go/go-petstore/docs/Order.md b/samples/client/petstore/go/go-petstore/docs/Order.md
index 69c55bc5abf..befa9151a18 100644
--- a/samples/client/petstore/go/go-petstore/docs/Order.md
+++ b/samples/client/petstore/go/go-petstore/docs/Order.md
@@ -3,12 +3,12 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Id** | **int64** | | [optional] [default to null]
-**PetId** | **int64** | | [optional] [default to null]
-**Quantity** | **int32** | | [optional] [default to null]
-**ShipDate** | [**time.Time**](time.Time.md) | | [optional] [default to null]
-**Status** | **string** | Order Status | [optional] [default to null]
-**Complete** | **bool** | | [optional] [default to null]
+**Id** | **int64** | | [optional]
+**PetId** | **int64** | | [optional]
+**Quantity** | **int32** | | [optional]
+**ShipDate** | [**time.Time**](time.Time.md) | | [optional]
+**Status** | **string** | Order Status | [optional]
+**Complete** | **bool** | | [optional] [default to false]
[[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/go/go-petstore/docs/OuterComposite.md b/samples/client/petstore/go/go-petstore/docs/OuterComposite.md
index fc4e2c0c00d..30732cf10bf 100644
--- a/samples/client/petstore/go/go-petstore/docs/OuterComposite.md
+++ b/samples/client/petstore/go/go-petstore/docs/OuterComposite.md
@@ -3,9 +3,9 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**MyNumber** | **float32** | | [optional] [default to null]
-**MyString** | **string** | | [optional] [default to null]
-**MyBoolean** | **bool** | | [optional] [default to null]
+**MyNumber** | **float32** | | [optional]
+**MyString** | **string** | | [optional]
+**MyBoolean** | **bool** | | [optional]
[[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/go/go-petstore/docs/Pet.md b/samples/client/petstore/go/go-petstore/docs/Pet.md
index 8579e3d3fb9..d89a8473d95 100644
--- a/samples/client/petstore/go/go-petstore/docs/Pet.md
+++ b/samples/client/petstore/go/go-petstore/docs/Pet.md
@@ -3,12 +3,12 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Id** | **int64** | | [optional] [default to null]
-**Category** | [***Category**](Category.md) | | [optional] [default to null]
-**Name** | **string** | | [default to null]
-**PhotoUrls** | **[]string** | | [default to null]
-**Tags** | [**[]Tag**](Tag.md) | | [optional] [default to null]
-**Status** | **string** | pet status in the store | [optional] [default to null]
+**Id** | **int64** | | [optional]
+**Category** | [***Category**](Category.md) | | [optional]
+**Name** | **string** | |
+**PhotoUrls** | **[]string** | |
+**Tags** | [**[]Tag**](Tag.md) | | [optional]
+**Status** | **string** | pet status in the store | [optional]
[[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/go/go-petstore/docs/ReadOnlyFirst.md b/samples/client/petstore/go/go-petstore/docs/ReadOnlyFirst.md
index 3ff591d7a74..b3546db3cc8 100644
--- a/samples/client/petstore/go/go-petstore/docs/ReadOnlyFirst.md
+++ b/samples/client/petstore/go/go-petstore/docs/ReadOnlyFirst.md
@@ -3,8 +3,8 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Bar** | **string** | | [optional] [default to null]
-**Baz** | **string** | | [optional] [default to null]
+**Bar** | **string** | | [optional]
+**Baz** | **string** | | [optional]
[[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/go/go-petstore/docs/Return.md b/samples/client/petstore/go/go-petstore/docs/Return.md
index 137b95568c4..bcf50e4e5cd 100644
--- a/samples/client/petstore/go/go-petstore/docs/Return.md
+++ b/samples/client/petstore/go/go-petstore/docs/Return.md
@@ -3,7 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Return** | **int32** | | [optional] [default to null]
+**Return** | **int32** | | [optional]
[[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/go/go-petstore/docs/SpecialModelName.md b/samples/client/petstore/go/go-petstore/docs/SpecialModelName.md
index dcf601a308d..7b2dfb654c0 100644
--- a/samples/client/petstore/go/go-petstore/docs/SpecialModelName.md
+++ b/samples/client/petstore/go/go-petstore/docs/SpecialModelName.md
@@ -3,7 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**SpecialPropertyName** | **int64** | | [optional] [default to null]
+**SpecialPropertyName** | **int64** | | [optional]
[[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/go/go-petstore/docs/Tag.md b/samples/client/petstore/go/go-petstore/docs/Tag.md
index 378bdbeb1d7..acacb4f54a7 100644
--- a/samples/client/petstore/go/go-petstore/docs/Tag.md
+++ b/samples/client/petstore/go/go-petstore/docs/Tag.md
@@ -3,8 +3,8 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Id** | **int64** | | [optional] [default to null]
-**Name** | **string** | | [optional] [default to null]
+**Id** | **int64** | | [optional]
+**Name** | **string** | | [optional]
[[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/go/go-petstore/docs/User.md b/samples/client/petstore/go/go-petstore/docs/User.md
index 678880bf542..87e1456c8a8 100644
--- a/samples/client/petstore/go/go-petstore/docs/User.md
+++ b/samples/client/petstore/go/go-petstore/docs/User.md
@@ -3,14 +3,14 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Id** | **int64** | | [optional] [default to null]
-**Username** | **string** | | [optional] [default to null]
-**FirstName** | **string** | | [optional] [default to null]
-**LastName** | **string** | | [optional] [default to null]
-**Email** | **string** | | [optional] [default to null]
-**Password** | **string** | | [optional] [default to null]
-**Phone** | **string** | | [optional] [default to null]
-**UserStatus** | **int32** | User Status | [optional] [default to null]
+**Id** | **int64** | | [optional]
+**Username** | **string** | | [optional]
+**FirstName** | **string** | | [optional]
+**LastName** | **string** | | [optional]
+**Email** | **string** | | [optional]
+**Password** | **string** | | [optional]
+**Phone** | **string** | | [optional]
+**UserStatus** | **int32** | User Status | [optional]
[[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/go/pom.xml b/samples/client/petstore/go/pom.xml
index 5525ec1e99e..9350f9881d9 100644
--- a/samples/client/petstore/go/pom.xml
+++ b/samples/client/petstore/go/pom.xml
@@ -69,21 +69,7 @@
- go-get-resty
- pre-integration-test
-
- exec
-
-
- go
-
- get
- gopkg.in/go-resty/resty.v0
-
-
-
-
- go-get-resty
+ go-get-optional
pre-integration-test
exec