[Fleet] Fix Agent policies OpenAPI to document package_policies and full (#140857)

This commit is contained in:
Nicolas Chaulet 2022-09-19 08:55:31 -04:00 committed by GitHub
parent 269df0168e
commit ad0a7ac18d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 40 additions and 31 deletions

View file

@ -2131,6 +2131,14 @@
},
{
"$ref": "#/components/parameters/kuery"
},
{
"schema": {
"type": "boolean"
},
"in": "query",
"name": "full",
"description": "When set to true, retrieve the related package policies for each agent policy."
}
],
"description": ""
@ -4903,21 +4911,12 @@
"inactive"
]
},
"packagePolicies": {
"oneOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "array",
"items": {
"$ref": "#/components/schemas/package_policy"
}
}
]
"package_policies": {
"description": "This field is present only when retrieving a single agent policy, or when retrieving a list of agent policy with the ?full=true parameter",
"type": "array",
"items": {
"$ref": "#/components/schemas/package_policy"
}
},
"updated_on": {
"type": "string",

View file

@ -1312,6 +1312,13 @@ paths:
- $ref: '#/components/parameters/page_size'
- $ref: '#/components/parameters/page_index'
- $ref: '#/components/parameters/kuery'
- schema:
type: boolean
in: query
name: full
description: >-
When set to true, retrieve the related package policies for each
agent policy/
description: ''
post:
summary: Agent policy - Create
@ -3107,14 +3114,14 @@ components:
enum:
- active
- inactive
packagePolicies:
oneOf:
- type: array
items:
type: string
- type: array
items:
$ref: '#/components/schemas/package_policy'
package_policies:
description: >-
This field is present only when retrieving a single agent
policy, or when retrieving a list of agent policy with the
?full=true parameter
type: array
items:
$ref: '#/components/schemas/package_policy'
updated_on:
type: string
format: date-time

View file

@ -9,14 +9,11 @@ allOf:
enum:
- active
- inactive
packagePolicies:
oneOf:
- type: array
items:
type: string
- type: array
items:
$ref: ./package_policy.yaml
package_policies:
description: This field is present only when retrieving a single agent policy, or when retrieving a list of agent policy with the ?full=true parameter
type: array
items:
$ref: ./package_policy.yaml
updated_on:
type: string
format: date-time

View file

@ -29,6 +29,12 @@ get:
- $ref: ../components/parameters/page_size.yaml
- $ref: ../components/parameters/page_index.yaml
- $ref: ../components/parameters/kuery.yaml
- schema:
type: boolean
in: query
name: full
description: When set to true, retrieve the related package policies for each agent policy.
description: ''
post:
summary: Agent policy - Create