Skip to content

Commit

Permalink
Add update-settings. Fix error w/get-settings
Browse files Browse the repository at this point in the history
  • Loading branch information
John Schulz committed Jul 22, 2021
1 parent 0c1be7e commit 446413d
Show file tree
Hide file tree
Showing 5 changed files with 109 additions and 61 deletions.
71 changes: 46 additions & 25 deletions x-pack/plugins/fleet/common/openapi/bundled.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,23 @@
}
},
"operationId": "get-settings"
},
"post": {
"summary": "Settings - Update",
"tags": [],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/fleet_settings_response"
}
}
}
}
},
"operationId": "update-settings"
}
},
"/epm/categories": {
Expand Down Expand Up @@ -1919,37 +1936,41 @@
"nonFatalErrors"
]
},
"settings": {
"title": "Settings",
"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"
]
},
"fleet_settings_response": {
"title": "Fleet Setup response",
"title": "Fleet settings 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"
]
"item": {
"$ref": "#/components/schemas/settings"
}
},
"required": [
"response"
"item"
]
},
"search_result": {
Expand Down
50 changes: 32 additions & 18 deletions x-pack/plugins/fleet/common/openapi/bundled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,17 @@ paths:
schema:
$ref: '#/components/schemas/fleet_settings_response'
operationId: get-settings
post:
summary: Settings - Update
tags: []
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/fleet_settings_response'
operationId: update-settings
/epm/categories:
get:
summary: Package categories
Expand Down Expand Up @@ -1175,28 +1186,31 @@ components:
required:
- isInitialized
- nonFatalErrors
settings:
title: Settings
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
fleet_settings_response:
title: Fleet Setup response
title: Fleet settings 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
item:
$ref: '#/components/schemas/settings'
required:
- response
- item
search_result:
title: Search result
type: object
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,7 @@
title: Fleet Setup response
title: Fleet settings 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
item:
$ref: ./settings.yaml
required:
- response
- item
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
title: Settings
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
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
Expand Up @@ -9,3 +9,14 @@ get:
schema:
$ref: ../components/schemas/fleet_settings_response.yaml
operationId: get-settings
post:
summary: Settings - Update
tags: []
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: ../components/schemas/fleet_settings_response.yaml
operationId: update-settings

0 comments on commit 446413d

Please sign in to comment.