Skip to content
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

Support for [project] key in schema validation #646

Open
KyleMit opened this issue Aug 14, 2024 · 4 comments
Open

Support for [project] key in schema validation #646

KyleMit opened this issue Aug 14, 2024 · 4 comments

Comments

@KyleMit
Copy link

KyleMit commented Aug 14, 2024

When I have the following in my pyproject.toml

[project]
name = "jsonschema"

[project.urls]
Homepage = "https://github.com/python-jsonschema/jsonschema"

I get the following error message:

{"name":"jsonschema","urls":{"Homepage":"https://github.com/python-jsonschema/jsonschema"}} 
is not valid under any of the given schemas 
Even Better TOML

image

But this follows the python spec Declaring project metadata: the [project] table and very common examples

Can the schema validation be updated to allow for this key?

@panekj
Copy link
Collaborator

panekj commented Aug 14, 2024

What schema is currently present in your file? (You can check that in right bottom corner next to file language type)

@KyleMit
Copy link
Author

KyleMit commented Aug 14, 2024

Initially it was set to no schema selected

image

But I've updatd to each of the PyProject

image

Actually, looks like it might be related to the json schema store file - https://json.schemastore.org/pyproject.json

And probably need to open an issue/PR there

https://github.com/SchemaStore/schemastore/blob/6d4407c3185f5d956a932fcce111f3f926c319f0/src/schemas/json/pyproject.json#L298-L310

@panekj
Copy link
Collaborator

panekj commented Aug 14, 2024

If the schema has been set on the file (it shows up as PyProject in bottom right corner) then it's likely an issue with schema. Otherwise it could be because of #624

@usamoi
Copy link

usamoi commented Sep 20, 2024

It looks like a deduplicate of #316. Adding version field to [project] should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants