paramak icon indicating copy to clipboard operation
paramak copied to clipboard

Paramak should use a JSON Schema

Open makeclean opened this issue 3 years ago • 2 comments

In the same way that XML has a parsing schema, so codes know what items to expect in dictionaries, paramak should do the same - https://json-schema.org/ - an external company was trying to do some automation with paramak, but basically had to recreate a schema for themselves. They suggested it would be considered best practise.

makeclean avatar Feb 14 '22 10:02 makeclean

Thanks for bringing up this necessary feature. Really appreciate the pointers.

It would be most interesting to see what the external company made if that can be shared.

Perhaps we can form that work into a pull requests so their efforts are not lost.

I have a property called input_variable_names which returns all the variables needed for reactors. Perhaps this could evolve to contain types and become the JSON schema. Screenshot from 2022-02-14 10-56-22

I am keen to make this package suitable for purpose so thanks for the suggestion. Much appreciated

shimwell avatar Feb 14 '22 11:02 shimwell

Perhaps this package can be helpful here. https://python-jsonschema.readthedocs.io/en/stable/

shimwell avatar Feb 14 '22 11:02 shimwell