From 249770ba1fa20b6716b304c9176b2ccc54b6ee9d Mon Sep 17 00:00:00 2001 From: "Andrew S. Brown" Date: Thu, 23 Aug 2018 07:47:25 -0700 Subject: [PATCH 1/6] Define "any-type" as an empty interface in generated go code. --- .../codegen/languages/AbstractGoCodegen.java | 23 +++++++++++++------ .../openapitools/codegen/go/GoModelTest.java | 19 ++++++++++++--- 2 files changed, 32 insertions(+), 10 deletions(-) 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 70f251d33cf9..a9b2ceee4c8a 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 @@ -83,7 +83,9 @@ public AbstractGoCodegen() { "complex64", "complex128", "rune", - "byte") + "byte", + "interface{}" + ) ); instantiationTypes.clear(); @@ -310,12 +312,19 @@ public String getSchemaType(Schema p) { if (ref != null && !ref.isEmpty()) { type = openAPIType; - } else if (typeMapping.containsKey(openAPIType)) { - type = typeMapping.get(openAPIType); - if (languageSpecificPrimitives.contains(type)) - return (type); - } else - type = openAPIType; + } else { + // Handle "any type" as an empty interface + if (openAPIType == "object" && p != null && !ModelUtils.isObjectSchema(p) && !ModelUtils.isMapSchema(p)) { + return "interface{}"; + } + + if (typeMapping.containsKey(openAPIType)) { + type = typeMapping.get(openAPIType); + if (languageSpecificPrimitives.contains(type)) + return (type); + } else + type = openAPIType; + } return type; } 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 27e433f6791f..5b3fe0f8f799 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 @@ -40,8 +40,10 @@ public void simpleModelTest() { .addProperties("id", new IntegerSchema().format(SchemaTypeUtil.INTEGER64_FORMAT)) .addProperties("name", new StringSchema()) .addProperties("createdAt", new DateTimeSchema()) + .addProperties("anyValue", new Schema()) .addRequiredItem("id") - .addRequiredItem("name"); + .addRequiredItem("name") + .addRequiredItem("anyValue"); final DefaultCodegen codegen = new GoClientCodegen(); OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model); codegen.setOpenAPI(openAPI); @@ -50,7 +52,7 @@ public void simpleModelTest() { Assert.assertEquals(cm.name, "sample"); Assert.assertEquals(cm.classname, "Sample"); Assert.assertEquals(cm.description, "a sample model"); - Assert.assertEquals(cm.vars.size(), 3); + Assert.assertEquals(cm.vars.size(), 4); Assert.assertEquals(cm.imports.size(), 1); final CodegenProperty property1 = cm.vars.get(0); @@ -80,10 +82,21 @@ public void simpleModelTest() { Assert.assertEquals(property3.name, "CreatedAt"); Assert.assertNull(property3.defaultValue); Assert.assertEquals(property3.baseType, "time.Time"); - Assert.assertFalse(property3.hasMore); + Assert.assertTrue(property3.hasMore); Assert.assertFalse(property3.required); + + final CodegenProperty property4 = cm.vars.get(3); + Assert.assertEquals(property4.baseName, "anyValue"); + Assert.assertEquals(property4.baseType, "interface{}"); + Assert.assertEquals(property4.dataType, "interface{}"); + Assert.assertTrue(property1.isPrimitiveType); + Assert.assertEquals(property4.name, "AnyValue"); + Assert.assertNull(property4.defaultValue); + Assert.assertFalse(property4.hasMore); + Assert.assertTrue(property4.required); } + @Test(description = "convert a model with list property") public void listPropertyTest() { final Schema model = new Schema() From d81b1bdb13f571c2e128c87584a2ecfc4dd2dcc4 Mon Sep 17 00:00:00 2001 From: Mattia Bertorello Date: Thu, 12 Sep 2019 10:22:55 +0200 Subject: [PATCH 2/6] Replace openAPIType == "object" with openAPIType.equals("object") on-behalf-of: @arduino --- .../org/openapitools/codegen/languages/AbstractGoCodegen.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 a9b2ceee4c8a..4bcf89728b44 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 @@ -314,7 +314,7 @@ public String getSchemaType(Schema p) { type = openAPIType; } else { // Handle "any type" as an empty interface - if (openAPIType == "object" && p != null && !ModelUtils.isObjectSchema(p) && !ModelUtils.isMapSchema(p)) { + if (openAPIType.equals("object") && !ModelUtils.isObjectSchema(p) && !ModelUtils.isMapSchema(p)) { return "interface{}"; } From 2e891de77d958324740615299bb338fd00b6173a Mon Sep 17 00:00:00 2001 From: Mattia Bertorello Date: Thu, 12 Sep 2019 10:39:42 +0200 Subject: [PATCH 3/6] Update petstore sample on-behalf-of: @arduino --- .../go-api-server/.openapi-generator/VERSION | 2 +- .../server/petstore/go-api-server/Dockerfile | 2 +- .../petstore/go-api-server/api/openapi.yaml | 171 ++++++++---------- .../petstore/go-api-server/go/README.md | 35 ---- .../go-api-server/go/model_inline_object.go | 19 -- .../go-api-server/go/model_inline_object_1.go | 23 --- samples/server/petstore/go-api-server/main.go | 4 +- 7 files changed, 77 insertions(+), 179 deletions(-) delete mode 100644 samples/server/petstore/go-api-server/go/README.md delete mode 100644 samples/server/petstore/go-api-server/go/model_inline_object.go delete mode 100644 samples/server/petstore/go-api-server/go/model_inline_object_1.go diff --git a/samples/server/petstore/go-api-server/.openapi-generator/VERSION b/samples/server/petstore/go-api-server/.openapi-generator/VERSION index afa636560641..d1a8f58b3884 100644 --- a/samples/server/petstore/go-api-server/.openapi-generator/VERSION +++ b/samples/server/petstore/go-api-server/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.0-SNAPSHOT \ No newline at end of file +4.1.2-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/go-api-server/Dockerfile b/samples/server/petstore/go-api-server/Dockerfile index 0f512c75104b..cfdfbaed0804 100644 --- a/samples/server/petstore/go-api-server/Dockerfile +++ b/samples/server/petstore/go-api-server/Dockerfile @@ -1,6 +1,6 @@ FROM golang:1.10 AS build WORKDIR /go/src -COPY ./ +COPY go ./go COPY main.go . ENV CGO_ENABLED=0 diff --git a/samples/server/petstore/go-api-server/api/openapi.yaml b/samples/server/petstore/go-api-server/api/openapi.yaml index b25b5c3fe61c..a088e6e6c48b 100644 --- a/samples/server/petstore/go-api-server/api/openapi.yaml +++ b/samples/server/petstore/go-api-server/api/openapi.yaml @@ -1,14 +1,12 @@ -openapi: 3.0.0 +openapi: 3.0.1 info: - description: This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + description: This is a sample server Petstore server. For this sample, you can use + the api key `special-key` to test the authorization filters. license: name: Apache-2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html title: OpenAPI Petstore version: 1.0.0 -externalDocs: - description: Find out more about Swagger - url: http://swagger.io servers: - url: http://petstore.swagger.io/v2 tags: @@ -23,9 +21,18 @@ paths: post: operationId: addPet requestBody: - $ref: '#/components/requestBodies/Pet' + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + required: true responses: 405: + content: {} description: Invalid input security: - petstore_auth: @@ -38,13 +45,24 @@ paths: put: operationId: updatePet requestBody: - $ref: '#/components/requestBodies/Pet' + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + required: true responses: 400: + content: {} description: Invalid ID supplied 404: + content: {} description: Pet not found 405: + content: {} description: Validation exception security: - petstore_auth: @@ -89,6 +107,7 @@ paths: type: array description: successful operation 400: + content: {} description: Invalid status value security: - petstore_auth: @@ -100,7 +119,8 @@ paths: /pet/findByTags: get: deprecated: true - description: Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + description: Multiple tags can be provided with comma separated strings. Use + tag1, tag2, tag3 for testing. operationId: findPetsByTags parameters: - description: Tags to filter by @@ -128,6 +148,7 @@ paths: type: array description: successful operation 400: + content: {} description: Invalid tag value security: - petstore_auth: @@ -140,24 +161,20 @@ paths: delete: operationId: deletePet parameters: - - explode: false - in: header + - in: header name: api_key - required: false schema: type: string - style: simple - description: Pet id to delete - explode: false in: path name: petId required: true schema: format: int64 type: integer - style: simple responses: 400: + content: {} description: Invalid pet value security: - petstore_auth: @@ -171,14 +188,12 @@ paths: operationId: getPetById parameters: - description: ID of pet to return - explode: false in: path name: petId required: true schema: format: int64 type: integer - style: simple responses: 200: content: @@ -190,8 +205,10 @@ paths: $ref: '#/components/schemas/Pet' description: successful operation 400: + content: {} description: Invalid ID supplied 404: + content: {} description: Pet not found security: - api_key: [] @@ -202,16 +219,13 @@ paths: operationId: updatePetWithForm parameters: - description: ID of pet that needs to be updated - explode: false in: path name: petId required: true schema: format: int64 type: integer - style: simple requestBody: - $ref: '#/components/requestBodies/inline_object' content: application/x-www-form-urlencoded: schema: @@ -222,9 +236,9 @@ paths: status: description: Updated status of the pet type: string - type: object responses: 405: + content: {} description: Invalid input security: - petstore_auth: @@ -238,16 +252,13 @@ paths: operationId: uploadFile parameters: - description: ID of pet to update - explode: false in: path name: petId required: true schema: format: int64 type: integer - style: simple requestBody: - $ref: '#/components/requestBodies/inline_object_1' content: multipart/form-data: schema: @@ -259,7 +270,6 @@ paths: description: file to upload format: binary type: string - type: object responses: 200: content: @@ -298,7 +308,7 @@ paths: operationId: placeOrder requestBody: content: - application/json: + '*/*': schema: $ref: '#/components/schemas/Order' description: order placed for purchasing the pet @@ -314,6 +324,7 @@ paths: $ref: '#/components/schemas/Order' description: successful operation 400: + content: {} description: Invalid Order summary: Place an order for a pet tags: @@ -321,31 +332,32 @@ paths: x-codegen-request-body-name: body /store/order/{orderId}: delete: - description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + description: For valid response try integer IDs with value < 1000. Anything + above 1000 or nonintegers will generate API errors operationId: deleteOrder parameters: - description: ID of the order that needs to be deleted - explode: false in: path name: orderId required: true schema: type: string - style: simple responses: 400: + content: {} description: Invalid ID supplied 404: + content: {} description: Order not found summary: Delete purchase order by ID tags: - store get: - description: For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + description: For valid response try integer IDs with value <= 5 or > 10. Other + values will generated exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched - explode: false in: path name: orderId required: true @@ -354,7 +366,6 @@ paths: maximum: 5 minimum: 1 type: integer - style: simple responses: 200: content: @@ -366,8 +377,10 @@ paths: $ref: '#/components/schemas/Order' description: successful operation 400: + content: {} description: Invalid ID supplied 404: + content: {} description: Order not found summary: Find purchase order by ID tags: @@ -378,13 +391,14 @@ paths: operationId: createUser requestBody: content: - application/json: + '*/*': schema: $ref: '#/components/schemas/User' description: Created user object required: true responses: default: + content: {} description: successful operation summary: Create user tags: @@ -394,9 +408,17 @@ paths: post: operationId: createUsersWithArrayInput requestBody: - $ref: '#/components/requestBodies/UserArray' + content: + '*/*': + schema: + items: + $ref: '#/components/schemas/User' + type: array + description: List of user object + required: true responses: default: + content: {} description: successful operation summary: Creates list of users with given input array tags: @@ -406,9 +428,17 @@ paths: post: operationId: createUsersWithListInput requestBody: - $ref: '#/components/requestBodies/UserArray' + content: + '*/*': + schema: + items: + $ref: '#/components/schemas/User' + type: array + description: List of user object + required: true responses: default: + content: {} description: successful operation summary: Creates list of users with given input array tags: @@ -419,21 +449,17 @@ paths: operationId: loginUser parameters: - description: The user name for login - explode: true in: query name: username required: true schema: type: string - style: form - description: The password for login in clear text - explode: true in: query name: password required: true schema: type: string - style: form responses: 200: content: @@ -447,19 +473,16 @@ paths: headers: X-Rate-Limit: description: calls per hour allowed by the user - explode: false schema: format: int32 type: integer - style: simple X-Expires-After: description: date in UTC when toekn expires - explode: false schema: format: date-time type: string - style: simple 400: + content: {} description: Invalid username/password supplied summary: Logs user into the system tags: @@ -469,6 +492,7 @@ paths: operationId: logoutUser responses: default: + content: {} description: successful operation summary: Logs out current logged in user session tags: @@ -479,17 +503,17 @@ paths: operationId: deleteUser parameters: - description: The name that needs to be deleted - explode: false in: path name: username required: true schema: type: string - style: simple responses: 400: + content: {} description: Invalid username supplied 404: + content: {} description: User not found summary: Delete user tags: @@ -498,13 +522,11 @@ paths: operationId: getUserByName parameters: - description: The name that needs to be fetched. Use user1 for testing. - explode: false in: path name: username required: true schema: type: string - style: simple responses: 200: content: @@ -516,8 +538,10 @@ paths: $ref: '#/components/schemas/User' description: successful operation 400: + content: {} description: Invalid username supplied 404: + content: {} description: User not found summary: Get user by user name tags: @@ -527,60 +551,30 @@ paths: operationId: updateUser parameters: - description: name that need to be deleted - explode: false in: path name: username required: true schema: type: string - style: simple requestBody: content: - application/json: + '*/*': schema: $ref: '#/components/schemas/User' description: Updated user object required: true responses: 400: + content: {} description: Invalid user supplied 404: + content: {} description: User not found summary: Updated user tags: - user x-codegen-request-body-name: body components: - requestBodies: - UserArray: - content: - application/json: - schema: - items: - $ref: '#/components/schemas/User' - type: array - description: List of user object - required: true - Pet: - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - description: Pet object that needs to be added to the store - required: true - inline_object: - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/inline_object' - inline_object_1: - content: - multipart/form-data: - schema: - $ref: '#/components/schemas/inline_object_1' schemas: Order: description: An order for a pets from the pet store @@ -753,25 +747,6 @@ components: type: string title: An uploaded response type: object - inline_object: - properties: - name: - description: Updated name of the pet - type: string - status: - description: Updated status of the pet - type: string - type: object - inline_object_1: - properties: - additionalMetadata: - description: Additional data to pass to server - type: string - file: - description: file to upload - format: binary - type: string - type: object securitySchemes: petstore_auth: flows: diff --git a/samples/server/petstore/go-api-server/go/README.md b/samples/server/petstore/go-api-server/go/README.md deleted file mode 100644 index fbcf4ae661b0..000000000000 --- a/samples/server/petstore/go-api-server/go/README.md +++ /dev/null @@ -1,35 +0,0 @@ -# Go API Server for petstoreserver - -This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - -## Overview -This server was generated by the [openapi-generator] -(https://openapi-generator.tech) project. -By using the [OpenAPI-Spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate a server stub. -- - -To see how to make this your own, look here: - -[README](https://openapi-generator.tech) - -- API version: 1.0.0 - - -### Running the server -To run the server, follow these simple steps: - -``` -go run main.go -``` - -To run the server in a docker container -``` -docker build --network=host -t petstoreserver . -``` - -Once image is built use -``` -docker run --rm -it petstoreserver -``` - - diff --git a/samples/server/petstore/go-api-server/go/model_inline_object.go b/samples/server/petstore/go-api-server/go/model_inline_object.go deleted file mode 100644 index ee13c18c29aa..000000000000 --- a/samples/server/petstore/go-api-server/go/model_inline_object.go +++ /dev/null @@ -1,19 +0,0 @@ -/* - * OpenAPI Petstore - * - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -type InlineObject struct { - - // Updated name of the pet - Name string `json:"name,omitempty"` - - // Updated status of the pet - Status string `json:"status,omitempty"` -} diff --git a/samples/server/petstore/go-api-server/go/model_inline_object_1.go b/samples/server/petstore/go-api-server/go/model_inline_object_1.go deleted file mode 100644 index a41e0bff7d95..000000000000 --- a/samples/server/petstore/go-api-server/go/model_inline_object_1.go +++ /dev/null @@ -1,23 +0,0 @@ -/* - * OpenAPI Petstore - * - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * API version: 1.0.0 - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package petstoreserver - -import ( - "os" -) - -type InlineObject1 struct { - - // Additional data to pass to server - AdditionalMetadata string `json:"additionalMetadata,omitempty"` - - // file to upload - File **os.File `json:"file,omitempty"` -} diff --git a/samples/server/petstore/go-api-server/main.go b/samples/server/petstore/go-api-server/main.go index 2e6999c2f480..0c8750779476 100644 --- a/samples/server/petstore/go-api-server/main.go +++ b/samples/server/petstore/go-api-server/main.go @@ -18,9 +18,9 @@ import ( // once you place this file into your project. // For example, // - // sw "github.com/myname/myrepo/" + // sw "github.com/myname/myrepo/go" // - sw "./" + sw "./go" ) func main() { From 4dd32174afb1b6030bde3c649f1b1577da86fef4 Mon Sep 17 00:00:00 2001 From: Mattia Bertorello Date: Fri, 13 Sep 2019 11:51:13 +0200 Subject: [PATCH 4/6] Hardcoded the object mapping directly in the abstract go class on-behalf-of: @arduino --- .../codegen/languages/AbstractGoCodegen.java | 23 +++++++------------ 1 file changed, 8 insertions(+), 15 deletions(-) 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 4bcf89728b44..9be94f052901 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 @@ -85,7 +85,7 @@ public AbstractGoCodegen() { "rune", "byte", "interface{}" - ) + ) ); instantiationTypes.clear(); @@ -109,7 +109,7 @@ public AbstractGoCodegen() { typeMapping.put("file", "*os.File"); typeMapping.put("binary", "*os.File"); typeMapping.put("ByteArray", "string"); - typeMapping.put("object", "map[string]interface{}"); + typeMapping.put("object", "interface{}"); importMapping = new HashMap(); @@ -312,19 +312,12 @@ public String getSchemaType(Schema p) { if (ref != null && !ref.isEmpty()) { type = openAPIType; - } else { - // Handle "any type" as an empty interface - if (openAPIType.equals("object") && !ModelUtils.isObjectSchema(p) && !ModelUtils.isMapSchema(p)) { - return "interface{}"; - } - - if (typeMapping.containsKey(openAPIType)) { - type = typeMapping.get(openAPIType); - if (languageSpecificPrimitives.contains(type)) - return (type); - } else - type = openAPIType; - } + } else if (typeMapping.containsKey(openAPIType)) { + type = typeMapping.get(openAPIType); + if (languageSpecificPrimitives.contains(type)) + return (type); + } else + type = openAPIType; return type; } From b78b4098997a0b55a57b3443ce73338682164875 Mon Sep 17 00:00:00 2001 From: Mattia Bertorello Date: Fri, 13 Sep 2019 14:32:01 +0200 Subject: [PATCH 5/6] Update experimental petstore sample --- .../go-petstore/api/openapi.yaml | 5 ++ .../docs/AdditionalPropertiesClass.md | 50 ++++++------- .../go-petstore/docs/TypeHolderExample.md | 26 +++++++ .../go-experimental/go-petstore/git_push.sh | 16 +++-- .../model_additional_properties_class.go | 70 +++++++++---------- .../go-petstore/model_type_holder_example.go | 41 +++++++++++ 6 files changed, 143 insertions(+), 65 deletions(-) diff --git a/samples/client/petstore/go-experimental/go-petstore/api/openapi.yaml b/samples/client/petstore/go-experimental/go-petstore/api/openapi.yaml index 0a1559e1c4b7..37a46abf4feb 100644 --- a/samples/client/petstore/go-experimental/go-petstore/api/openapi.yaml +++ b/samples/client/petstore/go-experimental/go-petstore/api/openapi.yaml @@ -1869,6 +1869,10 @@ components: number_item: example: 1.234 type: number + float_item: + example: 1.234 + format: float + type: number integer_item: example: -2 type: integer @@ -1887,6 +1891,7 @@ components: required: - array_item - bool_item + - float_item - integer_item - number_item - string_item diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesClass.md b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesClass.md index 8b22e0ef339a..448748f46de9 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/AdditionalPropertiesClass.md @@ -9,12 +9,12 @@ Name | Type | Description | Notes **MapInteger** | Pointer to **map[string]int32** | | [optional] **MapBoolean** | Pointer to **map[string]bool** | | [optional] **MapArrayInteger** | Pointer to [**map[string][]int32**](array.md) | | [optional] -**MapArrayAnytype** | Pointer to [**map[string][]map[string]interface{}**](array.md) | | [optional] +**MapArrayAnytype** | Pointer to [**map[string][]interface{}**](array.md) | | [optional] **MapMapString** | Pointer to [**map[string]map[string]string**](map.md) | | [optional] -**MapMapAnytype** | Pointer to [**map[string]map[string]map[string]interface{}**](map.md) | | [optional] -**Anytype1** | Pointer to [**map[string]interface{}**](.md) | | [optional] -**Anytype2** | Pointer to [**map[string]interface{}**](.md) | | [optional] -**Anytype3** | Pointer to [**map[string]interface{}**](.md) | | [optional] +**MapMapAnytype** | Pointer to [**map[string]map[string]interface{}**](map.md) | | [optional] +**Anytype1** | Pointer to [**interface{}**](.md) | | [optional] +**Anytype2** | Pointer to [**interface{}**](.md) | | [optional] +**Anytype3** | Pointer to [**interface{}**](.md) | | [optional] ## Methods @@ -145,13 +145,13 @@ SetMapArrayInteger gets a reference to the given map[string][]int32 and assigns ### GetMapArrayAnytype -`func (o *AdditionalPropertiesClass) GetMapArrayAnytype() map[string][]map[string]interface{}` +`func (o *AdditionalPropertiesClass) GetMapArrayAnytype() map[string][]interface{}` GetMapArrayAnytype returns the MapArrayAnytype field if non-nil, zero value otherwise. ### GetMapArrayAnytypeOk -`func (o *AdditionalPropertiesClass) GetMapArrayAnytypeOk() (map[string][]map[string]interface{}, bool)` +`func (o *AdditionalPropertiesClass) GetMapArrayAnytypeOk() (map[string][]interface{}, bool)` GetMapArrayAnytypeOk returns a tuple with the MapArrayAnytype field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. @@ -164,9 +164,9 @@ HasMapArrayAnytype returns a boolean if a field has been set. ### SetMapArrayAnytype -`func (o *AdditionalPropertiesClass) SetMapArrayAnytype(v map[string][]map[string]interface{})` +`func (o *AdditionalPropertiesClass) SetMapArrayAnytype(v map[string][]interface{})` -SetMapArrayAnytype gets a reference to the given map[string][]map[string]interface{} and assigns it to the MapArrayAnytype field. +SetMapArrayAnytype gets a reference to the given map[string][]interface{} and assigns it to the MapArrayAnytype field. ### GetMapMapString @@ -195,13 +195,13 @@ SetMapMapString gets a reference to the given map[string]map[string]string and a ### GetMapMapAnytype -`func (o *AdditionalPropertiesClass) GetMapMapAnytype() map[string]map[string]map[string]interface{}` +`func (o *AdditionalPropertiesClass) GetMapMapAnytype() map[string]map[string]interface{}` GetMapMapAnytype returns the MapMapAnytype field if non-nil, zero value otherwise. ### GetMapMapAnytypeOk -`func (o *AdditionalPropertiesClass) GetMapMapAnytypeOk() (map[string]map[string]map[string]interface{}, bool)` +`func (o *AdditionalPropertiesClass) GetMapMapAnytypeOk() (map[string]map[string]interface{}, bool)` GetMapMapAnytypeOk returns a tuple with the MapMapAnytype field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. @@ -214,19 +214,19 @@ HasMapMapAnytype returns a boolean if a field has been set. ### SetMapMapAnytype -`func (o *AdditionalPropertiesClass) SetMapMapAnytype(v map[string]map[string]map[string]interface{})` +`func (o *AdditionalPropertiesClass) SetMapMapAnytype(v map[string]map[string]interface{})` -SetMapMapAnytype gets a reference to the given map[string]map[string]map[string]interface{} and assigns it to the MapMapAnytype field. +SetMapMapAnytype gets a reference to the given map[string]map[string]interface{} and assigns it to the MapMapAnytype field. ### GetAnytype1 -`func (o *AdditionalPropertiesClass) GetAnytype1() map[string]interface{}` +`func (o *AdditionalPropertiesClass) GetAnytype1() interface{}` GetAnytype1 returns the Anytype1 field if non-nil, zero value otherwise. ### GetAnytype1Ok -`func (o *AdditionalPropertiesClass) GetAnytype1Ok() (map[string]interface{}, bool)` +`func (o *AdditionalPropertiesClass) GetAnytype1Ok() (interface{}, bool)` GetAnytype1Ok returns a tuple with the Anytype1 field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. @@ -239,19 +239,19 @@ HasAnytype1 returns a boolean if a field has been set. ### SetAnytype1 -`func (o *AdditionalPropertiesClass) SetAnytype1(v map[string]interface{})` +`func (o *AdditionalPropertiesClass) SetAnytype1(v interface{})` -SetAnytype1 gets a reference to the given map[string]interface{} and assigns it to the Anytype1 field. +SetAnytype1 gets a reference to the given interface{} and assigns it to the Anytype1 field. ### GetAnytype2 -`func (o *AdditionalPropertiesClass) GetAnytype2() map[string]interface{}` +`func (o *AdditionalPropertiesClass) GetAnytype2() interface{}` GetAnytype2 returns the Anytype2 field if non-nil, zero value otherwise. ### GetAnytype2Ok -`func (o *AdditionalPropertiesClass) GetAnytype2Ok() (map[string]interface{}, bool)` +`func (o *AdditionalPropertiesClass) GetAnytype2Ok() (interface{}, bool)` GetAnytype2Ok returns a tuple with the Anytype2 field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. @@ -264,19 +264,19 @@ HasAnytype2 returns a boolean if a field has been set. ### SetAnytype2 -`func (o *AdditionalPropertiesClass) SetAnytype2(v map[string]interface{})` +`func (o *AdditionalPropertiesClass) SetAnytype2(v interface{})` -SetAnytype2 gets a reference to the given map[string]interface{} and assigns it to the Anytype2 field. +SetAnytype2 gets a reference to the given interface{} and assigns it to the Anytype2 field. ### GetAnytype3 -`func (o *AdditionalPropertiesClass) GetAnytype3() map[string]interface{}` +`func (o *AdditionalPropertiesClass) GetAnytype3() interface{}` GetAnytype3 returns the Anytype3 field if non-nil, zero value otherwise. ### GetAnytype3Ok -`func (o *AdditionalPropertiesClass) GetAnytype3Ok() (map[string]interface{}, bool)` +`func (o *AdditionalPropertiesClass) GetAnytype3Ok() (interface{}, bool)` GetAnytype3Ok returns a tuple with the Anytype3 field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. @@ -289,9 +289,9 @@ HasAnytype3 returns a boolean if a field has been set. ### SetAnytype3 -`func (o *AdditionalPropertiesClass) SetAnytype3(v map[string]interface{})` +`func (o *AdditionalPropertiesClass) SetAnytype3(v interface{})` -SetAnytype3 gets a reference to the given map[string]interface{} and assigns it to the Anytype3 field. +SetAnytype3 gets a reference to the given interface{} and assigns it to the Anytype3 field. [[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-experimental/go-petstore/docs/TypeHolderExample.md b/samples/client/petstore/go-experimental/go-petstore/docs/TypeHolderExample.md index f9a276c529f1..3f9349a9b9a5 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/TypeHolderExample.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/TypeHolderExample.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **StringItem** | Pointer to **string** | | **NumberItem** | Pointer to **float32** | | +**FloatItem** | Pointer to **float32** | | **IntegerItem** | Pointer to **int32** | | **BoolItem** | Pointer to **bool** | | **ArrayItem** | Pointer to **[]int32** | | @@ -62,6 +63,31 @@ HasNumberItem returns a boolean if a field has been set. SetNumberItem gets a reference to the given float32 and assigns it to the NumberItem field. +### GetFloatItem + +`func (o *TypeHolderExample) GetFloatItem() float32` + +GetFloatItem returns the FloatItem field if non-nil, zero value otherwise. + +### GetFloatItemOk + +`func (o *TypeHolderExample) GetFloatItemOk() (float32, bool)` + +GetFloatItemOk returns a tuple with the FloatItem field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasFloatItem + +`func (o *TypeHolderExample) HasFloatItem() bool` + +HasFloatItem returns a boolean if a field has been set. + +### SetFloatItem + +`func (o *TypeHolderExample) SetFloatItem(v float32)` + +SetFloatItem gets a reference to the given float32 and assigns it to the FloatItem field. + ### GetIntegerItem `func (o *TypeHolderExample) GetIntegerItem() int32` diff --git a/samples/client/petstore/go-experimental/go-petstore/git_push.sh b/samples/client/petstore/go-experimental/go-petstore/git_push.sh index 8442b80bb445..ced3be2b0c7b 100644 --- a/samples/client/petstore/go-experimental/go-petstore/git_push.sh +++ b/samples/client/petstore/go-experimental/go-petstore/git_push.sh @@ -1,11 +1,17 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" @@ -28,7 +34,7 @@ git init # Adds the files in the local repository and stages them for commit. git add . -# Commits the tracked changes and prepares them to be pushed to a remote repository. +# Commits the tracked changes and prepares them to be pushed to a remote repository. git commit -m "$release_note" # Sets the new remote @@ -37,9 +43,9 @@ 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://github.com/${git_user_id}/${git_repo_id}.git + 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}@github.com/${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 @@ -47,6 +53,6 @@ fi git pull origin master # Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" git push origin master 2>&1 | grep -v 'To https' diff --git a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go index 6d9025a8965b..45ff699696cf 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_additional_properties_class.go @@ -23,17 +23,17 @@ type AdditionalPropertiesClass struct { MapArrayInteger *map[string][]int32 `json:"map_array_integer,omitempty"` - MapArrayAnytype *map[string][]map[string]interface{} `json:"map_array_anytype,omitempty"` + MapArrayAnytype *map[string][]interface{} `json:"map_array_anytype,omitempty"` MapMapString *map[string]map[string]string `json:"map_map_string,omitempty"` - MapMapAnytype *map[string]map[string]map[string]interface{} `json:"map_map_anytype,omitempty"` + MapMapAnytype *map[string]map[string]interface{} `json:"map_map_anytype,omitempty"` - Anytype1 *map[string]interface{} `json:"anytype_1,omitempty"` + Anytype1 *interface{} `json:"anytype_1,omitempty"` - Anytype2 *map[string]interface{} `json:"anytype_2,omitempty"` + Anytype2 *interface{} `json:"anytype_2,omitempty"` - Anytype3 *map[string]interface{} `json:"anytype_3,omitempty"` + Anytype3 *interface{} `json:"anytype_3,omitempty"` } @@ -203,9 +203,9 @@ func (o *AdditionalPropertiesClass) SetMapArrayInteger(v map[string][]int32) { } // GetMapArrayAnytype returns the MapArrayAnytype field if non-nil, zero value otherwise. -func (o *AdditionalPropertiesClass) GetMapArrayAnytype() map[string][]map[string]interface{} { +func (o *AdditionalPropertiesClass) GetMapArrayAnytype() map[string][]interface{} { if o == nil || o.MapArrayAnytype == nil { - var ret map[string][]map[string]interface{} + var ret map[string][]interface{} return ret } return *o.MapArrayAnytype @@ -213,9 +213,9 @@ func (o *AdditionalPropertiesClass) GetMapArrayAnytype() map[string][]map[string // GetMapArrayAnytypeOk returns a tuple with the MapArrayAnytype field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. -func (o *AdditionalPropertiesClass) GetMapArrayAnytypeOk() (map[string][]map[string]interface{}, bool) { +func (o *AdditionalPropertiesClass) GetMapArrayAnytypeOk() (map[string][]interface{}, bool) { if o == nil || o.MapArrayAnytype == nil { - var ret map[string][]map[string]interface{} + var ret map[string][]interface{} return ret, false } return *o.MapArrayAnytype, true @@ -230,8 +230,8 @@ func (o *AdditionalPropertiesClass) HasMapArrayAnytype() bool { return false } -// SetMapArrayAnytype gets a reference to the given map[string][]map[string]interface{} and assigns it to the MapArrayAnytype field. -func (o *AdditionalPropertiesClass) SetMapArrayAnytype(v map[string][]map[string]interface{}) { +// SetMapArrayAnytype gets a reference to the given map[string][]interface{} and assigns it to the MapArrayAnytype field. +func (o *AdditionalPropertiesClass) SetMapArrayAnytype(v map[string][]interface{}) { o.MapArrayAnytype = &v } @@ -269,9 +269,9 @@ func (o *AdditionalPropertiesClass) SetMapMapString(v map[string]map[string]stri } // GetMapMapAnytype returns the MapMapAnytype field if non-nil, zero value otherwise. -func (o *AdditionalPropertiesClass) GetMapMapAnytype() map[string]map[string]map[string]interface{} { +func (o *AdditionalPropertiesClass) GetMapMapAnytype() map[string]map[string]interface{} { if o == nil || o.MapMapAnytype == nil { - var ret map[string]map[string]map[string]interface{} + var ret map[string]map[string]interface{} return ret } return *o.MapMapAnytype @@ -279,9 +279,9 @@ func (o *AdditionalPropertiesClass) GetMapMapAnytype() map[string]map[string]map // GetMapMapAnytypeOk returns a tuple with the MapMapAnytype field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. -func (o *AdditionalPropertiesClass) GetMapMapAnytypeOk() (map[string]map[string]map[string]interface{}, bool) { +func (o *AdditionalPropertiesClass) GetMapMapAnytypeOk() (map[string]map[string]interface{}, bool) { if o == nil || o.MapMapAnytype == nil { - var ret map[string]map[string]map[string]interface{} + var ret map[string]map[string]interface{} return ret, false } return *o.MapMapAnytype, true @@ -296,15 +296,15 @@ func (o *AdditionalPropertiesClass) HasMapMapAnytype() bool { return false } -// SetMapMapAnytype gets a reference to the given map[string]map[string]map[string]interface{} and assigns it to the MapMapAnytype field. -func (o *AdditionalPropertiesClass) SetMapMapAnytype(v map[string]map[string]map[string]interface{}) { +// SetMapMapAnytype gets a reference to the given map[string]map[string]interface{} and assigns it to the MapMapAnytype field. +func (o *AdditionalPropertiesClass) SetMapMapAnytype(v map[string]map[string]interface{}) { o.MapMapAnytype = &v } // GetAnytype1 returns the Anytype1 field if non-nil, zero value otherwise. -func (o *AdditionalPropertiesClass) GetAnytype1() map[string]interface{} { +func (o *AdditionalPropertiesClass) GetAnytype1() interface{} { if o == nil || o.Anytype1 == nil { - var ret map[string]interface{} + var ret interface{} return ret } return *o.Anytype1 @@ -312,9 +312,9 @@ func (o *AdditionalPropertiesClass) GetAnytype1() map[string]interface{} { // GetAnytype1Ok returns a tuple with the Anytype1 field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. -func (o *AdditionalPropertiesClass) GetAnytype1Ok() (map[string]interface{}, bool) { +func (o *AdditionalPropertiesClass) GetAnytype1Ok() (interface{}, bool) { if o == nil || o.Anytype1 == nil { - var ret map[string]interface{} + var ret interface{} return ret, false } return *o.Anytype1, true @@ -329,15 +329,15 @@ func (o *AdditionalPropertiesClass) HasAnytype1() bool { return false } -// SetAnytype1 gets a reference to the given map[string]interface{} and assigns it to the Anytype1 field. -func (o *AdditionalPropertiesClass) SetAnytype1(v map[string]interface{}) { +// SetAnytype1 gets a reference to the given interface{} and assigns it to the Anytype1 field. +func (o *AdditionalPropertiesClass) SetAnytype1(v interface{}) { o.Anytype1 = &v } // GetAnytype2 returns the Anytype2 field if non-nil, zero value otherwise. -func (o *AdditionalPropertiesClass) GetAnytype2() map[string]interface{} { +func (o *AdditionalPropertiesClass) GetAnytype2() interface{} { if o == nil || o.Anytype2 == nil { - var ret map[string]interface{} + var ret interface{} return ret } return *o.Anytype2 @@ -345,9 +345,9 @@ func (o *AdditionalPropertiesClass) GetAnytype2() map[string]interface{} { // GetAnytype2Ok returns a tuple with the Anytype2 field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. -func (o *AdditionalPropertiesClass) GetAnytype2Ok() (map[string]interface{}, bool) { +func (o *AdditionalPropertiesClass) GetAnytype2Ok() (interface{}, bool) { if o == nil || o.Anytype2 == nil { - var ret map[string]interface{} + var ret interface{} return ret, false } return *o.Anytype2, true @@ -362,15 +362,15 @@ func (o *AdditionalPropertiesClass) HasAnytype2() bool { return false } -// SetAnytype2 gets a reference to the given map[string]interface{} and assigns it to the Anytype2 field. -func (o *AdditionalPropertiesClass) SetAnytype2(v map[string]interface{}) { +// SetAnytype2 gets a reference to the given interface{} and assigns it to the Anytype2 field. +func (o *AdditionalPropertiesClass) SetAnytype2(v interface{}) { o.Anytype2 = &v } // GetAnytype3 returns the Anytype3 field if non-nil, zero value otherwise. -func (o *AdditionalPropertiesClass) GetAnytype3() map[string]interface{} { +func (o *AdditionalPropertiesClass) GetAnytype3() interface{} { if o == nil || o.Anytype3 == nil { - var ret map[string]interface{} + var ret interface{} return ret } return *o.Anytype3 @@ -378,9 +378,9 @@ func (o *AdditionalPropertiesClass) GetAnytype3() map[string]interface{} { // GetAnytype3Ok returns a tuple with the Anytype3 field if it's non-nil, zero value otherwise // and a boolean to check if the value has been set. -func (o *AdditionalPropertiesClass) GetAnytype3Ok() (map[string]interface{}, bool) { +func (o *AdditionalPropertiesClass) GetAnytype3Ok() (interface{}, bool) { if o == nil || o.Anytype3 == nil { - var ret map[string]interface{} + var ret interface{} return ret, false } return *o.Anytype3, true @@ -395,8 +395,8 @@ func (o *AdditionalPropertiesClass) HasAnytype3() bool { return false } -// SetAnytype3 gets a reference to the given map[string]interface{} and assigns it to the Anytype3 field. -func (o *AdditionalPropertiesClass) SetAnytype3(v map[string]interface{}) { +// SetAnytype3 gets a reference to the given interface{} and assigns it to the Anytype3 field. +func (o *AdditionalPropertiesClass) SetAnytype3(v interface{}) { o.Anytype3 = &v } diff --git a/samples/client/petstore/go-experimental/go-petstore/model_type_holder_example.go b/samples/client/petstore/go-experimental/go-petstore/model_type_holder_example.go index 8a422eca9f96..e51025fcb74b 100644 --- a/samples/client/petstore/go-experimental/go-petstore/model_type_holder_example.go +++ b/samples/client/petstore/go-experimental/go-petstore/model_type_holder_example.go @@ -18,6 +18,8 @@ type TypeHolderExample struct { NumberItem *float32 `json:"number_item,omitempty"` + FloatItem *float32 `json:"float_item,omitempty"` + IntegerItem *int32 `json:"integer_item,omitempty"` BoolItem *bool `json:"bool_item,omitempty"` @@ -92,6 +94,39 @@ func (o *TypeHolderExample) SetNumberItem(v float32) { o.NumberItem = &v } +// GetFloatItem returns the FloatItem field if non-nil, zero value otherwise. +func (o *TypeHolderExample) GetFloatItem() float32 { + if o == nil || o.FloatItem == nil { + var ret float32 + return ret + } + return *o.FloatItem +} + +// GetFloatItemOk returns a tuple with the FloatItem field if it's non-nil, zero value otherwise +// and a boolean to check if the value has been set. +func (o *TypeHolderExample) GetFloatItemOk() (float32, bool) { + if o == nil || o.FloatItem == nil { + var ret float32 + return ret, false + } + return *o.FloatItem, true +} + +// HasFloatItem returns a boolean if a field has been set. +func (o *TypeHolderExample) HasFloatItem() bool { + if o != nil && o.FloatItem != nil { + return true + } + + return false +} + +// SetFloatItem gets a reference to the given float32 and assigns it to the FloatItem field. +func (o *TypeHolderExample) SetFloatItem(v float32) { + o.FloatItem = &v +} + // GetIntegerItem returns the IntegerItem field if non-nil, zero value otherwise. func (o *TypeHolderExample) GetIntegerItem() int32 { if o == nil || o.IntegerItem == nil { @@ -207,6 +242,12 @@ func (o TypeHolderExample) MarshalJSON() ([]byte, error) { if o.NumberItem != nil { toSerialize["number_item"] = o.NumberItem } + if o.FloatItem == nil { + return nil, errors.New("FloatItem is required and not nullable, but was not set on TypeHolderExample") + } + if o.FloatItem != nil { + toSerialize["float_item"] = o.FloatItem + } if o.IntegerItem == nil { return nil, errors.New("IntegerItem is required and not nullable, but was not set on TypeHolderExample") } From 32dada145df17cbc00955702c4af1e6aaef1b579 Mon Sep 17 00:00:00 2001 From: Mattia Bertorello Date: Fri, 13 Sep 2019 15:43:56 +0200 Subject: [PATCH 6/6] Update petstore withXml sample and petstore sample --- .../docs/AdditionalPropertiesClass.md | 10 +++++----- .../model_additional_properties_class.go | 10 +++++----- .../go/go-petstore/docs/AdditionalPropertiesClass.md | 10 +++++----- .../go-petstore/model_additional_properties_class.go | 10 +++++----- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesClass.md b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesClass.md index 877a5d45a316..bfc5529e13e2 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/AdditionalPropertiesClass.md @@ -9,12 +9,12 @@ Name | Type | Description | Notes **MapInteger** | **map[string]int32** | | [optional] **MapBoolean** | **map[string]bool** | | [optional] **MapArrayInteger** | [**map[string][]int32**](array.md) | | [optional] -**MapArrayAnytype** | [**map[string][]map[string]interface{}**](array.md) | | [optional] +**MapArrayAnytype** | [**map[string][]interface{}**](array.md) | | [optional] **MapMapString** | [**map[string]map[string]string**](map.md) | | [optional] -**MapMapAnytype** | [**map[string]map[string]map[string]interface{}**](map.md) | | [optional] -**Anytype1** | [**map[string]interface{}**](.md) | | [optional] -**Anytype2** | [**map[string]interface{}**](.md) | | [optional] -**Anytype3** | [**map[string]interface{}**](.md) | | [optional] +**MapMapAnytype** | [**map[string]map[string]interface{}**](map.md) | | [optional] +**Anytype1** | [**interface{}**](.md) | | [optional] +**Anytype2** | [**interface{}**](.md) | | [optional] +**Anytype3** | [**interface{}**](.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-withXml/model_additional_properties_class.go b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_class.go index 35aafa9f6029..4e37f4861414 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_class.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_additional_properties_class.go @@ -16,10 +16,10 @@ type AdditionalPropertiesClass struct { MapInteger map[string]int32 `json:"map_integer,omitempty" xml:"map_integer"` MapBoolean map[string]bool `json:"map_boolean,omitempty" xml:"map_boolean"` MapArrayInteger map[string][]int32 `json:"map_array_integer,omitempty" xml:"map_array_integer"` - MapArrayAnytype map[string][]map[string]interface{} `json:"map_array_anytype,omitempty" xml:"map_array_anytype"` + MapArrayAnytype map[string][]interface{} `json:"map_array_anytype,omitempty" xml:"map_array_anytype"` MapMapString map[string]map[string]string `json:"map_map_string,omitempty" xml:"map_map_string"` - MapMapAnytype map[string]map[string]map[string]interface{} `json:"map_map_anytype,omitempty" xml:"map_map_anytype"` - Anytype1 map[string]interface{} `json:"anytype_1,omitempty" xml:"anytype_1"` - Anytype2 map[string]interface{} `json:"anytype_2,omitempty" xml:"anytype_2"` - Anytype3 map[string]interface{} `json:"anytype_3,omitempty" xml:"anytype_3"` + MapMapAnytype map[string]map[string]interface{} `json:"map_map_anytype,omitempty" xml:"map_map_anytype"` + Anytype1 interface{} `json:"anytype_1,omitempty" xml:"anytype_1"` + Anytype2 interface{} `json:"anytype_2,omitempty" xml:"anytype_2"` + Anytype3 interface{} `json:"anytype_3,omitempty" xml:"anytype_3"` } diff --git a/samples/client/petstore/go/go-petstore/docs/AdditionalPropertiesClass.md b/samples/client/petstore/go/go-petstore/docs/AdditionalPropertiesClass.md index 877a5d45a316..bfc5529e13e2 100644 --- a/samples/client/petstore/go/go-petstore/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/go/go-petstore/docs/AdditionalPropertiesClass.md @@ -9,12 +9,12 @@ Name | Type | Description | Notes **MapInteger** | **map[string]int32** | | [optional] **MapBoolean** | **map[string]bool** | | [optional] **MapArrayInteger** | [**map[string][]int32**](array.md) | | [optional] -**MapArrayAnytype** | [**map[string][]map[string]interface{}**](array.md) | | [optional] +**MapArrayAnytype** | [**map[string][]interface{}**](array.md) | | [optional] **MapMapString** | [**map[string]map[string]string**](map.md) | | [optional] -**MapMapAnytype** | [**map[string]map[string]map[string]interface{}**](map.md) | | [optional] -**Anytype1** | [**map[string]interface{}**](.md) | | [optional] -**Anytype2** | [**map[string]interface{}**](.md) | | [optional] -**Anytype3** | [**map[string]interface{}**](.md) | | [optional] +**MapMapAnytype** | [**map[string]map[string]interface{}**](map.md) | | [optional] +**Anytype1** | [**interface{}**](.md) | | [optional] +**Anytype2** | [**interface{}**](.md) | | [optional] +**Anytype3** | [**interface{}**](.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/model_additional_properties_class.go b/samples/client/petstore/go/go-petstore/model_additional_properties_class.go index 00ca7fb44061..c321b29d0c22 100644 --- a/samples/client/petstore/go/go-petstore/model_additional_properties_class.go +++ b/samples/client/petstore/go/go-petstore/model_additional_properties_class.go @@ -15,10 +15,10 @@ type AdditionalPropertiesClass struct { MapInteger map[string]int32 `json:"map_integer,omitempty"` MapBoolean map[string]bool `json:"map_boolean,omitempty"` MapArrayInteger map[string][]int32 `json:"map_array_integer,omitempty"` - MapArrayAnytype map[string][]map[string]interface{} `json:"map_array_anytype,omitempty"` + MapArrayAnytype map[string][]interface{} `json:"map_array_anytype,omitempty"` MapMapString map[string]map[string]string `json:"map_map_string,omitempty"` - MapMapAnytype map[string]map[string]map[string]interface{} `json:"map_map_anytype,omitempty"` - Anytype1 map[string]interface{} `json:"anytype_1,omitempty"` - Anytype2 map[string]interface{} `json:"anytype_2,omitempty"` - Anytype3 map[string]interface{} `json:"anytype_3,omitempty"` + MapMapAnytype map[string]map[string]interface{} `json:"map_map_anytype,omitempty"` + Anytype1 interface{} `json:"anytype_1,omitempty"` + Anytype2 interface{} `json:"anytype_2,omitempty"` + Anytype3 interface{} `json:"anytype_3,omitempty"` }