Skip to content
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 · Fixed by #422
Closed

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

hellosnow opened this issue Jun 6, 2016 · 0 comments · Fixed by #422
Assignees
Milestone

Comments

@hellosnow
Copy link
Contributor

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
        }
      }
    }
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants