Skip to content

[FR] Publish the pyproject.toml specification as a JSON schema #5218

@hunterhogan

Description

@hunterhogan

What's the problem this feature will solve?

Correctly implementing the pyproject.toml specification in a project with the help of tools such as Tombi.

(I am not affiliated with Tombi, but I emphatically endorse their VS Code extension.)

Describe the solution you'd like

Define the pyproject.toml specification as a JSON Schema.

Image

And publish it at PyPA schemas and/or other locations, such as JSON Schema Store, as appropriate.

Alternative Solutions

If I am interpreting things correctly, the folks at Tombi have created and published a JSON Schema. Through their tool and schema, I learned about the change to the project.license.file key. I originally came to https://github.com/pypa/setuptools/issues to ask PyPA to add the deprecated license classifier to the schema. (Cf. #4938) Due to the high quality of the schema, I incorrectly assumed that PyPA had made it.

(Again, I am not affiliated with @tombi-toml in any way, and I strongly encourage other people to consider using their tools.)

Additional context

toml is, of course, a specification. For better or for worse, the IT world tends to distribute precise specifications through JavaScript(!) Object Notation.

Why JSON Schema?

While JSON is probably the most popular format for exchanging data, JSON Schema is the vocabulary that enables JSON data consistency, validity, and interoperability at scale.

https://json-schema.org/

Code of Conduct

  • I agree to follow the PSF Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs TriageIssues that need to be evaluated for severity and status.enhancement
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions