Skip to content

fix(schema): resolve broken $ref URLs across schemas - #70

Open
AbhiPra24 wants to merge 1 commit into
beckn:mainfrom
AbhiPra24:fix/broken-schema-ref-urls
Open

AbhiPra24 wants to merge 1 commit into
beckn:mainfrom
AbhiPra24:fix/broken-schema-ref-urls

Conversation

@AbhiPra24

Copy link
Copy Markdown

Summary

Fixes broken relative and absolute $ref pointers across schema definitions in the repository to ensure all referenced schema fragments and files resolve cleanly without 404 or missing file errors.

Fixes #56

Changes

  1. CallbackAction/v2.0 & RequestAction/v2.0:

    • Removed broken $ref pointers targeting non-existent BecknAction/v2.0 schemas in both attributes.yaml and schema.json.
    • Explicitly marked them as type: object deprecated stubs.
  2. TransactionEndpoint/v2.0 & LineageEntry/v2.0:

    • Removed invalid allOf inheritance pointing to non-existent BecknEndpoint/v2.0 from TransactionEndpoint/v2.0 (attributes.yaml and schema.json).
    • Defined TransactionEndpoint/v2.0 directly as type: string with standard endpoint enumeration.
    • Updated LineageEntry/v2.0 action property $ref in attributes.yaml, schema.json, and README.md to point to TransactionEndpoint/v2.0.
  3. GroceryItem/v2.0 & HomeAndKitchenItem/v2.0:

    • Removed invalid allOf inheritance pointing to deleted RetailCoreItem/v2.0 from attributes.yaml and schema.json.
    • Defined both item attribute schemas directly as type: object.
  4. SalesOfferPackage/v2.0:

    • Updated distributions property $ref in attributes.yaml, schema.json, and README.md to point to existing CommunicationChannel/v2.0 instead of non-existent DistributionChannel/v2.0.
  5. SafetyPolicy/v2.0:

    • Updated emergencyContact property $ref in attributes.yaml, schema.json, and README.md to point to existing Contact/v2.0 instead of non-existent ContactHandle/v2.0.
  6. CodedValue/v2.1 & CourseResourceAttributes/v2.1:

    • Generated missing schema/CodedValue/v2.1/schema.json to satisfy the $ref targets in CourseResourceAttributes/v2.1/schema.json.
  7. Documentation & Changelog:

    • Updated CHANGELOG.md with an unreleased patch record detailing the fixes.

Verification

  • Ran full automated repository scan verifying all 878+ $ref pointers across all YAML and JSON schemas.
  • 0 YAML parse errors, 0 JSON parse errors, 0 unresolved $ref errors.

Fix broken relative and absolute $ref pointers across schema files:
- CallbackAction, RequestAction: remove broken $ref to non-existent BecknAction
- TransactionEndpoint: remove invalid allOf inheritance to BecknEndpoint
- LineageEntry: update action $ref from BecknEndpoint to TransactionEndpoint
- GroceryItem, HomeAndKitchenItem: remove invalid allOf inheritance to RetailCoreItem
- SalesOfferPackage: update distributions $ref to CommunicationChannel
- SafetyPolicy: update emergencyContact $ref to Contact
- CodedValue: add missing schema.json for v2.1 referenced by CourseResourceAttributes

Fixes beckn#56

Signed-off-by: Abhinav Prakash <abhinavprakash616@gmail.com>
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.

bug: broken $ref URLs in 9 schema files point to non-existent schemas

1 participant