Json schema generator#
- esgvoc.apps.jsg.json_schema_generator.generate_json_schema(project_id: str) dict[source]#
Generate json schema for the given project.
- Parameters:
project_id (str) – The id of the given project.
- Returns:
The root node of a json schema.
- Return type:
- Raises:
EsgvocValueError – On wrong information in catalog_specs.
EsgvocNotFoundError – On missing information in catalog_specs.
EsgvocNotImplementedError – On unexpected operations resulted in wrong information in catalog_specs).
EsgvocException – On json compliance error.
- esgvoc.apps.jsg.json_schema_generator.get_schema_version(project_id: str) str[source]#
Return the snapshot version used for the schema of the given project.
- Parameters:
project_id (str) – The id of the given project.
- Returns:
The active snapshot version string (e.g. ‘dev-latest’, ‘v1.2.1’).
- Return type:
- Raises:
EsgvocNotFoundError – If the project or its catalog specs are not found.