-
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.
Merge pull request #1869 from aml-org/W-14105863/override-union-ranges
W-14105863: when overriding properties if the ranges are both uniones…
- Loading branch information
Showing
6 changed files
with
71 additions
and
111 deletions.
There are no files selected for viewing
65 changes: 27 additions & 38 deletions
65
amf-cli/shared/src/test/resources/org/raml/parser/types/inheritance/override/output.txt
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 |
---|---|---|
@@ -1,38 +1,27 @@ | ||
ModelId: file://amf-cli/shared/src/test/resources/org/raml/parser/types/inheritance/override/input.raml | ||
Profile: RAML 1.0 | ||
Conforms: false | ||
Number of results: 4 | ||
|
||
Level: Violation | ||
|
||
- Constraint: http://a.ml/vocabularies/amf/resolution#invalid-type-inheritance | ||
Message: Resolution error: Invalid scalar inheritance base type http://a.ml/vocabularies/shapes#number < http://www.w3.org/2001/XMLSchema#string | ||
Severity: Violation | ||
Target: file://amf-cli/shared/src/test/resources/org/raml/parser/types/inheritance/override/input.raml#/declares/shape/NumberOrString/property/property/name/union/name/0 | ||
Property: http://a.ml/vocabularies/shapes#inherits | ||
Range: [(30,14)-(30,20)] | ||
Location: file://amf-cli/shared/src/test/resources/org/raml/parser/types/inheritance/override/input.raml | ||
|
||
- Constraint: http://a.ml/vocabularies/amf/resolution#invalid-type-inheritance | ||
Message: Resolution error: Invalid scalar inheritance base type http://a.ml/vocabularies/shapes#number < http://www.w3.org/2001/XMLSchema#boolean | ||
Severity: Violation | ||
Target: file://amf-cli/shared/src/test/resources/org/raml/parser/types/inheritance/override/input.raml#/declares/shape/NumberOrString/property/property/name/union/name/2 | ||
Property: http://a.ml/vocabularies/shapes#inherits | ||
Range: [(30,14)-(30,20)] | ||
Location: file://amf-cli/shared/src/test/resources/org/raml/parser/types/inheritance/override/input.raml | ||
|
||
- Constraint: http://a.ml/vocabularies/amf/resolution#invalid-type-inheritance | ||
Message: Resolution error: Invalid scalar inheritance base type http://www.w3.org/2001/XMLSchema#string < http://a.ml/vocabularies/shapes#number | ||
Severity: Violation | ||
Target: file://amf-cli/shared/src/test/resources/org/raml/parser/types/inheritance/override/input.raml#/declares/shape/NumberOrString/property/property/name/union/name/4 | ||
Property: http://a.ml/vocabularies/shapes#inherits | ||
Range: [(30,21)-(30,27)] | ||
Location: file://amf-cli/shared/src/test/resources/org/raml/parser/types/inheritance/override/input.raml | ||
|
||
- Constraint: http://a.ml/vocabularies/amf/resolution#invalid-type-inheritance | ||
Message: Resolution error: Invalid scalar inheritance base type http://www.w3.org/2001/XMLSchema#string < http://www.w3.org/2001/XMLSchema#boolean | ||
Severity: Violation | ||
Target: file://amf-cli/shared/src/test/resources/org/raml/parser/types/inheritance/override/input.raml#/declares/shape/NumberOrString/property/property/name/union/name/5 | ||
Property: http://a.ml/vocabularies/shapes#inherits | ||
Range: [(30,21)-(30,27)] | ||
Location: file://amf-cli/shared/src/test/resources/org/raml/parser/types/inheritance/override/input.raml | ||
#%RAML 1.0 | ||
title: valid property type inheritance | ||
types: | ||
Anything: | ||
properties: | ||
name: | ||
type: any | ||
StringOrNumber: | ||
properties: | ||
name: | ||
type: string | number | ||
NumberOrNil: | ||
properties: | ||
name: | ||
type: number | nil | ||
Integer: | ||
properties: | ||
name: | ||
type: integer | ||
StringOrNumberOrBoolean: | ||
properties: | ||
name: | ||
type: string | number | boolean | ||
NumberOrString: | ||
properties: | ||
name: | ||
type: number | string |
15 changes: 15 additions & 0 deletions
15
amf-cli/shared/src/test/resources/production/simple-union-override/library.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,15 @@ | ||
#%RAML 1.0 Library | ||
|
||
types: | ||
|
||
SuperType: | ||
properties: | ||
unionProp?: | ||
type: date-only | nil | ||
|
||
BaseType: | ||
type: SuperType | ||
properties: | ||
unionProp?: | ||
type: date-only | nil | ||
|
38 changes: 2 additions & 36 deletions
38
amf-cli/shared/src/test/resources/validations/reports/examples/inheritance.report.js
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 |
---|---|---|
@@ -1,38 +1,4 @@ | ||
ModelId: file://amf-cli/shared/src/test/resources/validations/production/inheritance.raml | ||
Profile: RAML 1.0 | ||
Conforms: false | ||
Number of results: 4 | ||
|
||
Level: Violation | ||
|
||
- Constraint: http://a.ml/vocabularies/amf/resolution#invalid-type-inheritance | ||
Message: Resolution error: Invalid scalar inheritance base type http://a.ml/vocabularies/shapes#number < http://www.w3.org/2001/XMLSchema#string | ||
Severity: Violation | ||
Target: file://amf-cli/shared/src/test/resources/validations/production/inheritance.raml#/declares/shape/NumberOrString/property/property/name/union/name/0 | ||
Property: http://a.ml/vocabularies/shapes#inherits | ||
Range: [(48,14)-(48,20)] | ||
Location: file://amf-cli/shared/src/test/resources/validations/production/inheritance.raml | ||
|
||
- Constraint: http://a.ml/vocabularies/amf/resolution#invalid-type-inheritance | ||
Message: Resolution error: Invalid scalar inheritance base type http://a.ml/vocabularies/shapes#number < http://www.w3.org/2001/XMLSchema#boolean | ||
Severity: Violation | ||
Target: file://amf-cli/shared/src/test/resources/validations/production/inheritance.raml#/declares/shape/NumberOrString/property/property/name/union/name/2 | ||
Property: http://a.ml/vocabularies/shapes#inherits | ||
Range: [(48,14)-(48,20)] | ||
Location: file://amf-cli/shared/src/test/resources/validations/production/inheritance.raml | ||
|
||
- Constraint: http://a.ml/vocabularies/amf/resolution#invalid-type-inheritance | ||
Message: Resolution error: Invalid scalar inheritance base type http://www.w3.org/2001/XMLSchema#string < http://a.ml/vocabularies/shapes#number | ||
Severity: Violation | ||
Target: file://amf-cli/shared/src/test/resources/validations/production/inheritance.raml#/declares/shape/NumberOrString/property/property/name/union/name/4 | ||
Property: http://a.ml/vocabularies/shapes#inherits | ||
Range: [(48,21)-(48,27)] | ||
Location: file://amf-cli/shared/src/test/resources/validations/production/inheritance.raml | ||
|
||
- Constraint: http://a.ml/vocabularies/amf/resolution#invalid-type-inheritance | ||
Message: Resolution error: Invalid scalar inheritance base type http://www.w3.org/2001/XMLSchema#string < http://www.w3.org/2001/XMLSchema#boolean | ||
Severity: Violation | ||
Target: file://amf-cli/shared/src/test/resources/validations/production/inheritance.raml#/declares/shape/NumberOrString/property/property/name/union/name/5 | ||
Property: http://a.ml/vocabularies/shapes#inherits | ||
Range: [(48,21)-(48,27)] | ||
Location: file://amf-cli/shared/src/test/resources/validations/production/inheritance.raml | ||
Conforms: true | ||
Number of results: 0 |
38 changes: 2 additions & 36 deletions
38
amf-cli/shared/src/test/resources/validations/reports/examples/inheritance.report.jvm
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 |
---|---|---|
@@ -1,38 +1,4 @@ | ||
ModelId: file://amf-cli/shared/src/test/resources/validations/production/inheritance.raml | ||
Profile: RAML 1.0 | ||
Conforms: false | ||
Number of results: 4 | ||
|
||
Level: Violation | ||
|
||
- Constraint: http://a.ml/vocabularies/amf/resolution#invalid-type-inheritance | ||
Message: Resolution error: Invalid scalar inheritance base type http://a.ml/vocabularies/shapes#number < http://www.w3.org/2001/XMLSchema#string | ||
Severity: Violation | ||
Target: file://amf-cli/shared/src/test/resources/validations/production/inheritance.raml#/declares/shape/NumberOrString/property/property/name/union/name/0 | ||
Property: http://a.ml/vocabularies/shapes#inherits | ||
Range: [(48,14)-(48,20)] | ||
Location: file://amf-cli/shared/src/test/resources/validations/production/inheritance.raml | ||
|
||
- Constraint: http://a.ml/vocabularies/amf/resolution#invalid-type-inheritance | ||
Message: Resolution error: Invalid scalar inheritance base type http://a.ml/vocabularies/shapes#number < http://www.w3.org/2001/XMLSchema#boolean | ||
Severity: Violation | ||
Target: file://amf-cli/shared/src/test/resources/validations/production/inheritance.raml#/declares/shape/NumberOrString/property/property/name/union/name/2 | ||
Property: http://a.ml/vocabularies/shapes#inherits | ||
Range: [(48,14)-(48,20)] | ||
Location: file://amf-cli/shared/src/test/resources/validations/production/inheritance.raml | ||
|
||
- Constraint: http://a.ml/vocabularies/amf/resolution#invalid-type-inheritance | ||
Message: Resolution error: Invalid scalar inheritance base type http://www.w3.org/2001/XMLSchema#string < http://a.ml/vocabularies/shapes#number | ||
Severity: Violation | ||
Target: file://amf-cli/shared/src/test/resources/validations/production/inheritance.raml#/declares/shape/NumberOrString/property/property/name/union/name/4 | ||
Property: http://a.ml/vocabularies/shapes#inherits | ||
Range: [(48,21)-(48,27)] | ||
Location: file://amf-cli/shared/src/test/resources/validations/production/inheritance.raml | ||
|
||
- Constraint: http://a.ml/vocabularies/amf/resolution#invalid-type-inheritance | ||
Message: Resolution error: Invalid scalar inheritance base type http://www.w3.org/2001/XMLSchema#string < http://www.w3.org/2001/XMLSchema#boolean | ||
Severity: Violation | ||
Target: file://amf-cli/shared/src/test/resources/validations/production/inheritance.raml#/declares/shape/NumberOrString/property/property/name/union/name/5 | ||
Property: http://a.ml/vocabularies/shapes#inherits | ||
Range: [(48,21)-(48,27)] | ||
Location: file://amf-cli/shared/src/test/resources/validations/production/inheritance.raml | ||
Conforms: true | ||
Number of results: 0 |
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
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