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

Skeleton utilities #141

Merged
merged 2 commits into from
Dec 24, 2022
Merged

Skeleton utilities #141

merged 2 commits into from
Dec 24, 2022

Conversation

digitaldogsbody
Copy link
Member

Adds 2 utilities in a new utils folder:

  1. Skeleton modifier - this makes the required changes to the existing skeleton file (see Automate Skeleton generation and changes #94)
  2. Skeleton regenerator - this downloads the latest JSON Schema from the validator repo, regenerates the Skeleton file, and then runs the modifier

Copy link
Contributor

@giacomomarchioro giacomomarchioro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't remember if we already tried but theoretically, you should be able to generate the data model directly from the URL providing to datamodel-code-gen the --url flag not sure if it's worth a try. That could simplify the deployment.

@helrond
Copy link
Contributor

helrond commented Dec 21, 2022

I fooled around a bit with the --url flag but wasn't able to get it to work.

@digitaldogsbody
Copy link
Member Author

I can't remember if we already tried but theoretically, you should be able to generate the data model directly from the URL providing to datamodel-code-gen the --url flag not sure if it's worth a try. That could simplify the deployment.

I think I prefer to keep it local for now, as we might have to make modifications to the schema before generation in the near future (Glen is experimenting with using an if..then..else structure to improve the behaviour of the validator, but this is not currently supported by datamode-code-generator, which instead outputs an empty models file)

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.

3 participants