Skip to content

chore: regenerate Zero Friction SDK for v1.1 - #15

Draft
thom-techlete wants to merge 3 commits into
mainfrom
chore/regenerate-sdk-v1.1
Draft

thom-techlete wants to merge 3 commits into
mainfrom
chore/regenerate-sdk-v1.1

Conversation

@thom-techlete

@thom-techlete thom-techlete commented Sep 11, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Regenerate all eight Python SDK clients from the OpenAPI snapshots checked into openapi_specs/.
  • Keep OpenAPI Generator pinned to 7.13.0.
  • Remove stale generated files absent from each client's .openapi-generator/FILES manifest.
  • Update the hand-maintained compatibility layer for the generated DefaultApi surface.
  • Bundle all eight generated clients into the root zero-friction distribution so installed generated code always matches the selected branch or tag.

OpenAPI changes versus main

All eight specifications changed:

Spec Contract changes
Attachments 2 operations added, 2 removed; 27 shared operations changed; 25 schemas added, 241 removed.
Billing 79 operations added, 26 removed; 167 shared operations changed; 275 schemas added, 279 removed.
Communication 15 operations added, 3 removed; 3 shared operations changed; 40 schemas added, 219 removed.
Configuration 101 operations added, 17 removed; 192 shared operations changed; 455 schemas added, 301 removed.
Forecasting 3 operations added; 23 schemas added, 225 removed.
Masterdata 56 operations added, 8 removed; 105 shared operations changed; 121 schemas added, 241 removed.
Metering 18 operations added, 8 removed; 59 shared operations changed; 114 schemas added, 282 removed.
RegionalRegulations 1 operation added; 10 schemas added, 223 removed.

The dominant generated change is tag normalization: all eight clients now expose DefaultApi rather than the former resource-specific API classes. There are also response-type changes, model renames/removals, enum changes, and required parameter/header changes. No security-scheme changes were detected.

Compatibility impact

Potentially breaking:

  • Generated API classes changed to DefaultApi in all eight clients.
  • Many former model classes were removed or renamed.
  • Operation response types and method signatures changed.
  • Required parameters and headers changed on multiple operations.
  • Enum sets changed, including expanded country-code enums.

Definitely breaking for existing consumers:

  • Former resource API attributes such as contracts_api, attachments_api, and billing_relations_api are no longer generated; callers must migrate to default_api and the new operation signatures.
  • The old Masterdata CustomersApi generated module was removed.

Compatibility updates in this PR:

  • zero_friction/core/sdk_client.py handles generated Masterdata default_api while retaining the patched public customers_api alias.
  • zero_friction/patches/patched_customers_api.py targets DefaultApi and ApiResponseDTOOfCustomerDTO.
  • The README example uses sdk.masterdata_client.default_api.

Packaging change

The root package no longer declares the eight generated clients as Git URL dependencies. It directly includes their packages from sdk/*_client/*_client and declares their shared runtime dependencies.

This makes installation ref-aware without embedding a branch ref in pyproject.toml:

zero_friction@main          -> generated clients from main
zero_friction@v1            -> generated clients from v1
zero_friction@<feature>     -> generated clients from that feature branch

Projects satisfied with v1 should pin:

git+https://github.com/TECHLETES/zero_friction.git@v1

Projects testing this candidate should temporarily use:

git+https://github.com/TECHLETES/zero_friction.git@chore/regenerate-sdk-v1.1

The standalone generated client distributions should not be installed separately alongside zero-friction.

Generation details

The documented Docker generation loop was used with openapitools/openapi-generator-cli:v7.13.0. The pinned generator rejected two duplicate query-parameter definitions in the supplied Masterdata snapshot:

  • POST /Contracts/filter/bulkaddservicecontext
  • POST /Contracts/filter/bulkremoveservicecontext

The vendor specs were not modified. Generation therefore used the explicit --skip-validate-spec option, with the issue documented here for follow-up with the spec owner.

Verification

Passed:

  • uv lock
  • uv sync
  • uv lock --check
  • Root uv run pytest: 5 passed
  • All eight generated client suites: 1,903 passed
  • Local generated-package imports and compilation
  • Built wheel contains and imports all eight clients in a fresh virtual environment
  • Unified API-class attachment and compatibility patch application
  • Second full regeneration: no additional generated changes
  • Applicable pre-commit hooks: Black, whitespace, TOML, YAML, mypy, Ruff, Bandit, pydocstyle, detect-secrets, and others

Known validation limitation:

  • pip-audit reports five advisories in environment packages (pip and tornado), and the local unpublished zero-friction package cannot be audited from PyPI. This is unchanged by the SDK packaging work.
  • No live API or downstream dependent-repository tests were run.

Downstream validation required before merge

For each dependent project testing this candidate, test installation, imports, generated model names, API attributes, method signatures, unified zero_friction wrapper usage, full tests, and relevant integration/smoke tests. Search first for removed resource API classes and model symbols.

Projects that are satisfied with v1 must remain pinned to v1 so they do not follow main when v1.1 becomes the head commit after merge.

Release gate

This is a draft candidate for v1.1. Do not create or move the v1.1 tag until downstream projects are validated, this PR is reviewed, and the branch is merged to main.

@github-actions github-actions Bot added the chore label Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant