-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[OAS] Fix handling of schema.nullable
to path and query params
#197046
[OAS] Fix handling of schema.nullable
to path and query params
#197046
Conversation
/ci |
Pinging @elastic/kibana-core (Team:Core) |
@@ -88,12 +88,17 @@ const convertObjectMembersToParameterObjects = ( | |||
knownParameters: KnownParameters = {}, | |||
isPathParameter = false | |||
) => { | |||
let properties: Exclude<OpenAPIV3.SchemaObject['properties'], undefined>; | |||
let properties: undefined | Exclude<OpenAPIV3.SchemaObject['properties'], undefined>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT can't properties
be simply:
let properties: OpenAPIV3.SchemaObject['properties'];
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Starting backport for target branches: 8.x |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]
History
cc @jloleysens |
…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)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…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>
Summary
Fixes handling of
schema.nullable(schema.object({..}))
to params and query inputs. Example in the wild.Checklist