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

Fixes #130: Add tests to cover RAML v1.0.1 patch #131

Merged
merged 24 commits into from
Apr 9, 2021
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
a49793c
Add extension/overlay path resolution examples
postatum Nov 21, 2019
1a61999
Add string pattern validation example
postatum Nov 21, 2019
c0e0c4c
Add union enum examples
postatum Nov 21, 2019
c364b60
Add union facets examples
postatum Nov 21, 2019
ac576f3
Add determining default types examples
postatum Nov 21, 2019
b400eeb
Add nilable types examples
postatum Nov 21, 2019
00d9cd7
Add examples of fragments using library
postatum Nov 22, 2019
495fa1f
Add json schema pointer example.
postatum Nov 22, 2019
28c864f
Add tests for raml/json/xml examples
postatum Nov 22, 2019
f8d7896
Regenerate manifest file
postatum Nov 22, 2019
0dee475
Add YAML-1.2 compliancy example
postatum Nov 26, 2019
bfebcb4
Add invalid yaml1.2 example
postatum Dec 4, 2019
6366718
Rename yaml test file
postatum Dec 5, 2019
c928a91
Add tests to clarify traits application
postatum Dec 27, 2019
07cd015
Merge branch 'develop' into i130_add_raml101_tests
postatum Jan 27, 2020
94abfb2
Add tests to address https://github.com/raml-org/raml-spec/issues/708…
postatum Jan 27, 2020
665053a
Add examples of params used in modules paths
postatum Mar 11, 2020
7083251
Merge branch 'master' into i130_add_raml101_tests
postatum May 4, 2020
f85641b
Merge fresh master
postatum Jun 10, 2020
ee6f568
Add example to address raml-org/raml-spec#707"
postatum Jun 10, 2020
16bf431
Fix Yaml compliancy test
postatum Aug 11, 2020
7f4bcc1
Delete number/integer determ tests
postatum Aug 19, 2020
6517b7b
Add another example to address raml-org/raml-spec#707
postatum Sep 1, 2020
45f1fb3
Add tests to address raml-org/raml-spec#748
postatum Sep 1, 2020
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
102 changes: 90 additions & 12 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"description": "RAML files listed in order corresponding RAML feature appears in RAML 1.0 spec",
"filePaths": [
"tests/raml-1.0/Root/yaml-12-compliancy/valid.raml",
jstoiko marked this conversation as resolved.
Show resolved Hide resolved
"tests/raml-1.0/Root/version/invalid-version-structure.raml",
"tests/raml-1.0/Root/version/valid.raml",
"tests/raml-1.0/Root/title-04/invalid-included.raml",
Expand Down Expand Up @@ -86,6 +87,8 @@
"tests/raml-1.0/Types/types-constraits-conflict/valid.raml",
"tests/raml-1.0/Types/types-and-schemas/invalid-exclusive.raml",
"tests/raml-1.0/Types/types-and-schemas/valid.raml",
"tests/raml-1.0/Types/string-pattern-validation/invalid-does-not-match-pattern.raml",
"tests/raml-1.0/Types/string-pattern-validation/valid-example-matches-pattern.raml",
"tests/raml-1.0/Types/single-type-with-example-07/invalid-example-type.raml",
"tests/raml-1.0/Types/single-type-with-example-07/valid.raml",
"tests/raml-1.0/Types/single-type-with-example-06/invalid-failed-array-minitems.raml",
Expand Down Expand Up @@ -126,6 +129,11 @@
"tests/raml-1.0/Types/pattern-string-array-property/valid.raml",
"tests/raml-1.0/Types/optional-property/invalid-missing-required.raml",
"tests/raml-1.0/Types/optional-property/valid.raml",
"tests/raml-1.0/Types/nilable-type/invalid-prefixed-used-in-array.raml",
"tests/raml-1.0/Types/nilable-type/invalid-prefixed-used-in-union-array.raml",
"tests/raml-1.0/Types/nilable-type/invalid-prefixed-used-in-union.raml",
"tests/raml-1.0/Types/nilable-type/valid-nil-union.raml",
"tests/raml-1.0/Types/nilable-type/valid-question-mark-suffix.raml",
"tests/raml-1.0/Types/nested-self-reference/invalid-property-name.raml",
"tests/raml-1.0/Types/nested-self-reference/valid.raml",
"tests/raml-1.0/Types/multiple-recurrent-definitions-02/invalid.raml",
Expand Down Expand Up @@ -199,10 +207,21 @@
"tests/raml-1.0/Types/inherit-and-extend-constraints-02/valid-make-narrower.raml",
"tests/raml-1.0/Types/inherit-and-extend-constraints-01/invalid-minmaxlength-violated.raml",
"tests/raml-1.0/Types/inherit-and-extend-constraints-01/valid.raml",
"tests/raml-1.0/Types/include-json-schema-element/invalid-pointer-nowhere.raml",
"tests/raml-1.0/Types/include-json-schema-element/valid.raml",
"tests/raml-1.0/Types/implicitly-defined-type/invalid-inexisting-base-type.raml",
"tests/raml-1.0/Types/implicitly-defined-type/valid.raml",
"tests/raml-1.0/Types/determine-default-types/invalid-unknown-property.raml",
"tests/raml-1.0/Types/determine-default-types/valid.raml",
"tests/raml-1.0/Types/determine-default-types/valid-array.raml",
"tests/raml-1.0/Types/determine-default-types/valid-file.raml",
"tests/raml-1.0/Types/determine-default-types/valid-integer.raml",
"tests/raml-1.0/Types/determine-default-types/valid-number.raml",
"tests/raml-1.0/Types/determine-default-types/valid-object.raml",
"tests/raml-1.0/Types/determine-default-types/valid-request-body-media-type.raml",
"tests/raml-1.0/Types/determine-default-types/valid-request-body.raml",
"tests/raml-1.0/Types/determine-default-types/valid-response-body-media-type.raml",
"tests/raml-1.0/Types/determine-default-types/valid-response-body.raml",
"tests/raml-1.0/Types/determine-default-types/valid-string-type-not-specified.raml",
"tests/raml-1.0/Types/determine-default-types/valid-string-with-pattern.raml",
"tests/raml-1.0/Types/defined-with-jsonschema/invalid-json-schema.raml",
"tests/raml-1.0/Types/defined-with-jsonschema/valid-explicit.raml",
"tests/raml-1.0/Types/defined-with-jsonschema/valid.raml",
Expand Down Expand Up @@ -235,6 +254,13 @@
"tests/raml-1.0/Types/annotation-inherits-pattern-prop-01/valid.raml",
"tests/raml-1.0/Types/additional-properties/invalid-property-value.raml",
"tests/raml-1.0/Types/additional-properties/valid.raml",
"tests/raml-1.0/Types/Type Expressions/union-with-facets/invalid-not-supported-facet.raml",
"tests/raml-1.0/Types/Type Expressions/union-with-facets/valid-custom-facet.raml",
"tests/raml-1.0/Types/Type Expressions/union-with-facets/valid-supported-facet.raml",
"tests/raml-1.0/Types/Type Expressions/scalar-union-with-enum/invalid-incorrect-enum-types.raml",
"tests/raml-1.0/Types/Type Expressions/scalar-union-with-enum/valid-correct-enum-types.raml",
"tests/raml-1.0/Types/Type Expressions/object-union-with-enum/invalid-incorrect-enum-types.raml",
"tests/raml-1.0/Types/Type Expressions/object-union-with-enum/valid-correct-enum-types.raml",
"tests/raml-1.0/Types/Type Expressions/inherit-scalar-nested-array/invalid-nesting-syntax.raml",
"tests/raml-1.0/Types/Type Expressions/inherit-scalar-nested-array/valid.raml",
"tests/raml-1.0/Types/Type Expressions/inherit-datatype-union-array-02/invalid-inherit-inexisting-type.raml",
Expand Down Expand Up @@ -668,6 +694,10 @@
"tests/raml-1.0/Fragments/namedexample-01/valid.raml",
"tests/raml-1.0/Fragments/namedexample-01/examples/invalid-one-example.raml",
"tests/raml-1.0/Fragments/namedexample-01/examples/valid-multiple-examples.raml",
"tests/raml-1.0/Fragments/extension-relative-include/base.raml",
"tests/raml-1.0/Fragments/extension-relative-include/lib/user.raml",
"tests/raml-1.0/Fragments/extension-relative-include/extensions/invalid-paths-relative-to-base.raml",
"tests/raml-1.0/Fragments/extension-relative-include/extensions/valid-paths-relative-to-extension.raml",
"tests/raml-1.0/Fragments/extension/invalid-nodes.raml",
"tests/raml-1.0/Fragments/extension/master.raml",
"tests/raml-1.0/Fragments/extension/valid.raml",
Expand All @@ -687,12 +717,42 @@
"tests/raml-1.0/Fragments/annotation/valid.raml",
"tests/raml-1.0/Fragments/annotation/includes/invalid-wrong-structure.raml",
"tests/raml-1.0/Fragments/annotation/includes/valid-annotation.raml",
"tests/raml-1.0/Libraries/uses-02/invalid-uses-non-lib.raml",
"tests/raml-1.0/Libraries/uses-02/lib.raml",
"tests/raml-1.0/Libraries/uses-02/valid-indirect-use.raml",
"tests/raml-1.0/Libraries/uses-01/invalid-uses-inexisting-lib.raml",
"tests/raml-1.0/Libraries/uses-01/lib.raml",
"tests/raml-1.0/Libraries/uses-01/valid.raml",
"tests/raml-1.0/Libraries/used-by-trait/lib.raml",
"tests/raml-1.0/Libraries/used-by-trait/valid-fragment.raml",
"tests/raml-1.0/Libraries/used-by-trait/valid-spec.raml",
"tests/raml-1.0/Libraries/used-by-securityscheme/lib.raml",
"tests/raml-1.0/Libraries/used-by-securityscheme/valid-fragment.raml",
"tests/raml-1.0/Libraries/used-by-securityscheme/valid-spec.raml",
"tests/raml-1.0/Libraries/used-by-resourcetype/lib.raml",
"tests/raml-1.0/Libraries/used-by-resourcetype/valid-fragment.raml",
"tests/raml-1.0/Libraries/used-by-resourcetype/valid-spec.raml",
"tests/raml-1.0/Libraries/used-by-overlay/lib.raml",
"tests/raml-1.0/Libraries/used-by-overlay/valid-fragment.raml",
"tests/raml-1.0/Libraries/used-by-overlay/valid-spec.raml",
"tests/raml-1.0/Libraries/used-by-namedexample/lib.raml",
"tests/raml-1.0/Libraries/used-by-namedexample/valid-fragment.raml",
"tests/raml-1.0/Libraries/used-by-namedexample/valid-spec.raml",
"tests/raml-1.0/Libraries/used-by-library/lib.raml",
"tests/raml-1.0/Libraries/used-by-library/valid-fragment.raml",
"tests/raml-1.0/Libraries/used-by-library/valid-spec.raml",
"tests/raml-1.0/Libraries/used-by-extension/lib.raml",
"tests/raml-1.0/Libraries/used-by-extension/valid-fragment.raml",
"tests/raml-1.0/Libraries/used-by-extension/valid-spec.raml",
"tests/raml-1.0/Libraries/used-by-documentationitem/lib.raml",
"tests/raml-1.0/Libraries/used-by-documentationitem/valid-fragment.raml",
"tests/raml-1.0/Libraries/used-by-documentationitem/valid-spec.raml",
"tests/raml-1.0/Libraries/used-by-datatype/lib.raml",
"tests/raml-1.0/Libraries/used-by-datatype/valid-fragment.raml",
"tests/raml-1.0/Libraries/used-by-datatype/valid-spec.raml",
"tests/raml-1.0/Libraries/used-by-api-2/invalid-uses-non-lib.raml",
"tests/raml-1.0/Libraries/used-by-api-2/lib.raml",
"tests/raml-1.0/Libraries/used-by-api-2/valid-indirect-use.raml",
"tests/raml-1.0/Libraries/used-by-api-1/invalid-uses-inexisting-lib.raml",
"tests/raml-1.0/Libraries/used-by-api-1/lib.raml",
"tests/raml-1.0/Libraries/used-by-api-1/valid.raml",
"tests/raml-1.0/Libraries/used-by-annotationtypedeclaration/lib.raml",
"tests/raml-1.0/Libraries/used-by-annotationtypedeclaration/valid-fragment.raml",
"tests/raml-1.0/Libraries/used-by-annotationtypedeclaration/valid-spec.raml",
"tests/raml-1.0/Libraries/standalone/invalid-resource-defined.raml",
"tests/raml-1.0/Libraries/standalone/valid.raml",
"tests/raml-1.0/Libraries/include-02/files-resource.raml",
Expand All @@ -708,14 +768,14 @@
"tests/raml-1.0/Libraries/chain-uses/object-C.raml",
"tests/raml-1.0/Libraries/chain-uses/object-D.raml",
"tests/raml-1.0/Libraries/chain-uses/valid.raml",
"tests/raml-1.0/Overlays/with-lib/aws-lib.raml",
"tests/raml-1.0/Overlays/with-lib/base.raml",
"tests/raml-1.0/Overlays/with-lib/invalid-inexisting-lib.raml",
"tests/raml-1.0/Overlays/with-lib/valid.raml",
"tests/raml-1.0/Overlays/triple-overlay-extension/base1.raml",
"tests/raml-1.0/Overlays/triple-overlay-extension/base2.raml",
"tests/raml-1.0/Overlays/triple-overlay-extension/base3.raml",
"tests/raml-1.0/Overlays/triple-overlay-extension/valid.raml",
"tests/raml-1.0/Overlays/relative-include-lib/base.raml",
"tests/raml-1.0/Overlays/relative-include-lib/overlays/invalid-paths-relative-to-base.raml",
"tests/raml-1.0/Overlays/relative-include-lib/overlays/valid-paths-relative-to-overlay.raml",
"tests/raml-1.0/Overlays/relative-include-lib/lib/decls.raml",
"tests/raml-1.0/Overlays/override-version/base.raml",
"tests/raml-1.0/Overlays/override-version/invalid.raml",
"tests/raml-1.0/Overlays/override-not-existing-nested-resource/base.raml",
Expand Down Expand Up @@ -904,6 +964,24 @@
"tests/raml-1.0/spec-examples/APIs/patterns/traits.raml",
"tests/raml-1.0/spec-examples/APIs/libraries/file-type.raml",
"tests/raml-1.0/spec-examples/APIs/libraries/files.raml",
"tests/raml-1.0/Examples/single-xml-example/invalid-wrong-example-value.raml",
"tests/raml-1.0/Examples/single-xml-example/valid.raml",
"tests/raml-1.0/Examples/single-with-strict-parameter/invalid-strict-true.raml",
"tests/raml-1.0/Examples/single-with-strict-parameter/valid-strict-false.raml",
"tests/raml-1.0/Examples/single-json-example/invalid-example-structure.raml",
"tests/raml-1.0/Examples/single-json-example/valid.raml",
"tests/raml-1.0/Examples/multiple-xml-examples/invalid-wrong-example-value.raml",
"tests/raml-1.0/Examples/multiple-xml-examples/valid.raml",
"tests/raml-1.0/Examples/multiple-with-strict-parameter/invalid-strict-true.raml",
"tests/raml-1.0/Examples/multiple-with-strict-parameter/valid-strict-false.raml",
"tests/raml-1.0/Examples/multiple-json-examples/invalid-example-structure.raml",
"tests/raml-1.0/Examples/multiple-json-examples/valid.raml",
"tests/raml-1.0/Examples/mix-raml-xml/invalid-incorrect-examples.raml",
"tests/raml-1.0/Examples/mix-raml-xml/valid.raml",
"tests/raml-1.0/Examples/mix-raml-json/invalid-incorrect-examples.raml",
"tests/raml-1.0/Examples/mix-raml-json/valid.raml",
"tests/raml-1.0/Examples/mix-json-xml/invalid-incorrect-examples.raml",
"tests/raml-1.0/Examples/mix-json-xml/valid.raml",
"tests/raml-1.0/EdgeCases/uriparam-examples-slash/invalid-uriparam-examples-slash.raml",
"tests/raml-1.0/EdgeCases/uriparam-examples-slash/valid.raml",
"tests/raml-1.0/EdgeCases/uriparam-example-slash/invalid-uriparam-example-slash.raml",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#%RAML 1.0
title: test

types:
XmlJson:
type: |
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="country">
<xs:complexType>
<xs:sequence>
<xs:element name="country_name" type="xs:string"/>
<xs:element name="population" type="xs:decimal"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
example: |
{
"country_name": 11.2,
"population": "Somewhere"
}
JsonXml:
type: |
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"required": ["country_name", "population"],
"properties": {
"country_name": { "type": "string" },
"population": { "type": "number" }
}
}
example: |
<country>
<country_name>59.7</country_name>
<population>France</population>
</country>
38 changes: 38 additions & 0 deletions tests/raml-1.0/Examples/mix-json-xml/valid.raml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#%RAML 1.0
title: test

types:
XmlJson:
type: |
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="country">
<xs:complexType>
<xs:sequence>
<xs:element name="country_name" type="xs:string"/>
<xs:element name="population" type="xs:decimal"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
example: |
{
"country_name": "Somewhere",
"population": 11.2
}
JsonXml:
type: |
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"required": ["country_name", "population"],
"properties": {
"country_name": { "type": "string" },
"population": { "type": "number" }
}
}
example: |
<country>
<country_name>France</country_name>
<population>59.7</population>
</country>
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#%RAML 1.0
title: test

types:
JsonRaml:
type: |
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"required": ["country_name", "population"],
"properties": {
"country_name": { "type": "string" },
"population": { "type": "number" }
}
}
example:
country_name: 11.1
population: Somewhere
RamlJson:
type: object
properties:
country_name: string
population: number
example: |
{
"country_name": 11.2,
"population": "Somewhere"
}

29 changes: 29 additions & 0 deletions tests/raml-1.0/Examples/mix-raml-json/valid.raml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#%RAML 1.0
title: test

types:
JsonRaml:
type: |
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"required": ["country_name", "population"],
"properties": {
"country_name": { "type": "string" },
"population": { "type": "number" }
}
}
example:
country_name: Somewhere
population: 11.1
RamlJson:
type: object
properties:
country_name: string
population: number
example: |
{
"country_name": "Somewhere",
"population": 11.2
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#%RAML 1.0
title: test

types:
XmlRaml:
type: |
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="country">
<xs:complexType>
<xs:sequence>
<xs:element name="country_name" type="xs:string"/>
<xs:element name="population" type="xs:decimal"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
example:
country_name: 11.1
population: Somewhere
RamlXml:
type: object
properties:
country_name: string
population: number
example: |
<country>
<country_name>59.7</country_name>
<population>France</population>
</country>
30 changes: 30 additions & 0 deletions tests/raml-1.0/Examples/mix-raml-xml/valid.raml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#%RAML 1.0
title: test

types:
XmlRaml:
type: |
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="country">
<xs:complexType>
<xs:sequence>
<xs:element name="country_name" type="xs:string"/>
<xs:element name="population" type="xs:decimal"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
example:
country_name: Somewhere
population: 11.1
RamlXml:
type: object
properties:
country_name: string
population: number
example: |
<country>
<country_name>France</country_name>
<population>59.7</population>
</country>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#%RAML 1.0
title: test

types:
TestType:
type: |
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"required": ["country_name", "population"],
"properties": {
"country_name": { "type": "string" },
"population": { "type": "number" }
}
}
examples:
first:
value: |
{
"country_name" : 123,
"population": "hi"
}
Loading