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

Mismatched syntax in example TCK test files #139

Open
arielmirra opened this issue Oct 6, 2020 · 0 comments
Open

Mismatched syntax in example TCK test files #139

arielmirra opened this issue Oct 6, 2020 · 0 comments

Comments

@arielmirra
Copy link
Contributor

Hi! I've been reviewing some files while testing and have some observations regarding these RAML 1.0 TCK files:

the RAML Spec says: "There are two ways to represent the example facet value: as an explicit description of a specific type instance and as a map that contains additional facets".

By that definition, an example object is either a literal example of the object or a map. In case it's a map, the additional facets available are described here. Being value the only facet that's not optional.

The example object in the files has the following syntax:

types:
  TestType:
    type: object
    properties:
      name: string
    example:
      strict: false
      name: 1

But taking what was declared before into account. The previous code is not a TestType object nor a valid Example map (as it's missing the value facet). In my opinion, this example can be described in two ways.
As a map (the correct way as we want the strict: false property):

example:
      strict: false
      value:
        name: 1

As a TestType object (invalid as we lost the strict facet and the name is not a string):

example:
      name: 1

NOTE: this files are on i130_add_raml101_tests branch and not master.

Hope I was clear and concise. Thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant