Skip to content

Commit

Permalink
Add enum of values for delete package response
Browse files Browse the repository at this point in the history
  • Loading branch information
John Schulz committed Jul 21, 2021
1 parent e002831 commit 5c04dfc
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 3 deletions.
35 changes: 34 additions & 1 deletion x-pack/plugins/fleet/common/openapi/bundled.json
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,14 @@
"type": "string"
},
"type": {
"type": "string"
"oneOf": [
{
"$ref": "#/components/schemas/kibana_saved_object_type"
},
{
"$ref": "#/components/schemas/elasticsearch_asset_type"
}
]
}
},
"required": [
Expand Down Expand Up @@ -1689,6 +1696,32 @@
"path"
]
},
"kibana_saved_object_type": {
"title": "Kibana saved object asset type",
"type": "string",
"enum": [
"dashboard",
"visualization",
"search",
"index-pattern",
"map",
"lens",
"ml-module",
"security-rule"
]
},
"elasticsearch_asset_type": {
"title": "Elasticsearch asset type",
"type": "string",
"enum": [
"component_template",
"ingest_pipeline",
"index_template",
"ilm_policy",
"transform",
"data_stream_ilm_policy"
]
},
"agent_type": {
"type": "string",
"title": "Agent type",
Expand Down
26 changes: 25 additions & 1 deletion x-pack/plugins/fleet/common/openapi/bundled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,9 @@ paths:
id:
type: string
type:
type: string
oneOf:
- $ref: '#/components/schemas/kibana_saved_object_type'
- $ref: '#/components/schemas/elasticsearch_asset_type'
required:
- id
- type
Expand Down Expand Up @@ -1059,6 +1061,28 @@ components:
- format_version
- download
- path
kibana_saved_object_type:
title: Kibana saved object asset type
type: string
enum:
- dashboard
- visualization
- search
- index-pattern
- map
- lens
- ml-module
- security-rule
elasticsearch_asset_type:
title: Elasticsearch asset type
type: string
enum:
- component_template
- ingest_pipeline
- index_template
- ilm_policy
- transform
- data_stream_ilm_policy
agent_type:
type: string
title: Agent type
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
title: Elasticsearch asset type
type: string
enum:
- component_template
- ingest_pipeline
- index_template
- ilm_policy
- transform
- data_stream_ilm_policy
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
title: Kibana saved object asset type
type: string
enum:
- dashboard
- visualization
- search
- index-pattern
- map
- lens
- ml-module
- security-rule
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ delete:
id:
type: string
type:
type: string
oneOf:
- $ref: ../components/schemas/kibana_saved_object_type.yaml
- $ref: ../components/schemas/elasticsearch_asset_type.yaml
required:
- id
- type
Expand Down

0 comments on commit 5c04dfc

Please sign in to comment.