Skip to content
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.

Add quoted examples tests #132

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
27 changes: 27 additions & 0 deletions tests/raml-1.0/Types/quoted-examples-values/valid.raml
Original file line number Diff line number Diff line change
@@ -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