New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
hellosnow opened this Issue Jun 6, 2016 · 0 comments

Comments

Projects
None yet
2 participants
@hellosnow
Collaborator

hellosnow commented Jun 6, 2016

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
        }
      }
    }
  }
}

@hellosnow hellosnow self-assigned this Jun 6, 2016

@chenkennt chenkennt added this to the v2.1 milestone Jun 7, 2016

@hellosnow hellosnow closed this in #422 Jun 24, 2016

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