-
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
[Security GenAI][Integration Assistant] Create OpenAPI spec for Integration Assistant APIs #186085
Conversation
@elasticmachine merge upstream |
/ci |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
/ci |
/ci |
@elasticmachine merge upstream |
/ci |
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Public APIs missing comments
Public APIs missing exports
History
To update your PR or re-run it, just comment with: cc @bhapas |
…193243) ## Summary #186085 introduced OpenAPI spec for Automatic Import APIs. Since there was a [bug](#186221) `x-codegen-enabled` was set to `false`. This PR modifies it to `true` and `node scripts/generate_openapi` generated new API classes for the spec. ### 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 ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
…lastic#193243) ## Summary elastic#186085 introduced OpenAPI spec for Automatic Import APIs. Since there was a [bug](elastic#186221) `x-codegen-enabled` was set to `false`. This PR modifies it to `true` and `node scripts/generate_openapi` generated new API classes for the spec. ### 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 ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) (cherry picked from commit e4180d2)
…lastic#193243) ## Summary elastic#186085 introduced OpenAPI spec for Automatic Import APIs. Since there was a [bug](elastic#186221) `x-codegen-enabled` was set to `false`. This PR modifies it to `true` and `node scripts/generate_openapi` generated new API classes for the spec. ### 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 ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) (cherry picked from commit e4180d2) # Conflicts: # x-pack/plugins/integration_assistant/common/api/build_integration/build_integration.gen.ts # x-pack/plugins/integration_assistant/common/api/categorization/categorization_route.gen.ts # x-pack/plugins/integration_assistant/common/api/check_pipeline/check_pipeline.gen.ts # x-pack/plugins/integration_assistant/common/api/model/common_attributes.gen.ts # x-pack/plugins/integration_assistant/common/api/model/processor_attributes.ts # x-pack/plugins/integration_assistant/common/api/related/related_route.gen.ts
… code (#193243) (#193297) # Backport This will backport the following commits from `main` to `8.15`: - [[Automatic Import] Modify codegen to autogenerate openAPI spec code (#193243)](#193243) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Bharat Pasupula","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-09-18T13:02:24Z","message":"[Automatic Import] Modify codegen to autogenerate openAPI spec code (#193243)\n\n## Summary\r\n\r\nhttps://github.com//pull/186085 introduced OpenAPI spec\r\nfor Automatic Import APIs. Since there was a\r\n[bug](#186221) `x-codegen-enabled`\r\nwas set to `false`.\r\n\r\nThis PR modifies it to `true` and `node scripts/generate_openapi`\r\ngenerated new API classes for the spec.\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\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"e4180d211a06513cf51328da090ea14315880201","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","v9.0.0","backport:prev-major","Team:Security-Scalability","Feature:AutomaticImport"],"number":193243,"url":"https://github.com/elastic/kibana/pull/193243","mergeCommit":{"message":"[Automatic Import] Modify codegen to autogenerate openAPI spec code (#193243)\n\n## Summary\r\n\r\nhttps://github.com//pull/186085 introduced OpenAPI spec\r\nfor Automatic Import APIs. Since there was a\r\n[bug](#186221) `x-codegen-enabled`\r\nwas set to `false`.\r\n\r\nThis PR modifies it to `true` and `node scripts/generate_openapi`\r\ngenerated new API classes for the spec.\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\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"e4180d211a06513cf51328da090ea14315880201"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/193243","number":193243,"mergeCommit":{"message":"[Automatic Import] Modify codegen to autogenerate openAPI spec code (#193243)\n\n## Summary\r\n\r\nhttps://github.com//pull/186085 introduced OpenAPI spec\r\nfor Automatic Import APIs. Since there was a\r\n[bug](#186221) `x-codegen-enabled`\r\nwas set to `false`.\r\n\r\nThis PR modifies it to `true` and `node scripts/generate_openapi`\r\ngenerated new API classes for the spec.\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\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"e4180d211a06513cf51328da090ea14315880201"}},{"url":"https://github.com/elastic/kibana/pull/193290","number":193290,"branch":"8.x","state":"OPEN"}]}] BACKPORT-->
…code (#193243) (#193290) # Backport This will backport the following commits from `main` to `8.x`: - [[Automatic Import] Modify codegen to autogenerate openAPI spec code (#193243)](#193243) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Bharat Pasupula","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-09-18T13:02:24Z","message":"[Automatic Import] Modify codegen to autogenerate openAPI spec code (#193243)\n\n## Summary\r\n\r\nhttps://github.com//pull/186085 introduced OpenAPI spec\r\nfor Automatic Import APIs. Since there was a\r\n[bug](#186221) `x-codegen-enabled`\r\nwas set to `false`.\r\n\r\nThis PR modifies it to `true` and `node scripts/generate_openapi`\r\ngenerated new API classes for the spec.\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\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"e4180d211a06513cf51328da090ea14315880201","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","v9.0.0","backport:prev-major","Team:Security-Scalability","Feature:AutomaticImport"],"title":"[Automatic Import] Modify codegen to autogenerate openAPI spec code","number":193243,"url":"https://github.com/elastic/kibana/pull/193243","mergeCommit":{"message":"[Automatic Import] Modify codegen to autogenerate openAPI spec code (#193243)\n\n## Summary\r\n\r\nhttps://github.com//pull/186085 introduced OpenAPI spec\r\nfor Automatic Import APIs. Since there was a\r\n[bug](#186221) `x-codegen-enabled`\r\nwas set to `false`.\r\n\r\nThis PR modifies it to `true` and `node scripts/generate_openapi`\r\ngenerated new API classes for the spec.\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\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"e4180d211a06513cf51328da090ea14315880201"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/193243","number":193243,"mergeCommit":{"message":"[Automatic Import] Modify codegen to autogenerate openAPI spec code (#193243)\n\n## Summary\r\n\r\nhttps://github.com//pull/186085 introduced OpenAPI spec\r\nfor Automatic Import APIs. Since there was a\r\n[bug](#186221) `x-codegen-enabled`\r\nwas set to `false`.\r\n\r\nThis PR modifies it to `true` and `node scripts/generate_openapi`\r\ngenerated new API classes for the spec.\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\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"e4180d211a06513cf51328da090ea14315880201"}}]}] BACKPORT--> Co-authored-by: Bharat Pasupula <[email protected]>
Summary
This PR adds OpenAPI spec to the integration assistant APIs introduced in #184296
Follow-up changes
Had a discussion with @maximpn and realized that currently
zod library
does not support recursion and a workaround is followed.Hence the
xpack-codegen-enabled
is set tofalse
and the generatedTS
files are renamed to remove.gen
from the naming to keep them static until a fix is in place.Checklist
Delete any items that are not applicable to this PR.
Risk Matrix
Delete this section if it is not applicable to this PR.
Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.
When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:
For maintainers