You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Your issue may already be reported! Please search on Github issues before creating one.
I'm submitting a ...
bug report
feature request
question
other
What is the current behavior?
When a RAML file references a RAML library with types that use invalid anntations, those are not validated by RAML validator. However, they are validated when the RAML library is validated directly.
If the current behavior is a bug, please provide the minimal steps to reproduce with AMF code. Please don't upload AMF code mixed with yours.
Consider the following RAML files:
root.raml
#%RAML 1.0 Libraryuses:
lib: lib.raml
lib.raml
#%RAML 1.0 Librarytypes:
MyType:
(invalid_annotation): test
And the following code in TypeScript:
importamffrom'amf-client-js'(async()=>{constclient=amf.RAMLConfiguration.RAML10().baseUnitClient()letres=awaitclient.parseLibrary("file://root.raml")console.log(res.conforms)// OK: trueletvalidation=awaitclient.validate(res.baseUnit)console.log(validation.conforms)// Not OK: trueres=awaitclient.parseLibrary("file://lib.raml")console.log(res.conforms)// OK: truevalidation=awaitclient.validate(res.baseUnit)console.log(validation.conforms)// OK: false})();
The output will be:
true
true
true
false
What is the expected behavior?
When validating root.raml, the validator should fail validation due to invalid annotation used in the RAML type provided in referenced library.
What is the motivation/use case for changing the behavior? (for feature requests)
Please tell us about your environment:
AMF Version: 5.4.5 and 5.5.2
AMF Distribution: JS
Operating System: Windows 10 21H2
The text was updated successfully, but these errors were encountered:
Your issue may already be reported! Please search on Github issues before creating one.
I'm submitting a ...
What is the current behavior?
When a RAML file references a RAML library with types that use invalid anntations, those are not validated by RAML validator. However, they are validated when the RAML library is validated directly.
Consider the following RAML files:
root.raml
lib.raml
And the following code in TypeScript:
The output will be:
When validating
root.raml
, the validator should fail validation due to invalid annotation used in the RAML type provided in referenced library.What is the motivation/use case for changing the behavior? (for feature requests)
Please tell us about your environment:
The text was updated successfully, but these errors were encountered: