Skip to content

Commit

Permalink
Fix openapi spec and add new fields
Browse files Browse the repository at this point in the history
  • Loading branch information
jen-huang committed Aug 4, 2022
1 parent 447a608 commit c59fefb
Show file tree
Hide file tree
Showing 4 changed files with 198 additions and 90 deletions.
129 changes: 84 additions & 45 deletions x-pack/plugins/fleet/common/openapi/bundled.json
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,18 @@
]
},
"savedObject": {
"type": "object"
},
"latestVersion": {
"type": "string"
},
"keepPoliciesUpToDate": {
"type": "boolean"
},
"notice": {
"type": "string"
},
"licensePath": {
"type": "string"
}
},
Expand Down Expand Up @@ -3914,6 +3926,26 @@
"version": {
"type": "string"
},
"release": {
"type": "string",
"enum": [
"experimental",
"beta",
"ga"
]
},
"source": {
"type": "object",
"properties": {
"license": {
"type": "string",
"enum": [
"Apache-2.0",
"Elastic-2.0"
]
}
}
},
"readme": {
"type": "string"
},
Expand All @@ -3929,34 +3961,32 @@
"type": "string"
}
},
"requirement": {
"oneOf": [
{
"conditions": {
"type": "object",
"properties": {
"kibana": {
"type": "object",
"properties": {
"kibana": {
"type": "object",
"properties": {
"versions": {
"type": "string"
}
}
"versions": {
"type": "string"
}
}
},
{
"elasticsearch": {
"type": "object",
"properties": {
"elasticsearch": {
"type": "object",
"properties": {
"versions": {
"type": "string"
}
}
"subscription": {
"type": "string",
"enum": [
"basic",
"gold",
"platinum",
"enterprise"
]
}
}
}
],
"type": "object"
}
},
"screenshots": {
"type": "array",
Expand Down Expand Up @@ -4060,6 +4090,22 @@
},
"path": {
"type": "string"
},
"elasticsearch": {
"type": "object",
"properties": {
"privileges": {
"type": "object",
"properties": {
"cluster": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
},
"required": [
Expand All @@ -4069,7 +4115,7 @@
"description",
"type",
"categories",
"requirement",
"conditions",
"assets",
"format_version",
"download",
Expand Down Expand Up @@ -4306,6 +4352,10 @@
"description": "list of agent IDs"
}
]
},
"force": {
"type": "boolean",
"description": "Force upgrade, skipping validation (should be used with caution)"
}
},
"required": [
Expand All @@ -4315,32 +4365,21 @@
},
"upgrade_agent": {
"title": "Upgrade agent",
"oneOf": [
{
"type": "object",
"properties": {
"version": {
"type": "string"
}
},
"required": [
"version"
]
"type": "object",
"properties": {
"version": {
"type": "string"
},
{
"type": "object",
"properties": {
"version": {
"type": "string"
},
"source_uri": {
"type": "string"
}
},
"required": [
"version"
]
"source_uri": {
"type": "string"
},
"force": {
"type": "boolean",
"description": "Force upgrade, skipping validation (should be used with caution)"
}
},
"required": [
"version"
]
},
"agent_action": {
Expand Down
94 changes: 64 additions & 30 deletions x-pack/plugins/fleet/common/openapi/bundled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,14 @@ paths:
- install_failed
- not_installed
savedObject:
type: object
latestVersion:
type: string
keepPoliciesUpToDate:
type: boolean
notice:
type: string
licensePath:
type: string
required:
- status
Expand Down Expand Up @@ -2442,6 +2450,20 @@ components:
type: string
version:
type: string
release:
type: string
enum:
- experimental
- beta
- ga
source:
type: object
properties:
license:
type: string
enum:
- Apache-2.0
- Elastic-2.0
readme:
type: string
description:
Expand All @@ -2452,21 +2474,24 @@ components:
type: array
items:
type: string
requirement:
oneOf:
- properties:
kibana:
type: object
properties:
versions:
type: string
- properties:
elasticsearch:
type: object
properties:
versions:
type: string
conditions:
type: object
properties:
kibana:
type: object
properties:
versions:
type: string
elasticsearch:
type: object
properties:
subscription:
type: string
enum:
- basic
- gold
- platinum
- enterprise
screenshots:
type: array
items:
Expand Down Expand Up @@ -2537,14 +2562,24 @@ components:
type: string
path:
type: string
elasticsearch:
type: object
properties:
privileges:
type: object
properties:
cluster:
type: array
items:
type: string
required:
- name
- title
- version
- description
- type
- categories
- requirement
- conditions
- assets
- format_version
- download
Expand Down Expand Up @@ -2716,26 +2751,25 @@ components:
items:
type: string
description: list of agent IDs
force:
type: boolean
description: Force upgrade, skipping validation (should be used with caution)
required:
- agents
- version
upgrade_agent:
title: Upgrade agent
oneOf:
- type: object
properties:
version:
type: string
required:
- version
- type: object
properties:
version:
type: string
source_uri:
type: string
required:
- version
type: object
properties:
version:
type: string
source_uri:
type: string
force:
type: boolean
description: Force upgrade, skipping validation (should be used with caution)
required:
- version
agent_action:
title: Agent action
oneOf:
Expand Down
Loading

0 comments on commit c59fefb

Please sign in to comment.