Skip to content

Commit

Permalink
[8.12] [Fleet] Add documentation about transforms/authorize endpoint …
Browse files Browse the repository at this point in the history
…in openapi (#176610) (#176688)

# Backport

This will backport the following commits from `main` to `8.12`:
- [[Fleet] Add documentation about transforms/authorize endpoint in
openapi (#176610)](#176610)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Cristina
Amico","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-02-12T11:56:06Z","message":"[Fleet]
Add documentation about transforms/authorize endpoint in openapi
(#176610)\n\n## Summary\r\n\r\nPR to address missing openapi docs about
thie following endpoint - it\r\nwas added a while ago but we forgot to
update the
docs.\r\n\r\n```\r\napi/fleet/epm/packages/{pkgName}/{pkgVersion}/transforms/authorize\r\n{\r\n
\"transforms\": [\r\n {\r\n \"transformId\": <transform_id>\r\n }\r\n
]\r\n}\r\n```\r\n\r\n\r\n### Checklist\r\n- [
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or
tutorials\r\n\r\nCo-authored-by: Kibana Machine
<[email protected]>","sha":"87de70fd581fa5a0916d43854a2366eb85e3460a","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","backport:prev-minor","v8.13.0"],"title":"[Fleet]
Add documentation about transforms/authorize endpoint in
openapi","number":176610,"url":"https://github.com/elastic/kibana/pull/176610","mergeCommit":{"message":"[Fleet]
Add documentation about transforms/authorize endpoint in openapi
(#176610)\n\n## Summary\r\n\r\nPR to address missing openapi docs about
thie following endpoint - it\r\nwas added a while ago but we forgot to
update the
docs.\r\n\r\n```\r\napi/fleet/epm/packages/{pkgName}/{pkgVersion}/transforms/authorize\r\n{\r\n
\"transforms\": [\r\n {\r\n \"transformId\": <transform_id>\r\n }\r\n
]\r\n}\r\n```\r\n\r\n\r\n### Checklist\r\n- [
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or
tutorials\r\n\r\nCo-authored-by: Kibana Machine
<[email protected]>","sha":"87de70fd581fa5a0916d43854a2366eb85e3460a"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.13.0","branchLabelMappingKey":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/176610","number":176610,"mergeCommit":{"message":"[Fleet]
Add documentation about transforms/authorize endpoint in openapi
(#176610)\n\n## Summary\r\n\r\nPR to address missing openapi docs about
thie following endpoint - it\r\nwas added a while ago but we forgot to
update the
docs.\r\n\r\n```\r\napi/fleet/epm/packages/{pkgName}/{pkgVersion}/transforms/authorize\r\n{\r\n
\"transforms\": [\r\n {\r\n \"transformId\": <transform_id>\r\n }\r\n
]\r\n}\r\n```\r\n\r\n\r\n### Checklist\r\n- [
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or
tutorials\r\n\r\nCo-authored-by: Kibana Machine
<[email protected]>","sha":"87de70fd581fa5a0916d43854a2366eb85e3460a"}}]}]
BACKPORT-->

Co-authored-by: Cristina Amico <[email protected]>
  • Loading branch information
kibanamachine and criamico authored Feb 12, 2024
1 parent bf9b01d commit 867e4b5
Show file tree
Hide file tree
Showing 3 changed files with 169 additions and 0 deletions.
103 changes: 103 additions & 0 deletions x-pack/plugins/fleet/common/openapi/bundled.json
Original file line number Diff line number Diff line change
Expand Up @@ -1312,6 +1312,109 @@
}
}
},
"/epm/packages/{pkgName}/{pkgVersion}/transforms/authorize": {
"post": {
"summary": "Authorize transforms",
"tags": [
"Elastic Package Manager (EPM)"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"transformId": {
"type": "string"
},
"success": {
"type": "boolean"
},
"error": {
"type": "string"
}
},
"required": [
"transformId",
"error"
]
}
}
},
"required": [
"items"
]
}
}
}
},
"400": {
"$ref": "#/components/responses/error"
}
},
"operationId": "reauthorize-transforms",
"description": "",
"parameters": [
{
"$ref": "#/components/parameters/kbn_xsrf"
},
{
"schema": {
"type": "string"
},
"name": "pkgName",
"in": "path",
"required": true
},
{
"schema": {
"type": "string"
},
"name": "pkgVersion",
"in": "path",
"required": true
},
{
"in": "query",
"name": "prerelease",
"schema": {
"type": "boolean",
"default": false
},
"description": "Whether to include prerelease packages in categories count (e.g. beta, rc, preview)"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"transforms": {
"type": "array",
"items": {
"type": "object",
"properties": {
"transformId": {
"type": "string"
}
}
}
}
}
}
}
}
}
}
},
"/epm/packages/{pkgName}/{pkgVersion}/{filePath}": {
"get": {
"summary": "Get package file",
Expand Down
2 changes: 2 additions & 0 deletions x-pack/plugins/fleet/common/openapi/entrypoint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ paths:
$ref: 'paths/epm@packages@{pkgkey}_deprecated.yaml'
'/epm/packages/{pkgName}/{pkgVersion}':
$ref: 'paths/epm@packages@{pkg_name}@{pkg_version}.yaml'
'/epm/packages/{pkgName}/{pkgVersion}/transforms/authorize':
$ref: 'paths/epm@packages@{pkg_name}@{pkg_version}@[email protected]'
'/epm/packages/{pkgName}/{pkgVersion}/{filePath}':
$ref: paths/epm@get_file.yaml
'/epm/packages/{pkgName}/stats':
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
post:
summary: Authorize transforms
tags:
- Elastic Package Manager (EPM)
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
items:
type: array
items:
type: object
properties:
transformId:
type: string
success:
type: boolean
error:
type: string
required:
- transformId
- error
required:
- items
'400':
$ref: ../components/responses/error.yaml
operationId: reauthorize-transforms
description: ''
parameters:
- $ref: ../components/headers/kbn_xsrf.yaml
- schema:
type: string
name: pkgName
in: path
required: true
- schema:
type: string
name: pkgVersion
in: path
required: true
- in: query
name: prerelease
schema:
type: boolean
default: false
description: >-
Whether to include prerelease packages in categories count (e.g. beta, rc, preview)
requestBody:
content:
application/json:
schema:
type: object
properties:
transforms:
type: array
items:
type: object
properties:
transformId:
type: string

0 comments on commit 867e4b5

Please sign in to comment.