-
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 #1728 from aml-org/W-12521486/exception-in-type-ex…
…pression W-12521486: fixed wrong type expression parsing
- Loading branch information
Showing
11 changed files
with
166 additions
and
72 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
amf-cli/shared/src/test/resources/validations/raml/empty-array-in-union-type-expression.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,9 @@ | ||
#%RAML 1.0 | ||
title: Something | ||
version: 1.0 | ||
|
||
/test: | ||
post: | ||
body: | ||
multipart/form-data: | ||
type: file[] | [] |
12 changes: 12 additions & 0 deletions
12
amf-cli/shared/src/test/resources/validations/raml/standalone-array-as-type.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,12 @@ | ||
#%RAML 1.0 | ||
title: Something | ||
version: 1.0 | ||
|
||
/test: | ||
post: | ||
body: | ||
multipart/form-data: | ||
type: [] | ||
|
||
types: | ||
EmptyArray: [] |
14 changes: 14 additions & 0 deletions
14
...test/resources/validations/reports/model/raml/empty-array-in-union-type-expression.report
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,14 @@ | ||
ModelId: file://amf-cli/shared/src/test/resources/validations/raml/empty-array-in-union-type-expression.raml | ||
Profile: | ||
Conforms: false | ||
Number of results: 1 | ||
|
||
Level: Violation | ||
|
||
- Constraint: http://a.ml/vocabularies/amf/parser#invalid-type-expression | ||
Message: Syntax error, generating empty array | ||
Severity: Violation | ||
Target: | ||
Property: | ||
Range: [(9,23)-(9,24)] | ||
Location: file://amf-cli/shared/src/test/resources/validations/raml/empty-array-in-union-type-expression.raml |
22 changes: 22 additions & 0 deletions
22
.../shared/src/test/resources/validations/reports/model/raml/standalone-array-as-type.report
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,22 @@ | ||
ModelId: file://amf-cli/shared/src/test/resources/validations/raml/standalone-array-as-type.raml | ||
Profile: | ||
Conforms: false | ||
Number of results: 2 | ||
|
||
Level: Violation | ||
|
||
- Constraint: http://a.ml/vocabularies/amf/parser#empty-type-expression-array | ||
Message: [] is not a valid type | ||
Severity: Violation | ||
Target: | ||
Property: | ||
Range: [(9,14)-(9,16)] | ||
Location: file://amf-cli/shared/src/test/resources/validations/raml/standalone-array-as-type.raml | ||
|
||
- Constraint: http://a.ml/vocabularies/amf/parser#empty-type-expression-array | ||
Message: [] is not a valid type | ||
Severity: Violation | ||
Target: | ||
Property: | ||
Range: [(12,14)-(12,16)] | ||
Location: file://amf-cli/shared/src/test/resources/validations/raml/standalone-array-as-type.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
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
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
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