Skip to content

Commit

Permalink
Add get-settings spec for /settings endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
John Schulz committed Jul 22, 2021
1 parent 7d98448 commit da25a60
Show file tree
Hide file tree
Showing 5 changed files with 120 additions and 0 deletions.
52 changes: 52 additions & 0 deletions x-pack/plugins/fleet/common/openapi/bundled.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,25 @@
]
}
},
"/settings": {
"get": {
"summary": "Settings",
"tags": [],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/fleet_settings_response"
}
}
}
}
},
"operationId": "get-settings"
}
},
"/epm/categories": {
"get": {
"summary": "Package categories",
Expand Down Expand Up @@ -1775,6 +1794,39 @@
"nonFatalErrors"
]
},
"fleet_settings_response": {
"title": "Fleet Setup response",
"type": "object",
"properties": {
"response": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"has_seen_add_data_notice": {
"type": "boolean"
},
"has_seen_fleet_migration_notice": {
"type": "boolean"
},
"fleet_server_hosts": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"fleet_server_hosts",
"id"
]
}
},
"required": [
"response"
]
},
"search_result": {
"title": "Search result",
"type": "object",
Expand Down
34 changes: 34 additions & 0 deletions x-pack/plugins/fleet/common/openapi/bundled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,18 @@ paths:
operationId: setup
parameters:
- $ref: '#/components/parameters/kbn_xsrf'
/settings:
get:
summary: Settings
tags: []
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/fleet_settings_response'
operationId: get-settings
/epm/categories:
get:
summary: Package categories
Expand Down Expand Up @@ -1086,6 +1098,28 @@ components:
required:
- isInitialized
- nonFatalErrors
fleet_settings_response:
title: Fleet Setup response
type: object
properties:
response:
type: object
properties:
id:
type: string
has_seen_add_data_notice:
type: boolean
has_seen_fleet_migration_notice:
type: boolean
fleet_server_hosts:
type: array
items:
type: string
required:
- fleet_server_hosts
- id
required:
- response
search_result:
title: Search result
type: object
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
title: Fleet Setup response
type: object
properties:
response:
type: object
properties:
id:
type: string
has_seen_add_data_notice:
type: boolean
has_seen_fleet_migration_notice:
type: boolean
fleet_server_hosts:
type: array
items:
type: string
required:
- fleet_server_hosts
- id
required:
- response
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 @@ -16,6 +16,8 @@ paths:
# plugin-wide endpoint(s)
/setup:
$ref: paths/setup.yaml
/settings:
$ref: paths/settings.yaml
# EPM / integrations endpoints
/epm/categories:
$ref: paths/[email protected]
Expand Down
11 changes: 11 additions & 0 deletions x-pack/plugins/fleet/common/openapi/paths/settings.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
get:
summary: Settings
tags: []
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: ../components/schemas/fleet_settings_response.yaml
operationId: get-settings

0 comments on commit da25a60

Please sign in to comment.