cdm_data_loaders.converters.core.io ¶
Schema input parsing and shared converter facade base class.
JsonSchemaConverterBase
pydantic-model
¶
Bases: BaseModel
Shared base class for schema converter facades supporting string and file input.
Fields:
-
extension_registry(InstanceOf[ExtensionRegistry])
Source code in src/cdm_data_loaders/converters/core/io.py
load_schema_text ¶
Parse JSON text, falling back to YAML only when explicitly enabled.
Source code in src/cdm_data_loaders/converters/core/io.py
load_schema_file ¶
Load a JSON or YAML schema from a file, choosing by the .json extension.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str | Path
|
path to the schema file |
required |
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
the parsed schema document |
Source code in src/cdm_data_loaders/converters/core/io.py
coerce_extra_metadata_keywords ¶
Normalize supported metadata keyword collections into a frozenset.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
object
|
candidate keyword collection or raw input value |
required |
Returns:
| Type | Description |
|---|---|
object
|
normalized |