Skip to content

Host JSON Schemas for packaging specs as raw JSON files in this repository #1875

Closed

Description

@edgarrmondragon

Issue Description

Currently there are two specs with documented JSON schemas:

and a partial one:

One possible omission is pylock.toml (PEP 751), whose schema is currently hosted in Schemastore: https://github.com/SchemaStore/schemastore/blob/f781bd9d5b2b75d1ebd82cd5cc9f8275fb330487/src/schemas/json/pylock.json.


I propose hosting all the JSON files for the schemas in this repo, and linking to them from Schemastore where that's required (i.e. for pylock.toml).

I can work on a PR to move the all JSON schema to their own files here, and another one to update Schemastore.

Thoughts?

Code of Conduct

  • I am aware that participants in this repository must follow the PSF Code of Conduct.

Activity

  1. ncoghlan commented on Aug 2, 2025

    @ncoghlan
    Contributor

    This seems like a good idea to me. Perhaps stored in a new https://packaging.python.org/en/latest/specifications/schemas subfolder, and then included via .. literalinclude:: directives so we're not duplicating the content in the prose docs?

    We could potentially put an index.rst in the schemas subfolder (adding it as the last entry in the main specifications TOC, but I'm not sure that's actually necessary.

    The main alternative layout I can see would be to try to group each schema with its corresponding prose documentation in dedicated subfolders, but that wouldn't align neatly with the existing flat layout of the prose specifications, so it doesn't seem worth the extra effort.

  2. edgarrmondragon commented on Aug 4, 2025

    @edgarrmondragon
    ContributorAuthor

    This seems like a good idea to me. Perhaps stored in a new https://packaging.python.org/en/latest/specifications/schemas subfolder

    Yeah, luckily they seems to already be the case thanks to

    https://github.com/pypa/packaging.python.org/blob/e3f46317b2cba1a4b0b8e280c177cde81a522dd7/source/conf.py#L86-L88

    and then included via .. literalinclude:: directives so we're not duplicating the content in the prose docs?

    👍

    We could potentially put an index.rst in the schemas subfolder (adding it as the last entry in the main specifications TOC, but I'm not sure that's actually necessary.

    That would mean moving a few files around but I'd try to preserve the intent of some of the changes made in #1807, so we can further discuss in the PR.

    The main alternative layout I can see would be to try to group each schema with its corresponding prose documentation in dedicated subfolders, but that wouldn't align neatly with the existing flat layout of the prose specifications, so it doesn't seem worth the extra effort.

    Agreed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions