Skip to content

add draft json schemas#105

Draft
halamix2 wants to merge 5 commits intoisledecomp:masterfrom
halamix2:json-schema
Draft

add draft json schemas#105
halamix2 wants to merge 5 commits intoisledecomp:masterfrom
halamix2:json-schema

Conversation

@halamix2
Copy link
Contributor

@halamix2 halamix2 commented May 3, 2025

@halamix2 halamix2 force-pushed the json-schema branch 2 times, most recently from 0857bb1 to ff1479c Compare May 3, 2025 17:26
@jonschz
Copy link
Collaborator

jonschz commented May 3, 2025

Just a suggestion: Have you looked into generating the JSON schemas from pydantic (https://docs.pydantic.dev/latest/concepts/json_schema/#JSON%20Schema)? If that works well enough, it would be preferable since then you'd have a single source of truth and wouldn't have to maintain the schema in two places.

@halamix2 halamix2 force-pushed the json-schema branch 2 times, most recently from 191d596 to 7623362 Compare May 3, 2025 17:46
@halamix2
Copy link
Contributor Author

halamix2 commented May 3, 2025

I haven't, I'll look into that

@halamix2
Copy link
Contributor Author

halamix2 commented May 3, 2025

I've added the required desription changes to the reccmp/project/config.py file, and for now I've added generate_schemas.py and the generated files.

One thing has changed, that this schema will think that any names with dash inside are not valid (e.g source-root). I doubt that'll be a problem since these files are generated with underscores anyway.

Now the questions are

  • where to put the generated files
  • and where to put the generator, should it run in pip install, should it run manually, or even as a push Github Action?
    • if run manualy should it be connected to a postcommit githook?

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

Successfully merging this pull request may close these issues.

2 participants