Skip to content

docs: add extensibility and forward compatibility guidelines#290

Open
gsmith85 wants to merge 1 commit intoUniversal-Commerce-Protocol:mainfrom
gsmith85:smithgrg_discourage_json_schema_enum_usage
Open

docs: add extensibility and forward compatibility guidelines#290
gsmith85 wants to merge 1 commit intoUniversal-Commerce-Protocol:mainfrom
gsmith85:smithgrg_discourage_json_schema_enum_usage

Conversation

@gsmith85
Copy link

Description

  • Added "Extensibility and Forward Compatibility" section to the schema authoring guide.
  • Defined standards for Open vs. Closed Enumerations to prevent breaking changes in code-generated clients.
  • Added guidance on avoiding 'additionalProperties: false' to ensure forward compatibility for objects.
  • Clarified the impact of modern code generators (e.g., Quicktype) on schema-to-type validation.
  • Updated the comprehensive capability schema example to align with these new extensibility rules.

Re: #244 (comment), 040684c

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing
    functionality to not work as expected, including removal of schema files
    or fields
    )
  • Documentation update

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

- Added "Extensibility and Forward Compatibility" section to the schema
  authoring guide.
- Defined standards for Open vs. Closed Enumerations to prevent breaking
  changes in code-generated clients.
- Added guidance on avoiding 'additionalProperties: false' to ensure
  forward compatibility for objects.
- Clarified the impact of modern code generators (e.g., Quicktype) on
  schema-to-type validation.
- Updated the comprehensive capability schema example to align with
  these new extensibility rules.
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.

1 participant