[OAS] Fix handling of schema.nullable to path and query params#197046
Merged
jloleysens merged 4 commits intoelastic:mainfrom Oct 25, 2024
Merged
[OAS] Fix handling of schema.nullable to path and query params#197046jloleysens merged 4 commits intoelastic:mainfrom
schema.nullable to path and query params#197046jloleysens merged 4 commits intoelastic:mainfrom
Conversation
Contributor
Author
|
/ci |
Contributor
|
Pinging @elastic/kibana-core (Team:Core) |
gsoldevila
reviewed
Oct 24, 2024
| isPathParameter = false | ||
| ) => { | ||
| let properties: Exclude<OpenAPIV3.SchemaObject['properties'], undefined>; | ||
| let properties: undefined | Exclude<OpenAPIV3.SchemaObject['properties'], undefined>; |
Member
There was a problem hiding this comment.
NIT can't properties be simply:
let properties: OpenAPIV3.SchemaObject['properties'];
Contributor
|
Starting backport for target branches: 8.x |
Contributor
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]
History
cc @jloleysens |
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Oct 25, 2024
…stic#197046) ## Summary Fixes handling of `schema.nullable(schema.object({..}))` to params and query inputs. [Example in the wild](https://github.com/jloleysens/kibana/blob/83e76cb4d854a3c3f9ffdaad8c6ee29d66d56710/x-pack/plugins/reporting/server/routes/common/generate/request_handler.ts#L33). ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios (cherry picked from commit d3569f6)
Contributor
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
kibanamachine
added a commit
that referenced
this pull request
Oct 25, 2024
…uery params (#197046) (#197801) # Backport This will backport the following commits from `main` to `8.x`: - [[OAS] Fix handling of `schema.nullable` to path and query params (#197046)](#197046) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Jean-Louis Leysens","email":"jeanlouis.leysens@elastic.co"},"sourceCommit":{"committedDate":"2024-10-25T11:11:14Z","message":"[OAS] Fix handling of `schema.nullable` to path and query params (#197046)\n\n## Summary\r\n\r\nFixes handling of `schema.nullable(schema.object({..}))` to params and\r\nquery inputs. [Example in the\r\nwild](https://github.com/jloleysens/kibana/blob/83e76cb4d854a3c3f9ffdaad8c6ee29d66d56710/x-pack/plugins/reporting/server/routes/common/generate/request_handler.ts#L33).\r\n\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"d3569f609acd3a6f1f012bbf684d5bea9e3f1424","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Core","release_note:skip","v9.0.0","Feature:OAS","backport:version","v8.17.0"],"title":"[OAS] Fix handling of `schema.nullable` to path and query params","number":197046,"url":"https://github.com/elastic/kibana/pull/197046","mergeCommit":{"message":"[OAS] Fix handling of `schema.nullable` to path and query params (#197046)\n\n## Summary\r\n\r\nFixes handling of `schema.nullable(schema.object({..}))` to params and\r\nquery inputs. [Example in the\r\nwild](https://github.com/jloleysens/kibana/blob/83e76cb4d854a3c3f9ffdaad8c6ee29d66d56710/x-pack/plugins/reporting/server/routes/common/generate/request_handler.ts#L33).\r\n\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"d3569f609acd3a6f1f012bbf684d5bea9e3f1424"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/197046","number":197046,"mergeCommit":{"message":"[OAS] Fix handling of `schema.nullable` to path and query params (#197046)\n\n## Summary\r\n\r\nFixes handling of `schema.nullable(schema.object({..}))` to params and\r\nquery inputs. [Example in the\r\nwild](https://github.com/jloleysens/kibana/blob/83e76cb4d854a3c3f9ffdaad8c6ee29d66d56710/x-pack/plugins/reporting/server/routes/common/generate/request_handler.ts#L33).\r\n\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"d3569f609acd3a6f1f012bbf684d5bea9e3f1424"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Jean-Louis Leysens <jeanlouis.leysens@elastic.co>
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.
Summary
Fixes handling of
schema.nullable(schema.object({..}))to params and query inputs. Example in the wild.Checklist