Skip to content

core-spec/spec.yaml omits ai_context on Relationship, while the JSON schema defines it #340

Description

@stukid

Summary

Relationship is the only node where the two core-spec files disagree on whether a field exists at all:

Source Relationship properties
core-spec/osi-schema.json ($defs/Relationship) name, from, to, from_columns, to_columns, ai_context, custom_extensions
core-spec/spec.yaml (relationships:) name, from, to, from_columns, to_columns, custom_extensions

Every other node (semantic_model, datasets, fields, metrics) carries ai_context in both files.

Why it matters

Implementations that vendor spec.yaml — rather than the JSON schema — as their prompt-facing or documentation contract never learn that a relationship can be annotated. A join whose meaning is not obvious from column names (a bridge table, a type-2 dimension, a deliberately filtered relationship) has no place to say so, even though validators accept it.

Suggested fix

Add ai_context to the relationships: block in spec.yaml, matching how it appears under datasets:.

Related

This is the third reported drift between the two files:

All three share a root cause: spec.yaml and osi-schema.json are maintained by hand with nothing checking that they agree. A CI check asserting that the property set of each node matches between the two files would catch this class of drift, and would likely surface more than these three.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions