Skip to content

chore(deps): update dependency datamodel-code-generator to v0.96.0 - #713

Merged
layertwo merged 1 commit into
mainlinefrom
renovate/datamodel-code-generator-0.x
Nov 13, 2026
Merged

layertwo merged 1 commit into
mainlinefrom
renovate/datamodel-code-generator-0.x

Conversation

@renovate

@renovate renovate Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
datamodel-code-generator ==0.95.0 → ==0.96.0 age adoption passing confidence

Release Notes

datamodel-code-generator/datamodel-code-generator (datamodel-code-generator)

v0.96.0

Compare Source

Breaking Changes

Code Generation Changes
  • Generated client methods return raw bodies for itemSchema stream responses - For an OpenAPI 3.2 response media of text/event-stream or a JSON Lines or NDJSON type (application/jsonl, application/jsonlines, application/ndjson, application/x-jsonl, application/x-jsonlines, application/x-ndjson) whose schema is only an itemSchema, the generated client no longer binds the model of the item schema's array projection to the operation's response. The operation method, its with_response view and its result type alias now read the whole body raw: str for an event stream (a text branch) and bytes for JSON Lines or NDJSON (a binary branch). For example, WatchEventsResponse becomes str, and a JSON plus JSON Lines response becomes models.ExcerptGetResponse | bytes. Code that relied on the old result type must parse the raw body or use the new stream helper that regenerated clients now get at client.protocols.<resource>.<method>, which yields typed items (#​6767)
  • Generated client stream helpers now type items as the model the itemSchema references - In generated Python clients, SSE, JSON Lines and NDJSON stream helpers whose itemSchema is a bare $ref now use the referenced model, for example EventStream[models.LogEntry], AsyncEventStream[models.Event] and EventPlan[models.LogEntry]. Before, they used the duplicate ItemSchema or ItemSchemaModel model generated at the item schema location. The codecs in _generated/model_bindings.py change to match. With Pydantic v2 output, decoded stream items are now instances of the referenced model, for example models.LogEntry instead of models.ItemSchemaModel, and validation error messages name that model. With dataclasses output, only the type annotations change. Code that annotates, isinstance-checks or pattern-matches stream items against models.ItemSchema or models.ItemSchemaModel has to switch to the referenced model (#​6771)
  • Const, enum and allOf branches no longer take object keywords under --read-object-keywords-by-type - With --read-object-keywords-by-type, which the standard and practical 2026111 presets also turn on, the check for an anyOf or oneOf branch that admits no object now looks at more than a declared type or a $ref to such a schema. It also counts const, enum, nested allOf, anyOf and oneOf parts, false schemas, and the full schema a $ref names together with the keywords beside it. Branches found this way are now read without the sibling properties, patternProperties, additionalProperties, propertyNames, unevaluatedProperties, required, minProperties and maxProperties. For example, an anyOf of a const branch, an enum branch and an object branch next to properties and required used to generate a single model field Owner | None and now generates a union like Literal['none'] | Owner | Owner1 | None. That adds new enum classes and can shift model names: the former Owner model becomes Owner1. Under --generate-schema-validators these sites also become unions instead of one validated object model. Output without the option is unchanged (#​6777)
  • Regex patterns containing quotes are written differently in Pydantic v2 output - With pydantic_v2.BaseModel and pydantic_v2.dataclass output, a pattern containing a single quote used to be written as a single-quoted raw literal with the quote escaped by a backslash, for example constr(pattern=r'^it\'s$'). Because raw literals keep backslashes, the runtime pattern string had an extra backslash before the quote. The generator now picks a quote character the pattern does not use, so this becomes constr(pattern=r"^it's$"). A pattern containing both quote characters is now written as a plain (non-raw) literal, for example '^a-z\'"+$' instead of r'^a-z\'"+$', and backslashes in such patterns are doubled. A pattern that already holds a backslash before a quote changes only in source text: "^don\\'t$" becomes r"^don\'t$". This affects string field patterns, propertyNames key patterns, and StringConstraints written under --field-constraints or --use-annotated. Python's re matches the same values, so validation does not change. However, the pattern stored in constr or StringConstraints, and the pattern that model_json_schema() publishes (for example in FastAPI OpenAPI docs), no longer has the extra backslash. The generated source text for these fields also changes, so snapshot tests or committed generated code will show differences after regenerating (#​6790)
Error Handling Changes
  • Helper names that collide with derived item stream helpers are now refused - When an OpenAPI 3.2 document has responses that stream an itemSchema, generation now derives a stream helper named <resource>.<method> for each such operation. A helper in the protocols helper file whose name contains a derived name, or is contained in one (for example a declared helper named default beside the derived default.watch_events), now fails generation with an E_NAME_COLLISION config diagnostic reported under the client protocols option. The same helper file used to generate. To fix it, rename the declared helper (#​6767)
  • Deprecation and migration notices now name the code that called datamodel-code-generator instead of a module inside the package - Notices emitted through the central deprecation registry used to be attributed to a frame inside datamodel_code_generator, picked by a fixed stacklevel at each call site. They are now attributed to the outermost frame outside the package. In the Python API that is the user module that called generate() or another API. In the CLI it is the console script, or the runpy frame for python -m. This covers the optional-dependency notices (Genson, Jinja2, Black/isort, Pydantic runtime minimum), the default formatters notice, the deprecated --validation, --parent-scoped-naming and --allow-extra-fields notices, the remote $ref default notice, the OpenAPI nullable and JSON Schema array items notices, PythonVersion.has_type_alias and the other registry notices. As a result, each notice reports a different filename, line number and module. Filters that matched these notices by module="datamodel_code_generator" no longer suppress them, whether set in warnings.filterwarnings, -W, PYTHONWARNINGS or pytest filterwarnings. To silence them, filter by category and message, or target the calling module, for example warnings.filterwarnings("ignore", category=FutureWarning, module="mypackage.models"). Python's default filters show DeprecationWarning only when it is attributed to __main__. A script that calls the API directly may therefore now show registry notices of category DeprecationWarning that were hidden before (#​6793)

What's Changed

New Contributors

Full Changelog: datamodel-code-generator/datamodel-code-generator@0.95.0...0.96.0


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@github-actions

Copy link
Copy Markdown

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  lambda/src/environment
  service_provider.py
  lambda/src/services
  oauth_code_manager.py
Project Total  

This report was generated by python-coverage-comment-action

@github-actions

Copy link
Copy Markdown

Diff for stage: DefaultStage

Warning

3 Destructive Changes

No Changes for stack: GitHubOidcStack ✅

Diff for stack: Service-prod - 3 to add, 3 to update, 3 to destroy ❌

Details

[!WARNING]
Destructive Changes ‼️
Stack: Service-prod - Resource: AuthApiDeploymentB62B2E46460efaf687368da11b4a342765c33a3f - Impact: WILL_DESTROY

Stack: Service-prod - Resource: TokenApiDeploymentB896C219bd25d8166f89c24fa0875a04551bfe71 - Impact: WILL_DESTROY

Stack: Service-prod - Resource: ProfileApiDeployment84A5441558bbeb729c9948a561ae2f5d823c569d - Impact: WILL_DESTROY

Resources
[-] AWS::ApiGateway::Deployment AuthApiDeploymentB62B2E46460efaf687368da11b4a342765c33a3f destroy
[-] AWS::ApiGateway::Deployment TokenApiDeploymentB896C219bd25d8166f89c24fa0875a04551bfe71 destroy
[-] AWS::ApiGateway::Deployment ProfileApiDeployment84A5441558bbeb729c9948a561ae2f5d823c569d destroy
[+] AWS::ApiGateway::Deployment AuthApiDeploymentB62B2E466a5f0bdf9fc95b11200b268147467c93
[+] AWS::ApiGateway::Deployment TokenApiDeploymentB896C21966ba8c17aaa899324c8b3359656ddc29
[+] AWS::ApiGateway::Deployment ProfileApiDeployment84A54415f5cec6ac6585d29a9fe6765c870d647b
[~] AWS::Lambda::Function AuthApiHandlerED50ACFA
 ├─ [~] Code
 │   └─ [~] .S3Key:
 │       ├─ [-] 1a673bf93273755f71a7de38f27ac2e17cc7d6aa196cf1e4092907feaf4d3166.zip
 │       └─ [+] e1f26169d591eb1fd0cab80db1430a5d69f1d27c01ef08598ca2bcc9fcbc10a3.zip
 └─ [~] Metadata
     └─ [~] .aws:asset:path:
         ├─ [-] asset.1a673bf93273755f71a7de38f27ac2e17cc7d6aa196cf1e4092907feaf4d3166
         └─ [+] asset.e1f26169d591eb1fd0cab80db1430a5d69f1d27c01ef08598ca2bcc9fcbc10a3
[~] AWS::Lambda::Function TokenApiHandler2E66DB25
 ├─ [~] Code
 │   └─ [~] .S3Key:
 │       ├─ [-] 1a673bf93273755f71a7de38f27ac2e17cc7d6aa196cf1e4092907feaf4d3166.zip
 │       └─ [+] e1f26169d591eb1fd0cab80db1430a5d69f1d27c01ef08598ca2bcc9fcbc10a3.zip
 └─ [~] Metadata
     └─ [~] .aws:asset:path:
         ├─ [-] asset.1a673bf93273755f71a7de38f27ac2e17cc7d6aa196cf1e4092907feaf4d3166
         └─ [+] asset.e1f26169d591eb1fd0cab80db1430a5d69f1d27c01ef08598ca2bcc9fcbc10a3
[~] AWS::Lambda::Function ProfileApiHandler9B65A298
 ├─ [~] Code
 │   └─ [~] .S3Key:
 │       ├─ [-] 1a673bf93273755f71a7de38f27ac2e17cc7d6aa196cf1e4092907feaf4d3166.zip
 │       └─ [+] e1f26169d591eb1fd0cab80db1430a5d69f1d27c01ef08598ca2bcc9fcbc10a3.zip
 └─ [~] Metadata
     └─ [~] .aws:asset:path:
         ├─ [-] asset.1a673bf93273755f71a7de38f27ac2e17cc7d6aa196cf1e4092907feaf4d3166
         └─ [+] asset.e1f26169d591eb1fd0cab80db1430a5d69f1d27c01ef08598ca2bcc9fcbc10a3
[~] AWS::Lambda::Function ApiHandler5E7490E8
 ├─ [~] Code
 │   └─ [~] .S3Key:
 │       ├─ [-] 1a673bf93273755f71a7de38f27ac2e17cc7d6aa196cf1e4092907feaf4d3166.zip
 │       └─ [+] e1f26169d591eb1fd0cab80db1430a5d69f1d27c01ef08598ca2bcc9fcbc10a3.zip
 └─ [~] Metadata
     └─ [~] .aws:asset:path:
         ├─ [-] asset.1a673bf93273755f71a7de38f27ac2e17cc7d6aa196cf1e4092907feaf4d3166
         └─ [+] asset.e1f26169d591eb1fd0cab80db1430a5d69f1d27c01ef08598ca2bcc9fcbc10a3
[~] AWS::ApiGateway::Stage AuthApiDeploymentStageprodB0E4172A
 └─ [~] DeploymentId
     └─ [~] .Ref:
         ├─ [-] AuthApiDeploymentB62B2E46460efaf687368da11b4a342765c33a3f
         └─ [+] AuthApiDeploymentB62B2E466a5f0bdf9fc95b11200b268147467c93
[~] AWS::ApiGateway::Stage TokenApiDeploymentStageprod11035AE4
 └─ [~] DeploymentId
     └─ [~] .Ref:
         ├─ [-] TokenApiDeploymentB896C219bd25d8166f89c24fa0875a04551bfe71
         └─ [+] TokenApiDeploymentB896C21966ba8c17aaa899324c8b3359656ddc29
[~] AWS::ApiGateway::Stage ProfileApiDeploymentStageprodF609D968
 └─ [~] DeploymentId
     └─ [~] .Ref:
         ├─ [-] ProfileApiDeployment84A5441558bbeb729c9948a561ae2f5d823c569d
         └─ [+] ProfileApiDeployment84A54415f5cec6ac6585d29a9fe6765c870d647b
[~] AWS::Lambda::Function ChannelApiHandler02759D57
 ├─ [~] Code
 │   └─ [~] .S3Key:
 │       ├─ [-] 1a673bf93273755f71a7de38f27ac2e17cc7d6aa196cf1e4092907feaf4d3166.zip
 │       └─ [+] e1f26169d591eb1fd0cab80db1430a5d69f1d27c01ef08598ca2bcc9fcbc10a3.zip
 └─ [~] Metadata
     └─ [~] .aws:asset:path:
         ├─ [-] asset.1a673bf93273755f71a7de38f27ac2e17cc7d6aa196cf1e4092907feaf4d3166
         └─ [+] asset.e1f26169d591eb1fd0cab80db1430a5d69f1d27c01ef08598ca2bcc9fcbc10a3

No Changes for stack: Frontend-prod ✅
No Changes for stack: Monitoring-prod ✅

Generated for commit 6aaf048 at 2026-11-13T21:56:17.213Z

@layertwo
layertwo merged commit 8615f3a into mainline Nov 13, 2026
10 checks passed
@renovate
renovate Bot deleted the renovate/datamodel-code-generator-0.x branch November 13, 2026 21:59
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