Skip to content

Rest Swagger - $ref with [ and ] not parsed successfully #359

Description

@hellosnow

When ref with "#/definitions/KeyValuePair[String,String]", the [ and ] are decoded to added as key in dict, but it's get without decoding.

Expected behavior: Swagger is parsed successfully.
Actual behavior: Could not resolve reference '#/definitions/KeyValuePair[String,String]' in the document

{
  "definitions": {
    "A": {
      "type": "object",
      "properties": {
        "properties": {
          "description": "Properties",
          "type": "array",
          "items": {
            "$ref": "#/definitions/KeyValuePair[String,String]"
          }
        }
      }
    },
    "KeyValuePair[String,String]": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "readOnly": true
        },
        "value": {
          "type": "string",
          "readOnly": true
        }
      }
    }
  }
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions