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

Feat: new json_schema plugin #296

Merged
merged 9 commits into from
Jul 29, 2022
Merged

Feat: new json_schema plugin #296

merged 9 commits into from
Jul 29, 2022

Conversation

EmileRolley
Copy link
Collaborator

@EmileRolley EmileRolley commented Jul 26, 2022

This PR introduces json_schema, a new compiler plugin.

It allows to generate JSON schema corresponding to a scope of a Catala program in order to be used to build forms for the Catala website.

Changelog

  • New plugin: json_schema.
  • Rename the plugin jsoo in web_api.
  • Factorize some function of the Driver in Utils.File to be used inside plugins.
  • Update Makefiles to generate JSON schemas and to store them in french_law/js/json_schemas.

@EmileRolley EmileRolley added ✨ enhancement New feature or request 🔚 backends Backend runtime or code generation labels Jul 26, 2022
@EmileRolley EmileRolley force-pushed the feat-jsonschema-gen branch 4 times, most recently from 542ecf7 to 5213cc5 Compare July 29, 2022 11:44
@EmileRolley EmileRolley changed the title JSON schemas generation Feat: new json_schema plugin Jul 29, 2022
@EmileRolley EmileRolley force-pushed the feat-jsonschema-gen branch 2 times, most recently from 00ba3d9 to 0fec4a1 Compare July 29, 2022 13:25
@EmileRolley EmileRolley marked this pull request as ready for review July 29, 2022 13:31
Copy link
Contributor

@denismerigoux denismerigoux left a comment

Choose a reason for hiding this comment

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

Thanks very much ! There are a few things to shuffle around before merging I think but otherwise as clean and beautiful as usual.

compiler/plugins/api_web.ml Show resolved Hide resolved
compiler/plugins/json_schema.ml Show resolved Hide resolved
french_law/js/examples.js Show resolved Hide resolved
french_law/json_schemas/aides_logement_schema.json Outdated Show resolved Hide resolved
runtimes/jsoo/runtime.ml Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
@EmileRolley EmileRolley force-pushed the feat-jsonschema-gen branch 3 times, most recently from daad9aa to 643ee25 Compare July 29, 2022 16:34
@EmileRolley
Copy link
Collaborator Author

Okay, everything should be good now @denismerigoux 👌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔚 backends Backend runtime or code generation ✨ enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants