raml-org / raml-tck

Test Compatibility Kit for RAML 1.0
http://raml-org.github.io/raml-tck/
8 stars 10 forks source link

Changing Examples/test045 #90

Closed LorenaSoledad closed 8 years ago

ddenisenko commented 8 years ago

Okay, but please change JSON for the following one:

{
  "ramlVersion": "RAML10",
  "type": "Api",
  "specification": {
    "types": [
      {
        "dept_code": {
          "name": "dept_code",
          "displayName": "dept_code",
          "type": [
            "string"
          ],
          "required": true,
          "pattern": "^\\d+\\-\\w+$",
          "__METADATA__": {
            "primitiveValuesMeta": {
              "displayName": {
                "calculated": true
              },
              "type": {
                "insertedAsDefault": true
              },
              "required": {
                "insertedAsDefault": true
              }
            }
          }
        }
      }
    ],
    "traits": [
      {
        "chargeable": {
          "headers": {
            "X-Dept": {
              "name": "X-Dept",
              "displayName": "X-Dept",
              "type": [
                "dept_code[]"
              ],
              "examples": [
                {
                  "value": "[\n  \"230-OCTO\",\n  \"InvalidHere\"\n]",
                  "strict": true,
                  "name": "one_dept",
                  "structuredValue": [
                    "230-OCTO",
                    "InvalidHere"
                  ]
                }
              ],
              "required": true,
              "__METADATA__": {
                "primitiveValuesMeta": {
                  "displayName": {
                    "calculated": true
                  },
                  "required": {
                    "insertedAsDefault": true
                  }
                }
              }
            }
          },
          "name": "chargeable"
        }
      }
    ],
    "title": "Test named parameters",
    "resources": [
      {
        "methods": [
          {
            "headers": {
              "X-Dept": {
                "name": "X-Dept",
                "displayName": "X-Dept",
                "type": [
                  "dept_code[]"
                ],
                "examples": [
                  {
                    "value": "[\n  \"230-OCTO\",\n  \"InvalidHere\"\n]",
                    "strict": true,
                    "name": "one_dept",
                    "structuredValue": [
                      "230-OCTO",
                      "InvalidHere"
                    ]
                  }
                ],
                "required": true,
                "__METADATA__": {
                  "primitiveValuesMeta": {
                    "displayName": {
                      "calculated": true
                    },
                    "required": {
                      "insertedAsDefault": true
                    }
                  }
                }
              }
            },
            "is": [
              "chargeable"
            ],
            "method": "get"
          }
        ],
        "relativeUri": "/resource",
        "displayName": "/resource",
        "__METADATA__": {
          "primitiveValuesMeta": {
            "displayName": {
              "calculated": true
            }
          }
        },
        "relativeUriPathSegments": [
          "resource"
        ]
      }
    ]
  },
  "errors": [
    {
      "code": 11,
      "message": "string should match to ^\\d+\\-\\w+$",
      "path": "api.raml",
      "line": 14,
      "column": 14,
      "position": 235,
      "range": [
        {
          "line": 14,
          "column": 14,
          "position": 235
        },
        {
          "line": 14,
          "column": 25,
          "position": 246
        }
      ]
    },
    {
      "code": 11,
      "message": "string should match to ^\\d+\\-\\w+$",
      "path": "api.raml",
      "line": 17,
      "column": 2,
      "position": 261,
      "range": [
        {
          "line": 17,
          "column": 2,
          "position": 261
        },
        {
          "line": 17,
          "column": 5,
          "position": 264
        }
      ]
    }
  ]
}