Skip to content

Conversation

@clemensv
Copy link
Contributor

@clemensv clemensv commented Dec 1, 2025

Summary

This PR fixes the inconsistent usage of $ref in examples throughout the spec, ensuring all examples comply with the rule stated in Section 3.4.1.

Changes

Updated examples to consistently use $ref only inside the ype attribute:

  1. Set items example (line 580): Changed from bare $ref to { "type": { "": ... } }
  2. Map values example (line 606): Changed from bare $ref to { "type": { "": ... } }
  3. Choice choices examples (lines 738-739): Changed from bare $ref to { "type": { "": ... } }

Rationale

Section 3.4.1 explicitly states:

"The keyword is only permitted inside the 'type' attribute value of a schema definition, including in type unions."
" is NOT permitted in other attributes..."

These changes ensure all examples follow this rule consistently.

Fixes #21

- Update set items example to wrap ref in type attribute

- Update map values example to wrap ref in type attribute

- Update choice examples to wrap ref in type attribute

All examples now comply with the rule in section 3.4.1 that ref is only permitted inside the type attribute value.

Fixes #21
@clemensv clemensv merged commit abefe4b into main Dec 1, 2025
2 checks passed
@clemensv clemensv deleted the fix/issue-21-ref-consistency branch December 1, 2025 07:35
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.

Spec Bug: Inconsistent $ref usage rules in examples

2 participants