Skip to content

[stable/10] Backport: restore TenantId/BusinessId model typing before 10.1.0 (#329) #330

Open

Description

@jwulf

Summary

Backport the semantic-type regression fix to stable/10 before 10.1.0 is released.

Since b81c24f (7 May), 18 models on stable/10 have tenant_id: str and 3 have business_id: str, where v10.0.0 typed them TenantId / BusinessId. Examples: ProcessInstanceResult, UserTaskResult, JobSearchResult, MessageSubscriptionResult, the deployment result models, ElementInstanceFilter*, and ProcessCreationById/ByKey. Shipping 10.1.0 as it is would remove these nominal types from the public API compared with 10.0.0.

Root cause and fix

See the main issue (#329) for the full analysis. In hooks/post_gen/1000_patch_semantic_types_in_models.py, b81c24f's ambiguity guard drops tenantId and businessId from the global name map. The per-schema fallback then:

  1. ignores properties declared as a $ref (or single-element allOf $ref) to a semantic-key schema, because it only counts an inline x-semantic-type;
  2. never matches models that openapi-python-client names from the schema title, e.g. process_creation_by_id.py vs schema ProcessInstanceCreationInstructionById.

Apply the same fix on stable/10, against the spec stable/10 already uses (don't regenerate from spec main):

  • resolve $ref / allOf $ref targets carrying x-semantic-type in the per-schema map;
  • key the per-schema map by the generated model name (title when set, else schema name);
  • add the regression test pinning ProcessInstanceResult.tenant_id: TenantId, ProcessCreationById.tenant_id / business_id, etc.;
  • confirm that the generated models have no tenant_id: str except where the spec declares a bare string (ExpressionEvaluationRequest), matching v10.0.0;
  • keep the name / ClusterVariableName case from b81c24f working.

You can implement this independently of the main PR. The hook is the same on both branches.

Activity

  1. jwulf commented on Oct 25, 2026

    @jwulf
    MemberAuthor

    🤖 Starting work on this issue — branch feat/issue-330.

  2. jwulf commented on Oct 25, 2026

    @jwulf
    MemberAuthor

    🤖 Starting work on this issue — branch feat/issue-330.

  3. added a commit that references this issue on Oct 25, 2026
    35ee263
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions