Json schema generator#

class esgvoc.apps.jsg.json_schema_generator.JsonPropertiesVisitor(project_id: str)[source]#

Bases: GlobalAttributeVisitor, AbstractContextManager

visit_base_attribute(attribute_name: str, attribute: GlobalAttributeSpecBase) tuple[str, dict[str, str | list[str]]][source]#

Visit a base global attribute.

visit_specific_attribute(attribute_name: str, attribute: GlobalAttributeSpecSpecific) tuple[str, dict[str, str | list[str]]][source]#

Visit a specific global attribute.

esgvoc.apps.jsg.json_schema_generator.generate_json_schema(project_id: str) str[source]#

Generate json schema for the given project.

Parameters:

project_id (str) – The id of the given project.

Returns:

The content of a json schema

Return type:

str

Raises: