[9.3] [OpenAPI generator] add transformSchemaName config options (#250857)#252467
Merged
janmonschke merged 1 commit intoelastic:9.3from Feb 10, 2026
Merged
[9.3] [OpenAPI generator] add transformSchemaName config options (#250857)#252467janmonschke merged 1 commit intoelastic:9.3from
transformSchemaName config options (#250857)#252467janmonschke merged 1 commit intoelastic:9.3from
Conversation
…#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
Contributor
💚 Build Succeeded
Metrics [docs] |
lgestc
approved these changes
Feb 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport
This will backport the following commits from
mainto9.3:transformSchemaNameconfig options (#250857)Questions ?
Please refer to the Backport tool documentation