Skip to content
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

[DOCS] Fix optional create connector id #157031

Merged
merged 3 commits into from
May 9, 2023
Merged

Conversation

lcawl
Copy link
Contributor

@lcawl lcawl commented May 8, 2023

Summary

Relates to #155392

This PR fixes the following linting error in the connector API specifications:

npx @redocly/cli lint bundled.json
...
Path parameter `id` is not used in the path `/s/{spaceId}/api/actions/connector`.

43 | {
44 |   "in": "path",
45 |   "name": "id",
46 |   "description": "An UUID v1 or v4 identifier for the connector. If you omit this parameter, an identifier is randomly generated.\n",
47 |   "required": true,

Error was generated by the path-parameters-defined rule.
...
❌ Validation failed with 1 error.

Though the id path parameter is "optional", that's not something supported by OAS. Per https://spec.openapis.org/oas/v3.0.1#parameter-object, "If the parameter location is “path”, this property is REQUIRED and its value MUST be true". Therefore to support both use cases, we need two copies of the "create connector" API--one with and one without that parameter, which is what I've added here.

@lcawl lcawl added release_note:skip Skip the PR/issue when compiling release notes docs Feature:Actions/ConnectorsManagement Issues related to Connectors Management UX backport:prev-minor Backport to (9.0) the previous minor version (i.e. one version back from main) v8.8.0 v8.9.0 labels May 8, 2023
@apmmachine
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@lcawl lcawl marked this pull request as ready for review May 8, 2023 19:27
@lcawl lcawl requested a review from a team as a code owner May 8, 2023 19:27
@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Unknown metric groups

ESLint disabled line counts

id before after diff
enterpriseSearch 19 21 +2
securitySolution 399 403 +4
total +6

Total ESLint disabled count

id before after diff
enterpriseSearch 20 22 +2
securitySolution 479 483 +4
total +6

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@lcawl lcawl merged commit f7a3462 into elastic:main May 9, 2023
@lcawl lcawl deleted the connector-id-oas branch May 9, 2023 14:20
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request May 9, 2023
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.8

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

Questions ?

Please refer to the Backport tool documentation

lcawl added a commit that referenced this pull request May 9, 2023
# Backport

This will backport the following commits from `main` to `8.8`:
- [[DOCS] Fix optional create connector id
(#157031)](#157031)

<!--- Backport version: 8.9.7 -->

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

<!--BACKPORT [{"author":{"name":"Lisa
Cawley","email":"lcawley@elastic.co"},"sourceCommit":{"committedDate":"2023-05-09T14:20:30Z","message":"[DOCS]
Fix optional create connector id
(#157031)","sha":"f7a34628084c8f6916ef3dee7898063e00359407","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","docs","Feature:Actions/ConnectorsManagement","backport:prev-minor","v8.8.0","v8.9.0"],"number":157031,"url":"https://github.com/elastic/kibana/pull/157031","mergeCommit":{"message":"[DOCS]
Fix optional create connector id
(#157031)","sha":"f7a34628084c8f6916ef3dee7898063e00359407"}},"sourceBranch":"main","suggestedTargetBranches":["8.8"],"targetPullRequestStates":[{"branch":"8.8","label":"v8.8.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/157031","number":157031,"mergeCommit":{"message":"[DOCS]
Fix optional create connector id
(#157031)","sha":"f7a34628084c8f6916ef3dee7898063e00359407"}}]}]
BACKPORT-->

Co-authored-by: Lisa Cawley <lcawley@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (9.0) the previous minor version (i.e. one version back from main) docs Feature:Actions/ConnectorsManagement Issues related to Connectors Management UX release_note:skip Skip the PR/issue when compiling release notes v8.8.0 v8.9.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants