forked from raml-org/raml-java-parser
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for raml-org#668 and raml-org#669. These add defaults for Files a…
…nd Arrays. (raml-org#670)
- Loading branch information
Showing
3 changed files
with
261 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
raml-parser-2/src/test/resources/org/raml/v2/parser/spec-examples/default-types/input.raml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#%RAML 1.0 | ||
# Adding more tests for defaults based on facets (Arrays and Files...add more as required) | ||
title: My API | ||
mediaType: application/json | ||
|
||
types: | ||
someArray: | ||
items: | ||
properties: | ||
Foo: integer | ||
Bar: string | ||
fireworks: | ||
description: This is a new DataType | ||
fileTypes: | ||
- image/gif | ||
|
||
/resource: | ||
post: | ||
body: | ||
application/json: | ||
type: array | ||
items: integer | ||
example: [1, 2] | ||
|
||
/other_resource: | ||
post: | ||
body: | ||
application/json: | ||
items: | ||
properties: | ||
Foo: integer | ||
Bar: string | ||
example: | ||
[{"Foo": 1, "Bar": "Qux"}] |
Oops, something went wrong.