ontology: `spec.py` Pydantic models reject spec-conformant documents carrying `datatype`
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 88/100
Research direction
Start in converters/ontology/src/ossie_ontology/spec.py, inspecting DatasetField, Metric, and the base OssieObject configuration. Reproduce the failure with examples/tpcds_semantic_model.yaml or the documented SemanticModel input, then verify that documents carrying datatype parse successfully without extra_forbidden errors.
Written by the indexing model from the issue text.
Description
Summary
converters/ontology/src/ossie_ontology/spec.py DatasetField and Metric omit datatype, while the base OssieObject sets extra="forbid". Any conformant document with datatype (including examples/tpcds_semantic_model.yaml) fails to parse with extra_forbidden.
Root cause
extra="forbid" + no datatype field on DatasetField/Metric, though the core spec defines datatype on both.
Repro (real converter, HEAD ab8fc1a — EXECUTED)
SemanticModel(**doc) with a field datatype: Integer:
1 validation error for SemanticModel
datasets.0.fields.0.datatype
Extra inputs are not permitted [type=extra_forbidden, input_value='Integer', input_type=str]
Potential fix
Add datatype: str | None = None to DatasetField and Metric. This should be a non-breaking change. Value-enum validation is a separate, optional concern.
- Dominant language
- Python
- Stars
- 2.2k
- Forks
- 280
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 32
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/ossie
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100