diff --git a/manifest.json b/manifest.json index 3ab8d424..ecb73df1 100644 --- a/manifest.json +++ b/manifest.json @@ -114,6 +114,12 @@ "tests/raml-1.0/Types/recurrent-definition/valid.raml", "tests/raml-1.0/Types/recurrent-array-definition/invalid.raml", "tests/raml-1.0/Types/recurrent-array-definition/valid.raml", + "tests/raml-1.0/Types/quoted-examples-values/invalid-quoted-array.raml", + "tests/raml-1.0/Types/quoted-examples-values/invalid-quoted-boolean.raml", + "tests/raml-1.0/Types/quoted-examples-values/invalid-quoted-integer.raml", + "tests/raml-1.0/Types/quoted-examples-values/invalid-quoted-nil.raml", + "tests/raml-1.0/Types/quoted-examples-values/invalid-quoted-number.raml", + "tests/raml-1.0/Types/quoted-examples-values/valid.raml", "tests/raml-1.0/Types/property-array-of-scalars/invalid-array-item-type.raml", "tests/raml-1.0/Types/property-array-of-scalars/valid.raml", "tests/raml-1.0/Types/property-array-of-datatypes/invalid-array-item-type.raml", diff --git a/tests/raml-1.0/Types/quoted-examples-values/invalid-quoted-array.raml b/tests/raml-1.0/Types/quoted-examples-values/invalid-quoted-array.raml new file mode 100644 index 00000000..eaf1f820 --- /dev/null +++ b/tests/raml-1.0/Types/quoted-examples-values/invalid-quoted-array.raml @@ -0,0 +1,17 @@ +#%RAML 1.0 +title: API with Types +types: + Thing: + type: object + properties: + test: array + example: + test: "[1, 2, 3]" + +/things/{id}: + get: + responses: + 200: + body: + application/json: + type: Thing diff --git a/tests/raml-1.0/Types/quoted-examples-values/invalid-quoted-boolean.raml b/tests/raml-1.0/Types/quoted-examples-values/invalid-quoted-boolean.raml new file mode 100644 index 00000000..d81b90c1 --- /dev/null +++ b/tests/raml-1.0/Types/quoted-examples-values/invalid-quoted-boolean.raml @@ -0,0 +1,17 @@ +#%RAML 1.0 +title: API with Types +types: + Thing: + type: object + properties: + test: boolean + example: + test: "true" + +/things/{id}: + get: + responses: + 200: + body: + application/json: + type: Thing diff --git a/tests/raml-1.0/Types/quoted-examples-values/invalid-quoted-integer.raml b/tests/raml-1.0/Types/quoted-examples-values/invalid-quoted-integer.raml new file mode 100644 index 00000000..2c9603ab --- /dev/null +++ b/tests/raml-1.0/Types/quoted-examples-values/invalid-quoted-integer.raml @@ -0,0 +1,17 @@ +#%RAML 1.0 +title: API with Types +types: + Thing: + type: object + properties: + test: integer + example: + test: "19" + +/things/{id}: + get: + responses: + 200: + body: + application/json: + type: Thing diff --git a/tests/raml-1.0/Types/quoted-examples-values/invalid-quoted-nil.raml b/tests/raml-1.0/Types/quoted-examples-values/invalid-quoted-nil.raml new file mode 100644 index 00000000..d6d79f73 --- /dev/null +++ b/tests/raml-1.0/Types/quoted-examples-values/invalid-quoted-nil.raml @@ -0,0 +1,17 @@ +#%RAML 1.0 +title: API with Types +types: + Thing: + type: object + properties: + test: nil + example: + test: "null" + +/things/{id}: + get: + responses: + 200: + body: + application/json: + type: Thing diff --git a/tests/raml-1.0/Types/quoted-examples-values/invalid-quoted-number.raml b/tests/raml-1.0/Types/quoted-examples-values/invalid-quoted-number.raml new file mode 100644 index 00000000..7ae3f1a7 --- /dev/null +++ b/tests/raml-1.0/Types/quoted-examples-values/invalid-quoted-number.raml @@ -0,0 +1,17 @@ +#%RAML 1.0 +title: API with Types +types: + Thing: + type: object + properties: + test: number + example: + test: "18.2" + +/things/{id}: + get: + responses: + 200: + body: + application/json: + type: Thing diff --git a/tests/raml-1.0/Types/quoted-examples-values/valid.raml b/tests/raml-1.0/Types/quoted-examples-values/valid.raml new file mode 100644 index 00000000..4f0ccb5e --- /dev/null +++ b/tests/raml-1.0/Types/quoted-examples-values/valid.raml @@ -0,0 +1,27 @@ +#%RAML 1.0 +title: API with Types +types: + Thing: + type: object + properties: + one: any + two: array + three: number + four: integer + five: boolean + six: nil + example: + one: "hi" + two: [1, 2, 3] + three: 18.2 + four: 19 + five: true + six: null + +/things/{id}: + get: + responses: + 200: + body: + application/json: + type: Thing