Skip to content

[9.3] [Security][OpenAPI generator] add experimentallyImportZodV4 (#253568)#253792

Merged
janmonschke merged 3 commits intoelastic:9.3from
janmonschke:backport/9.3/pr-253568
Feb 20, 2026
Merged

[9.3] [Security][OpenAPI generator] add experimentallyImportZodV4 (#253568)#253792
janmonschke merged 3 commits intoelastic:9.3from
janmonschke:backport/9.3/pr-253568

Conversation

@janmonschke
Copy link
Copy Markdown
Contributor

Backport

This will backport the following commits from main to 9.3:

Questions ?

Please refer to the Backport tool documentation

…c#253568)

## Summary

Adds an experimental config flag `experimentallyImportZodV4` that
changes the generated zod import to `import { z } from '@kbn/zod/v4';`.
This is meant as a quick way to unblock the cases workflow integration
because workflow schemas use zod v4.

There is some work done to migrate larger parts of the Kibana codebase
(and this generator) to v4 but it will not finish in time for the
workflows integration
(elastic/kibana-team#2589). We recommend
removing this flag as part of the zod upgrade work.

---------

Co-authored-by: Tiago Costa <tiago.costa@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit df5b635)

# Conflicts:
#	x-pack/platform/plugins/shared/cases/docs/openapi/bundled-types.gen.ts
#	x-pack/platform/plugins/shared/cases/scripts/openapi_generate.js
@janmonschke janmonschke added the backport This PR is a backport of another PR label Feb 18, 2026
@janmonschke janmonschke enabled auto-merge (squash) February 18, 2026 18:44
@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #78 / Actions and Triggers app Connectors Opsgenie connector page should edit the connector
  • [job] [logs] Jest Tests #8 / Endpoint exceptions flyout When valid form state should enable "Add endpoint exception" button when form is valid

Metrics [docs]

Unknown metric groups

API count

id before after diff
@kbn/openapi-generator 16 17 +1

History

@janmonschke janmonschke merged commit eefdef9 into elastic:9.3 Feb 20, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants