place all definitions at the same level #84
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The JSON Schema draft-06 says of the
definitions
keyword:In the buildkite schema, the
definitions/commonOptions
property is usedto namespace schemas, not as a schema itself, which doesn't seem
to fit the intended structure for
definitions
, even though technically it's just aboutOK because none of the properties happen to coincide with keywords
defined in draft-06 (
"if"
was only defined in draft-07) and unknown keywordsare ignored.
Referring to definitions that aren't in regular schema locations is also
in a grey area. Later versions of the spec have this to say:
Even though draft-06 doesn't include this wording, it seems that the reasoning
still applies.
So to avoid the above issues, this PR moves all the definitions that
were inside
commonOptions
into the top leveldefinitions
property.The distinction between the two kinds of definitions is still clear by virtue
of the
Step
suffix used for all the actual step definitions and not forthe others.
Some other possibilities:
commonOptions
a common prefix, such as "common.", so we'd have#/definitions/common.env
etc.commonOptions
one level down into anotherdefinitions
property, so we'd have#/definitions/commonOptions/definitions/env
etc.Both of those seem unneccessarily verbose to me, but YMMV.
I have verified that the tests pass with this change in place,
assuming #83 is landed as a prereq.
I've split this PR into two commits to make the diffs easier to see.
The first one leaves the indentation inplace; the second aligns it correctly.