Skip to content

docs(rfc-0032): add Option C, external definition references resolved from OSDS - #111

Merged
jgperrin merged 1 commit into
mainfrom
rfc-0032-option-c
Sep 1, 2026
Merged

jgperrin merged 1 commit into
mainfrom
rfc-0032-option-c

Conversation

@jgperrin

@jgperrin jgperrin commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Closes #110

Adds Option C to RFC-0032, alongside the existing Option A (type: imports in relationships) and Option B (top-level imports + $import).

Option C requires no schema change to ODCS or ODPS. An element binds to an OSDS semantic definition through the already-shared Authoritative Definitions block, using one new recommended type value, and inherits the attributes it does not state itself. Inline values always win; an unresolved reference costs inherited attributes rather than invalidating the document.

authoritativeDefinitions:
  - type: semanticDefinition
    url: sales-semantics@1.2.0#/definitions/customer-lifetime-value

The URL mechanism

reference ::= locator [ "#" fragment ], with the route chosen by the shape of the locator, not by the link's type — the fragment and @version are stripped first:

Shape Route
contains :// network fetch
ends in .yaml / .yml / .json file, relative to the referencing document's base
anything else an id, handed to the consumer's configured resolver

Version pinning: @3.1.4 and @v3.1.4 are the same version (the v is stripped), exact match only in v1, no @ means floating (latest active, warn), @latest says it out loud, and @ on a file locator is an assertion on the file's version. RFC-0047 forbids @ in ids, so the delimiter is unambiguous. Fragments reuse the ODCS reference notation (#/definitions/…, #/schema/…/properties/…), id first and name as fallback; no fragment means the whole document is the definition.

Also

  • Merge semantics: never-merged / merged-when-absent / unioned field classes, transitive resolution, cycle detection.
  • Two examples (minimal and structured), an "Applicability to ODPS" subsection, and the comparison table extended to A vs B vs C.
  • Appendix A — naming the resolvable type: semanticDefinition recommended over externalDefinition / definition / businessDefinition, flagged TBD for the TSC. Keeping businessDefinition informational avoids changing the behaviour of contracts already in the wild.
  • Appendix B — prior art, datacontract/datacontract-cli#1453 by Simon Harrer, whose resolution model Option C adopts, and the three places Option C differs from it.
  • OSDS ticked in "Applies to"; Summary, Consequences and References updated.

Content gate

No CI in this repo. Verified locally: all 26 YAML examples parse, every internal anchor resolves, every relative and external link returns 200, all template sections present, dashboard row unchanged.

🤖 Generated with Claude Code

https://claude.ai/code/session_01UabnikmEmLj55JPHFLTbGH

… from OSDS

Adds a third option to RFC-0032 that requires no schema change to ODCS or
ODPS: an element binds to an OSDS semantic definition through the shared
Authoritative Definitions block with a new recommended type value
(semanticDefinition, TBD), and inherits the attributes it does not state
itself.

Specifies the URL mechanism in full: a grammar, route selection by locator
shape (network / file / id), version pinning with @3.1.4 or @v3.1.4, the
floating and @latest cases, fragment notation reusing the ODCS reference
notation, and merge semantics where inline always wins.

Prior art and the naming discussion go to appendices A and B. The
comparison table becomes A vs B vs C.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UabnikmEmLj55JPHFLTbGH
Signed-off-by: Jean-Georges "jgp" Perrin <dev@jgp.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RFC 0032 - Imports: add Option C, external definition references resolved from OSDS

1 participant