Skip to content
This repository was archived by the owner on Feb 6, 2023. It is now read-only.
This repository was archived by the owner on Feb 6, 2023. It is now read-only.

additionalProperties wrong map type #30

Description

@auzhva

Hi,

In Swagger model I have following construct:

someAttributes:
        type: object
        description: someAttributes
        additionalProperties:
          type: string

Then I'm trying to build this model with gnostic-go-generator it produces below model

{
      "name": "someAttributes",
      "fields": [
        {
          "name": "additional_properties",
          "type": "map[string]string",
          "kind": 1,
          "native_type": "Map[String]String",
          "field_name": "AdditionalProperties",
          "parameter_name": "additional_properties"
        }
      ],
      "type_name": "SomeAttributes"
    },

Type Map[String]String is invalid in Go, so it results in broken types.go file

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions