Skip to content

Schema sets minProperties=1 for build.tools, but an empty object is allowed by the service #12592

@sirosen

Description

@sirosen

Details

In pip-tools, our RTD config sets build.tools: {}. (ref)
I can't recall why -- it wasn't something we discussed with the new config -- maybe I thought it was more explicit? I think just omitting tools would be equivalent, but I don't feel 100% certain of that?

When we went to add schema validation to our lints (check-jsonschema in pre-commit), we were surprised to see it fail.
The failure is caused by "minProperties": 1 being set here on the schema for build.tools.

I'd like to update and relax the schema, allowing the empty object, on the grounds that it is allowed by RTD when loading config and executing a build.

Expected Result

The config, which works, should pass validation against the RTD schema.

Actual Result

The schema and service are in disagreement, and the working config fails validation.


I intend to open a PR for this momentarily. If the change is unacceptable for some reason (e.g., RTD is trying to migrate to require this), but I can get confirmation that omitting build.tools is equivalent to specifying it as empty, that would be helpful as an alternative.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions