-
-
Notifications
You must be signed in to change notification settings - Fork 62
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
Add description of saladVersion
#861
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #861 +/- ##
=======================================
Coverage 83.05% 83.05%
=======================================
Files 22 22
Lines 4886 4886
Branches 1326 1326
=======================================
Hits 4058 4058
Misses 548 548
Partials 280 280 ☔ View full report in Codecov by Sentry. |
@@ -196,6 +197,7 @@ It is a fatal error if the document is not valid YAML. | |||
|
|||
A Salad document must consist only of either a single root object or an |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At least, it is necessary to declare saladVersion
at the root level.
Otherwise, we cannot decide whether to allow the newly introduced features such as nested typeDSL and map/union types.
I guess there are two options to declare saladVersion
for the array of objects.
- As @GlassOfWhiskey mentioned, each object in the array must declare
saladVersion
- I assume that the most root level documents use the explicit context. If my assumption is correct, it is reasonable to enforce
saladVersion
at the root level and to allow the imported documents inherit thesaladVersion
in the parent level.
@@ -196,6 +197,7 @@ It is a fatal error if the document is not valid YAML. | |||
|
|||
A Salad document must consist only of either a single root object or an | |||
array of objects. | |||
Each document must declare the `saladVersion` of that document. Implementations must validate against the document's declared version. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This must
here collides with the may
clause at row 212.
Option 1: substitute this clause with
Each document may declare the
saladVersion
of that document. Implementations may validate against the document's declared version.
Option 2: substitute row 212 with
If a document consists of a root object, this object must contain the
fieldsaladVersion
and may contain the fields$base
,$namespaces
,
$schemas
, and$graph
:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer the option 2.
The option 1 makes difficult to solve #863 in the specification level.
This request clarifies the existence of
saladVersion
, that is currently undocumented.I'm afraid that added description may conflict with the existing description:
Please let me know if there are better descriptions for it.