stephaneey / azure-apim-extension

Full Azure API Management suite and more VSTS extension
MIT License
66 stars 48 forks source link

Error when "non-standard" characters are in swagger file. #60

Closed bklekot closed 4 years ago

bklekot commented 5 years ago

I'm experiencing many issues with swagger when non-standard characters are used:

@{code=ValidationError; target=representation; message=Parsing error(s): The key 'KeyValuePair[String,String]' in 'schemas' of components MUST match the regular expression '^[a-zA-Z0-9.-]+$'. [#/components] The key 'PagedData[ProcessInstanceData]' in 'schemas' of components MUST match the regular expression '^[a-zA-Z0-9.-]+$'. [#/components]}

Part of swagger that caused issue:

    "PagedData[ProcessInstanceData]": {
        "type": "object",
        "properties": {
            "data": {
                "type": "array",
                "items": {
                    "$ref": "#/definitions/ProcessInstanceData"
                }
            },
            "nextPageToken": {
                "type": "string"
            }
        }
    },

and

    "KeyValuePair[String,String]": {
        "type": "object",
        "properties": {
            "key": {
                "type": "string",
                "readOnly": true
            },
            "value": {
                "type": "string",
                "readOnly": true
            }
        }
    },