docs: add extensibility and forward compatibility guidelines#290
docs: add extensibility and forward compatibility guidelines#290gsmith85 wants to merge 2 commits intoUniversal-Commerce-Protocol:mainfrom
Conversation
- 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.
There was a problem hiding this comment.
Good additions! This fills a real gap in the authoring guide.
However, are we missing the other half of the story here? This section covers additive changes (new fields, new enum values) and how to design schemas so they don't break clients. But it doesn't address subtractive/breaking changes (removing a field, retiring an enum value, tightening a type). We have a schema-transition mechanism in ucp-schema that covers this, and I think we might be able to port-over the guidance hiding in that repo here as just one or two extra paragraphs to tell the whole story here 😄
|
Hey @raginpirate, thanks for the feedback. You're absolutely right, this is only half the story 🙂. I took a look at the I think the additive best practices are relatively uncontroversial. If you're game, I'll open a separate follow-up PR specifically for subtractions so we can align on a formal deprecation SLA without blocking. |
Description
Re: #244 (comment), 040684c
Type of change
Please delete options that are not relevant.
functionality to not work as expected, including removal of schema files
or fields)
Checklist