Skip to content

chore: replace deprecated --allow-extra-fields codegen flag - #65

Open
XiaolongZhang-TT wants to merge 1 commit into
Universal-Commerce-Protocol:mainfrom
XiaolongZhang-TT:fix/codegen-deprecated-extra-fields
Open

chore: replace deprecated --allow-extra-fields codegen flag#65
XiaolongZhang-TT wants to merge 1 commit into
Universal-Commerce-Protocol:mainfrom
XiaolongZhang-TT:fix/codegen-deprecated-extra-fields

Conversation

@XiaolongZhang-TT

Copy link
Copy Markdown
Contributor

Description

datamodel-code-generator deprecated the --allow-extra-fields flag in favor of --extra-fields=allow. generate_models.sh still passes the deprecated alias, so every run emits:

DeprecationWarning: --allow-extra-fields is deprecated. Use --extra-fields=allow instead.

The alias will be removed upstream, at which point generate_models.sh breaks outright. This swaps to the supported --extra-fields=allow.

Verified byte-identical codegen output between the two flags — diff -r over the full release/2026-04-08 schema set with all other options unchanged turned up no differences, so the committed models are untouched and the #62 regeneration-equality check still passes. Complements the generation-integrity work in #62.

Category (Required)

Please select one or more categories that apply to this change.

  • Core Protocol: Changes to the base communication layer, global context, or breaking refactors. (Requires Technical Council approval)
  • Governance/Contributing: Updates to GOVERNANCE.md, CONTRIBUTING.md, or CODEOWNERS. (Requires Governance Council approval)
  • Capability: New schemas (Discovery, Cart, etc.) or extensions. (Requires Maintainer approval)
  • Documentation: Updates to README, or documentations regarding schema or capabilities. (Requires Maintainer approval)
  • Infrastructure: CI/CD, Linters, or build scripts. (Requires DevOps Maintainer approval)
  • Maintenance: Version bumps, lockfile updates, or minor bug fixes. (Requires DevOps Maintainer approval)
  • SDK: Language-specific SDK updates and releases. (Requires DevOps Maintainer approval)
  • Samples / Conformance: Maintaining samples and the conformance suite. (Requires Maintainer approval)
  • UCP Schema: Changes to the ucp-schema tool (resolver, linter, validator). (Requires Maintainer approval)
  • Community Health (.github): Updates to templates, workflows, or org-level configs. (Requires DevOps Maintainer approval)

Related Issues

None.

Checklist

  • I have followed the Contributing Guide (including Conventional Commits title requirements and ! for breaking changes).
  • I have updated the documentation (if applicable).
  • My changes pass all local linting and formatting checks.
  • I have added tests that prove my fix is effective or that my feature works. (N/A for a build-script flag; equivalence is verified by the diff in Description and the ci: verify committed models match regeneration from the pinned UCP spec #62 CI.)
  • New and existing unit tests pass locally with my changes.
  • (For Core/Capability) I have included/updated the relevant JSON schemas.
  • I have regenerated Python Pydantic models by running generate_models.sh under python_sdk. (No regeneration needed — output is byte-identical; see Description.)

Screenshots / Logs (if applicable)

The one-line change:

-    --allow-extra-fields \
+    --extra-fields=allow \

Equivalence check (full schema set, only the flag differing):

$ diff -r out_allow_extra_fields out_extra_fields_allow
$ echo $?
0

datamodel-code-generator deprecated --allow-extra-fields in favor of
--extra-fields=allow: the CLI emits a DeprecationWarning on every
generate_models.sh run, and the alias will be removed upstream (at which
point generation breaks). Swap to the supported flag.

Verified byte-identical codegen output between the two flags (diff -r over
the full release/2026-04-08 schema set, same options otherwise), so the
committed models are unchanged and the Universal-Commerce-Protocol#62 regeneration-equality check
still passes.
@damaz91 damaz91 added the status:needs-triage Signal that the PR is ready for human triage label Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status:needs-triage Signal that the PR is ready for human triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants