Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Annotations allowedTargets is ignored #441

Closed
postatum opened this issue Apr 18, 2019 · 2 comments
Closed

Annotations allowedTargets is ignored #441

postatum opened this issue Apr 18, 2019 · 2 comments

Comments

@postatum
Copy link
Contributor

Issue

Running code below should fail or report validation error because according to RAML 1.0 spec provided RAML input is invalid.

The spec says:

The locations to which annotations are restricted. If this node is specified, annotations of this type may be applied only on a node corresponding to one of the locations. The value MUST be one or more of the options described in the Target Locations.

Spec link:
https://github.com/raml-org/raml-spec/blob/master/versions/raml-10/raml-10.md/#declaring-annotation-types

AMF Version

4.0.0-SNAPSHOT

Code

$ java -jar amf-4.0.0-SNAPSHOT.jar validate -in "RAML 1.0" -mime-in "application/yaml" -p "RAML" file://api.raml
{
  "@type": "http://www.w3.org/ns/shacl#ValidationReport",
  "http://www.w3.org/ns/shacl#conforms": true
}

api.raml

Is true for all the values of allowedTargets.

#%RAML 1.0
title: Illustrating allowed targets
mediaType: application/json
annotationTypes:
  test:
    allowedTargets: API
  test2:
    (test): hi
@postatum postatum changed the title Annotations is ignored Annotations allowedTargets is ignored Apr 18, 2019
@BlockLucas
Copy link
Contributor

@gutee
Copy link
Contributor

gutee commented Jul 15, 2019

This is fixed and stated for 3.3.0 release

@gutee gutee closed this as completed Jul 15, 2019
@bulju bulju transferred this issue from another repository Jul 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants