Skip to content

[OpenAPI generator] add transformSchemaName config options#250857

Merged
michaelolo24 merged 4 commits intoelastic:mainfrom
janmonschke:cases/zod-schema-generation-generator-transforms
Feb 4, 2026
Merged

[OpenAPI generator] add transformSchemaName config options#250857
michaelolo24 merged 4 commits intoelastic:mainfrom
janmonschke:cases/zod-schema-generation-generator-transforms

Conversation

@janmonschke
Copy link
Copy Markdown
Contributor

@janmonschke janmonschke commented Jan 29, 2026

Summary

If a yaml definition defines the type names in lowercase, like in the cases codebase, the generator would generate lowercase type/schema names. This is against our eslint rules.

in: query
name: assignees
description: >
  Filters the returned cases by assignees.
  Valid values are `none` or unique identifiers for the user profiles.
  These identifiers can be found by using the suggest user profile API.

would generate:

export type assignees = z.infer<typeof assignees>; // <-- ESLint error
export const assignees = z.array(...)

This PR adds a transformSchemaName option that allows to transform the schema names to PascalCase.

That allows us to generate the correct schema names without having to touch the API documentation yaml files.

This is the code that is generated with transformSchemaName set to pascalCase.

export type Assignees = z.infer<typeof Assignees>;
export const Assignees = z.array(...)

For now transformSchemaName only supports pascalCase but it can be extended in the future.

@janmonschke janmonschke added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting labels Jan 29, 2026
@janmonschke janmonschke requested a review from a team as a code owner January 29, 2026 09:57
@janmonschke janmonschke added the Team:Cases Security Solution Cases team label Jan 29, 2026
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-cases (Team:Cases)

@elastic-vault-github-plugin-prod elastic-vault-github-plugin-prod bot requested a review from a team as a code owner January 29, 2026 10:20
@elasticmachine
Copy link
Copy Markdown
Contributor

⏳ Build in-progress, with failures

Failed CI Steps

History

@janmonschke janmonschke added backport:all-open Backport to all branches that could still receive a release and removed backport:skip This PR does not require backporting labels Jan 29, 2026
Copy link
Copy Markdown
Contributor

@jaredburgettelastic jaredburgettelastic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM for Entity Analytics

Copy link
Copy Markdown
Contributor

@stephmilovic stephmilovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CR only, LGTM!

Copy link
Copy Markdown
Contributor

@rylnd rylnd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whitespace-only changes for Detection Engine 😅 . LGTM!

Copy link
Copy Markdown
Contributor

@szwarckonrad szwarckonrad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DW changes LGTM!

Copy link
Copy Markdown
Contributor

@nikitaindik nikitaindik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked the file changes and the generated output. It all looks good to me.

@michaelolo24 michaelolo24 merged commit cb8b556 into elastic:main Feb 4, 2026
16 checks passed
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 8.19, 9.1, 9.2, 9.3

https://github.com/elastic/kibana/actions/runs/21678037428

@kibanamachine
Copy link
Copy Markdown
Contributor

💔 All backports failed

Status Branch Result
8.19 Backport failed because of merge conflicts

You might need to backport the following PRs to 8.19:
- [DOCS][SECURITY] Updates API docs for Elastic Endpoint exceptions (#223053)
9.1 Backport failed because of merge conflicts
9.2 Backport failed because of merge conflicts
9.3 Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 250857

Questions ?

Please refer to the Backport tool documentation

@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Feb 5, 2026
@kibanamachine
Copy link
Copy Markdown
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 250857 locally
cc: @janmonschke

2 similar comments
@kibanamachine
Copy link
Copy Markdown
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 250857 locally
cc: @janmonschke

@kibanamachine
Copy link
Copy Markdown
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 250857 locally
cc: @janmonschke

@janmonschke
Copy link
Copy Markdown
Contributor Author

💚 All backports created successfully

Status Branch Result
9.3

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

janmonschke added a commit to janmonschke/kibana that referenced this pull request Feb 10, 2026
…#250857)

## Summary

If a yaml definition defines the type names in lowercase, like in the
cases codebase, the generator would generate lowercase type/schema
names. This is against our eslint rules.

```yaml
in: query
name: assignees
description: >
  Filters the returned cases by assignees.
  Valid values are `none` or unique identifiers for the user profiles.
  These identifiers can be found by using the suggest user profile API.
```

would generate:

```ts
export type assignees = z.infer<typeof assignees>; // <-- ESLint error
export const assignees = z.array(...)
```

This PR adds a transformSchemaName option that allows to transform the
schema names to `PascalCase`.

That allows us to generate the correct schema names without having to
touch the API documentation yaml files.

This is the code that is generated with `transformSchemaName` set to
`pascalCase`.

```ts
export type Assignees = z.infer<typeof Assignees>;
export const Assignees = z.array(...)
```

For now `transformSchemaName` only supports `pascalCase` but it can be
extended in the future.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Michael Olorunnisola <michael.olorunnisola@elastic.co>
(cherry picked from commit cb8b556)

# Conflicts:
#	x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_common.gen.ts
janmonschke added a commit to janmonschke/kibana that referenced this pull request Feb 10, 2026
…#250857)

## Summary

If a yaml definition defines the type names in lowercase, like in the
cases codebase, the generator would generate lowercase type/schema
names. This is against our eslint rules.

```yaml
in: query
name: assignees
description: >
  Filters the returned cases by assignees.
  Valid values are `none` or unique identifiers for the user profiles.
  These identifiers can be found by using the suggest user profile API.
```

would generate:

```ts
export type assignees = z.infer<typeof assignees>; // <-- ESLint error
export const assignees = z.array(...)
```

This PR adds a transformSchemaName option that allows to transform the
schema names to `PascalCase`.

That allows us to generate the correct schema names without having to
touch the API documentation yaml files.

This is the code that is generated with `transformSchemaName` set to
`pascalCase`.

```ts
export type Assignees = z.infer<typeof Assignees>;
export const Assignees = z.array(...)
```

For now `transformSchemaName` only supports `pascalCase` but it can be
extended in the future.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Michael Olorunnisola <michael.olorunnisola@elastic.co>
(cherry picked from commit cb8b556)

# Conflicts:
#	x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_common.gen.ts
#	x-pack/solutions/security/plugins/security_solution/common/api/endpoint/actions/file_download/file_download.gen.ts
#	x-pack/solutions/security/plugins/security_solution/common/api/endpoint/actions/file_info/file_info.gen.ts
#	x-pack/solutions/security/plugins/security_solution/common/api/endpoint/model/schema/common.gen.ts
#	x-pack/solutions/security/plugins/security_solution/common/api/entity_analytics/monitoring/monitoring_entity_source/monitoring_entity_source.gen.ts
@janmonschke
Copy link
Copy Markdown
Contributor Author

💚 All backports created successfully

Status Branch Result
9.2
9.1
8.19

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

janmonschke added a commit to janmonschke/kibana that referenced this pull request Feb 10, 2026
…#250857)

## Summary

If a yaml definition defines the type names in lowercase, like in the
cases codebase, the generator would generate lowercase type/schema
names. This is against our eslint rules.

```yaml
in: query
name: assignees
description: >
  Filters the returned cases by assignees.
  Valid values are `none` or unique identifiers for the user profiles.
  These identifiers can be found by using the suggest user profile API.
```

would generate:

```ts
export type assignees = z.infer<typeof assignees>; // <-- ESLint error
export const assignees = z.array(...)
```

This PR adds a transformSchemaName option that allows to transform the
schema names to `PascalCase`.

That allows us to generate the correct schema names without having to
touch the API documentation yaml files.

This is the code that is generated with `transformSchemaName` set to
`pascalCase`.

```ts
export type Assignees = z.infer<typeof Assignees>;
export const Assignees = z.array(...)
```

For now `transformSchemaName` only supports `pascalCase` but it can be
extended in the future.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Michael Olorunnisola <michael.olorunnisola@elastic.co>
(cherry picked from commit cb8b556)

# Conflicts:
#	src/platform/packages/shared/kbn-openapi-generator/src/parser/get_generation_context.ts
#	x-pack/platform/packages/shared/kbn-elastic-assistant-common/impl/schemas/attack_discovery/common_attributes.gen.ts
#	x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/import_exceptions/import_exceptions.gen.ts
#	x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_common.gen.ts
#	x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/import_list_items/import_list_items.gen.ts
#	x-pack/solutions/security/plugins/security_solution/common/api/endpoint/actions/file_download/file_download.gen.ts
#	x-pack/solutions/security/plugins/security_solution/common/api/endpoint/actions/file_info/file_info.gen.ts
#	x-pack/solutions/security/plugins/security_solution/common/api/endpoint/actions/response_actions/run_script/run_script.gen.ts
#	x-pack/solutions/security/plugins/security_solution/common/api/endpoint/model/schema/common.gen.ts
#	x-pack/solutions/security/plugins/security_solution/common/api/entity_analytics/monitoring/monitoring_entity_source/monitoring_entity_source.gen.ts
janmonschke added a commit that referenced this pull request Feb 10, 2026
…250857) (#252467)

# Backport

This will backport the following commits from `main` to `9.3`:
- [[OpenAPI generator] add `transformSchemaName` config options
(#250857)](#250857)

<!--- Backport version: 10.2.0 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Jan
Monschke","email":"jan.monschke@elastic.co"},"sourceCommit":{"committedDate":"2026-02-04T15:44:35Z","message":"[OpenAPI
generator] add `transformSchemaName` config options (#250857)\n\n##
Summary\n\nIf a yaml definition defines the type names in lowercase,
like in the\ncases codebase, the generator would generate lowercase
type/schema\nnames. This is against our eslint rules.\n\n```yaml\nin:
query\nname: assignees\ndescription: >\n Filters the returned cases by
assignees.\n Valid values are `none` or unique identifiers for the user
profiles.\n These identifiers can be found by using the suggest user
profile API.\n```\n\nwould generate:\n\n```ts\nexport type assignees =
z.infer<typeof assignees>; // <-- ESLint error\nexport const assignees =
z.array(...)\n```\n\nThis PR adds a transformSchemaName option that
allows to transform the\nschema names to `PascalCase`.\n\nThat allows us
to generate the correct schema names without having to\ntouch the API
documentation yaml files.\n\nThis is the code that is generated with
`transformSchemaName` set to\n`pascalCase`.\n\n```ts\nexport type
Assignees = z.infer<typeof Assignees>;\nexport const Assignees =
z.array(...)\n```\n\nFor now `transformSchemaName` only supports
`pascalCase` but it can be\nextended in the
future.\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by:
Michael Olorunnisola
<michael.olorunnisola@elastic.co>","sha":"cb8b5564dcd413630f3a21db9626e5d1d1bc585a","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport
missing","backport:all-open","Team:Cases","v9.4.0"],"title":"[OpenAPI
generator] add `transformSchemaName` config
options","number":250857,"url":"https://github.com/elastic/kibana/pull/250857","mergeCommit":{"message":"[OpenAPI
generator] add `transformSchemaName` config options (#250857)\n\n##
Summary\n\nIf a yaml definition defines the type names in lowercase,
like in the\ncases codebase, the generator would generate lowercase
type/schema\nnames. This is against our eslint rules.\n\n```yaml\nin:
query\nname: assignees\ndescription: >\n Filters the returned cases by
assignees.\n Valid values are `none` or unique identifiers for the user
profiles.\n These identifiers can be found by using the suggest user
profile API.\n```\n\nwould generate:\n\n```ts\nexport type assignees =
z.infer<typeof assignees>; // <-- ESLint error\nexport const assignees =
z.array(...)\n```\n\nThis PR adds a transformSchemaName option that
allows to transform the\nschema names to `PascalCase`.\n\nThat allows us
to generate the correct schema names without having to\ntouch the API
documentation yaml files.\n\nThis is the code that is generated with
`transformSchemaName` set to\n`pascalCase`.\n\n```ts\nexport type
Assignees = z.infer<typeof Assignees>;\nexport const Assignees =
z.array(...)\n```\n\nFor now `transformSchemaName` only supports
`pascalCase` but it can be\nextended in the
future.\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by:
Michael Olorunnisola
<michael.olorunnisola@elastic.co>","sha":"cb8b5564dcd413630f3a21db9626e5d1d1bc585a"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/250857","number":250857,"mergeCommit":{"message":"[OpenAPI
generator] add `transformSchemaName` config options (#250857)\n\n##
Summary\n\nIf a yaml definition defines the type names in lowercase,
like in the\ncases codebase, the generator would generate lowercase
type/schema\nnames. This is against our eslint rules.\n\n```yaml\nin:
query\nname: assignees\ndescription: >\n Filters the returned cases by
assignees.\n Valid values are `none` or unique identifiers for the user
profiles.\n These identifiers can be found by using the suggest user
profile API.\n```\n\nwould generate:\n\n```ts\nexport type assignees =
z.infer<typeof assignees>; // <-- ESLint error\nexport const assignees =
z.array(...)\n```\n\nThis PR adds a transformSchemaName option that
allows to transform the\nschema names to `PascalCase`.\n\nThat allows us
to generate the correct schema names without having to\ntouch the API
documentation yaml files.\n\nThis is the code that is generated with
`transformSchemaName` set to\n`pascalCase`.\n\n```ts\nexport type
Assignees = z.infer<typeof Assignees>;\nexport const Assignees =
z.array(...)\n```\n\nFor now `transformSchemaName` only supports
`pascalCase` but it can be\nextended in the
future.\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by:
Michael Olorunnisola
<michael.olorunnisola@elastic.co>","sha":"cb8b5564dcd413630f3a21db9626e5d1d1bc585a"}}]}]
BACKPORT-->
janmonschke added a commit that referenced this pull request Feb 10, 2026
…250857) (#252468)

# Backport

This will backport the following commits from `main` to `9.2`:
- [[OpenAPI generator] add `transformSchemaName` config options
(#250857)](#250857)

<!--- Backport version: 10.2.0 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Jan
Monschke","email":"jan.monschke@elastic.co"},"sourceCommit":{"committedDate":"2026-02-04T15:44:35Z","message":"[OpenAPI
generator] add `transformSchemaName` config options (#250857)\n\n##
Summary\n\nIf a yaml definition defines the type names in lowercase,
like in the\ncases codebase, the generator would generate lowercase
type/schema\nnames. This is against our eslint rules.\n\n```yaml\nin:
query\nname: assignees\ndescription: >\n Filters the returned cases by
assignees.\n Valid values are `none` or unique identifiers for the user
profiles.\n These identifiers can be found by using the suggest user
profile API.\n```\n\nwould generate:\n\n```ts\nexport type assignees =
z.infer<typeof assignees>; // <-- ESLint error\nexport const assignees =
z.array(...)\n```\n\nThis PR adds a transformSchemaName option that
allows to transform the\nschema names to `PascalCase`.\n\nThat allows us
to generate the correct schema names without having to\ntouch the API
documentation yaml files.\n\nThis is the code that is generated with
`transformSchemaName` set to\n`pascalCase`.\n\n```ts\nexport type
Assignees = z.infer<typeof Assignees>;\nexport const Assignees =
z.array(...)\n```\n\nFor now `transformSchemaName` only supports
`pascalCase` but it can be\nextended in the
future.\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by:
Michael Olorunnisola
<michael.olorunnisola@elastic.co>","sha":"cb8b5564dcd413630f3a21db9626e5d1d1bc585a","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport
missing","backport:all-open","Team:Cases","v9.4.0"],"title":"[OpenAPI
generator] add `transformSchemaName` config
options","number":250857,"url":"https://github.com/elastic/kibana/pull/250857","mergeCommit":{"message":"[OpenAPI
generator] add `transformSchemaName` config options (#250857)\n\n##
Summary\n\nIf a yaml definition defines the type names in lowercase,
like in the\ncases codebase, the generator would generate lowercase
type/schema\nnames. This is against our eslint rules.\n\n```yaml\nin:
query\nname: assignees\ndescription: >\n Filters the returned cases by
assignees.\n Valid values are `none` or unique identifiers for the user
profiles.\n These identifiers can be found by using the suggest user
profile API.\n```\n\nwould generate:\n\n```ts\nexport type assignees =
z.infer<typeof assignees>; // <-- ESLint error\nexport const assignees =
z.array(...)\n```\n\nThis PR adds a transformSchemaName option that
allows to transform the\nschema names to `PascalCase`.\n\nThat allows us
to generate the correct schema names without having to\ntouch the API
documentation yaml files.\n\nThis is the code that is generated with
`transformSchemaName` set to\n`pascalCase`.\n\n```ts\nexport type
Assignees = z.infer<typeof Assignees>;\nexport const Assignees =
z.array(...)\n```\n\nFor now `transformSchemaName` only supports
`pascalCase` but it can be\nextended in the
future.\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by:
Michael Olorunnisola
<michael.olorunnisola@elastic.co>","sha":"cb8b5564dcd413630f3a21db9626e5d1d1bc585a"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/250857","number":250857,"mergeCommit":{"message":"[OpenAPI
generator] add `transformSchemaName` config options (#250857)\n\n##
Summary\n\nIf a yaml definition defines the type names in lowercase,
like in the\ncases codebase, the generator would generate lowercase
type/schema\nnames. This is against our eslint rules.\n\n```yaml\nin:
query\nname: assignees\ndescription: >\n Filters the returned cases by
assignees.\n Valid values are `none` or unique identifiers for the user
profiles.\n These identifiers can be found by using the suggest user
profile API.\n```\n\nwould generate:\n\n```ts\nexport type assignees =
z.infer<typeof assignees>; // <-- ESLint error\nexport const assignees =
z.array(...)\n```\n\nThis PR adds a transformSchemaName option that
allows to transform the\nschema names to `PascalCase`.\n\nThat allows us
to generate the correct schema names without having to\ntouch the API
documentation yaml files.\n\nThis is the code that is generated with
`transformSchemaName` set to\n`pascalCase`.\n\n```ts\nexport type
Assignees = z.infer<typeof Assignees>;\nexport const Assignees =
z.array(...)\n```\n\nFor now `transformSchemaName` only supports
`pascalCase` but it can be\nextended in the
future.\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by:
Michael Olorunnisola
<michael.olorunnisola@elastic.co>","sha":"cb8b5564dcd413630f3a21db9626e5d1d1bc585a"}},{"url":"https://github.com/elastic/kibana/pull/252467","number":252467,"branch":"9.3","state":"OPEN"}]}]
BACKPORT-->

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
janmonschke added a commit that referenced this pull request Feb 10, 2026
…250857) (#252472)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[OpenAPI generator] add `transformSchemaName` config options
(#250857)](#250857)

<!--- Backport version: 10.2.0 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Jan
Monschke","email":"jan.monschke@elastic.co"},"sourceCommit":{"committedDate":"2026-02-04T15:44:35Z","message":"[OpenAPI
generator] add `transformSchemaName` config options (#250857)\n\n##
Summary\n\nIf a yaml definition defines the type names in lowercase,
like in the\ncases codebase, the generator would generate lowercase
type/schema\nnames. This is against our eslint rules.\n\n```yaml\nin:
query\nname: assignees\ndescription: >\n Filters the returned cases by
assignees.\n Valid values are `none` or unique identifiers for the user
profiles.\n These identifiers can be found by using the suggest user
profile API.\n```\n\nwould generate:\n\n```ts\nexport type assignees =
z.infer<typeof assignees>; // <-- ESLint error\nexport const assignees =
z.array(...)\n```\n\nThis PR adds a transformSchemaName option that
allows to transform the\nschema names to `PascalCase`.\n\nThat allows us
to generate the correct schema names without having to\ntouch the API
documentation yaml files.\n\nThis is the code that is generated with
`transformSchemaName` set to\n`pascalCase`.\n\n```ts\nexport type
Assignees = z.infer<typeof Assignees>;\nexport const Assignees =
z.array(...)\n```\n\nFor now `transformSchemaName` only supports
`pascalCase` but it can be\nextended in the
future.\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by:
Michael Olorunnisola
<michael.olorunnisola@elastic.co>","sha":"cb8b5564dcd413630f3a21db9626e5d1d1bc585a","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport
missing","backport:all-open","Team:Cases","v9.4.0"],"title":"[OpenAPI
generator] add `transformSchemaName` config
options","number":250857,"url":"https://github.com/elastic/kibana/pull/250857","mergeCommit":{"message":"[OpenAPI
generator] add `transformSchemaName` config options (#250857)\n\n##
Summary\n\nIf a yaml definition defines the type names in lowercase,
like in the\ncases codebase, the generator would generate lowercase
type/schema\nnames. This is against our eslint rules.\n\n```yaml\nin:
query\nname: assignees\ndescription: >\n Filters the returned cases by
assignees.\n Valid values are `none` or unique identifiers for the user
profiles.\n These identifiers can be found by using the suggest user
profile API.\n```\n\nwould generate:\n\n```ts\nexport type assignees =
z.infer<typeof assignees>; // <-- ESLint error\nexport const assignees =
z.array(...)\n```\n\nThis PR adds a transformSchemaName option that
allows to transform the\nschema names to `PascalCase`.\n\nThat allows us
to generate the correct schema names without having to\ntouch the API
documentation yaml files.\n\nThis is the code that is generated with
`transformSchemaName` set to\n`pascalCase`.\n\n```ts\nexport type
Assignees = z.infer<typeof Assignees>;\nexport const Assignees =
z.array(...)\n```\n\nFor now `transformSchemaName` only supports
`pascalCase` but it can be\nextended in the
future.\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by:
Michael Olorunnisola
<michael.olorunnisola@elastic.co>","sha":"cb8b5564dcd413630f3a21db9626e5d1d1bc585a"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/250857","number":250857,"mergeCommit":{"message":"[OpenAPI
generator] add `transformSchemaName` config options (#250857)\n\n##
Summary\n\nIf a yaml definition defines the type names in lowercase,
like in the\ncases codebase, the generator would generate lowercase
type/schema\nnames. This is against our eslint rules.\n\n```yaml\nin:
query\nname: assignees\ndescription: >\n Filters the returned cases by
assignees.\n Valid values are `none` or unique identifiers for the user
profiles.\n These identifiers can be found by using the suggest user
profile API.\n```\n\nwould generate:\n\n```ts\nexport type assignees =
z.infer<typeof assignees>; // <-- ESLint error\nexport const assignees =
z.array(...)\n```\n\nThis PR adds a transformSchemaName option that
allows to transform the\nschema names to `PascalCase`.\n\nThat allows us
to generate the correct schema names without having to\ntouch the API
documentation yaml files.\n\nThis is the code that is generated with
`transformSchemaName` set to\n`pascalCase`.\n\n```ts\nexport type
Assignees = z.infer<typeof Assignees>;\nexport const Assignees =
z.array(...)\n```\n\nFor now `transformSchemaName` only supports
`pascalCase` but it can be\nextended in the
future.\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by:
Michael Olorunnisola
<michael.olorunnisola@elastic.co>","sha":"cb8b5564dcd413630f3a21db9626e5d1d1bc585a"}},{"url":"https://github.com/elastic/kibana/pull/252467","number":252467,"branch":"9.3","state":"OPEN"}]}]
BACKPORT-->

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
@kibanamachine kibanamachine added v8.19.12 and removed backport missing Added to PRs automatically when the are determined to be missing a backport. labels Feb 10, 2026
janmonschke added a commit that referenced this pull request Feb 17, 2026
## Summary

Depends on #250857

Adds a new step to the CI that generates zod schemas from the API yaml
specifications

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
patrykkopycinski pushed a commit to patrykkopycinski/kibana that referenced this pull request Feb 19, 2026
…0913)

## Summary

Depends on elastic#250857

Adds a new step to the CI that generates zod schemas from the API yaml
specifications

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
ersin-erdal pushed a commit to ersin-erdal/kibana that referenced this pull request Feb 19, 2026
…0913)

## Summary

Depends on elastic#250857

Adds a new step to the CI that generates zod schemas from the API yaml
specifications

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:all-open Backport to all branches that could still receive a release release_note:skip Skip the PR/issue when compiling release notes Team:Cases Security Solution Cases team v8.19.12 v9.2.6 v9.3.0 v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.