buildkite / pipeline-schema

A JSON schema for Buildkite’s pipeline file format
MIT License
31 stars 35 forks source link

YAML named anchors always show up as invalid according to the schema validator #3

Closed DoomGerbil closed 4 years ago

DoomGerbil commented 5 years ago

I'm unsure if this is something that comes up as invalid based on the schema, or if this is because the schema validation plugin I'm using in VSCode doesn't know how to deal with them, but our BuildKite pipelines use a lot of YAML named anchors, and they all appear as invalid, as below:

Screenshot 2019-07-02 at 14 08 49

Is this something that can be fixed in the schema, or is this a bug for the plugin?

toolmantim commented 5 years ago

Ah, sorry you hit that. I believe we just need to allow unknown keys in the schema by removing the last line in https://github.com/buildkite/pipeline-schema/blob/master/schema.json.

Would happily accept a PR with a test case if you wanted to give it a go?

DoomGerbil commented 5 years ago

Ah, sorry you hit that. I believe we just need to allow unknown keys in the schema by removing the last line in https://github.com/buildkite/pipeline-schema/blob/master/schema.json.

Would happily accept a PR with a test case if you wanted to give it a go?

I'll take a swing at this when I have a chance this week. Thanks!

DoomGerbil commented 5 years ago

@toolmantim I finally got around to this, and opened https://github.com/buildkite/pipeline-schema/pull/5. Thanks! :)