Skip to content

Use anyOf over oneOf when comparing JSON schema of .laminas-ci.schema.json #68

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

Merged

Conversation

boesing
Copy link
Member

@boesing boesing commented Oct 10, 2021

Q A
Bugfix yes

Description

With v1.11.0, the JSON schema validation for .laminas-ci.json was added.
Since that schema uses oneOf, it actually must not match more than one schema. The idea behind this was to ensure that additional_checks cannot be used with checks. That worked well when either checks or additional_checks were present in the .laminas-ci.json file. But if neither of these are present, the schema validation fails.

Therefore, we have to use anyOf which ensures that at least one of the schemas matches.

…nas-ci.schema.json`

Signed-off-by: Maximilian Bösing <[email protected]>
@boesing boesing added the Bug Something isn't working label Oct 10, 2021
@boesing boesing added this to the 1.11.3 milestone Oct 10, 2021
@boesing boesing merged commit 4c3e930 into laminas:1.11.x Oct 10, 2021
@boesing boesing deleted the bugfix/ci-configuration-json-schema-anyof branch October 10, 2021 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant