From e65c9b75baae15229f9d7cac9a627c7fee8846e8 Mon Sep 17 00:00:00 2001 From: Milosz Marcinkowski Date: Wed, 30 Oct 2024 17:34:25 +0100 Subject: [PATCH] add missing http responses --- .../apm/components/schemas/401_response.yaml | 10 +++++++ .../apm/components/schemas/403_response.yaml | 10 +++++++ .../components/schemas/agent_keys_object.yaml | 3 ++ .../schemas/agent_keys_response.yaml | 23 +++++++------- .../openapi/apm/paths/api@apm@agent_keys.yaml | 18 +++++++++++ .../api@apm@fleet@apm_server_schema.yaml | 12 ++++++++ ...apm@services@{serviceName}@annotation.yaml | 18 +++++++++++ ...vices@{serviceName}@annotation@search.yaml | 12 ++++++++ .../api@apm@settings@agent_configuration.yaml | 30 +++++++++++++++++++ ...ttings@agent_configuration@agent_name.yaml | 6 ++++ ...m@settings@agent_configuration@search.yaml | 6 ++++ ...apm@settings@agent_configuration@view.yaml | 8 +++-- .../openapi/apm/paths/api@apm@sourcemaps.yaml | 18 +++++++++++ .../apm/paths/api@apm@sourcemaps@{id}.yaml | 12 ++++++++ ...ings@agent_configuration@environments.yaml | 6 ++++ 15 files changed, 179 insertions(+), 13 deletions(-) create mode 100644 x-pack/plugins/observability_solution/apm/docs/openapi/apm/components/schemas/401_response.yaml create mode 100644 x-pack/plugins/observability_solution/apm/docs/openapi/apm/components/schemas/403_response.yaml diff --git a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/components/schemas/401_response.yaml b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/components/schemas/401_response.yaml new file mode 100644 index 0000000000000..efed1377e3fe1 --- /dev/null +++ b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/components/schemas/401_response.yaml @@ -0,0 +1,10 @@ +type: object +properties: + statusCode: + type: number + example: 401 + error: + type: string + example: Unauthorized + message: + type: string diff --git a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/components/schemas/403_response.yaml b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/components/schemas/403_response.yaml new file mode 100644 index 0000000000000..b339ad639fd5c --- /dev/null +++ b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/components/schemas/403_response.yaml @@ -0,0 +1,10 @@ +type: object +properties: + statusCode: + type: number + example: 403 + error: + type: string + example: Forbidden + message: + type: string diff --git a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/components/schemas/agent_keys_object.yaml b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/components/schemas/agent_keys_object.yaml index 756bb5420b82b..0eecaeddc081b 100644 --- a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/components/schemas/agent_keys_object.yaml +++ b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/components/schemas/agent_keys_object.yaml @@ -1,4 +1,7 @@ type: object +required: + - name + - privileges properties: name: type: string diff --git a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/components/schemas/agent_keys_response.yaml b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/components/schemas/agent_keys_response.yaml index 9335c3fb58e52..36cdb697ba4e7 100644 --- a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/components/schemas/agent_keys_response.yaml +++ b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/components/schemas/agent_keys_response.yaml @@ -1,13 +1,14 @@ type: object properties: - api_key: - type: string - expiration: - type: integer - format: int64 - id: - type: string - name: - type: string - encoded: - type: string + agentKey: + type: object + properties: + expiration: + type: integer + format: int64 + id: + type: string + name: + type: string + encoded: + type: string diff --git a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@agent_keys.yaml b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@agent_keys.yaml index 8baa9600f1358..46b1588517761 100644 --- a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@agent_keys.yaml +++ b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@agent_keys.yaml @@ -26,3 +26,21 @@ post: application/json: schema: $ref: '../components/schemas/400_response.yaml' + '401': + description: Unauthorized response + content: + application/json: + schema: + $ref: '../components/schemas/401_response.yaml' + '403': + description: Forbidden response + content: + application/json: + schema: + $ref: '../components/schemas/403_response.yaml' + '500': + description: Internal Server Error response + content: + application/json: + schema: + $ref: '../components/schemas/500_response.yaml' diff --git a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@fleet@apm_server_schema.yaml b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@fleet@apm_server_schema.yaml index 70fb9de3df1da..2c4629b44a211 100644 --- a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@fleet@apm_server_schema.yaml +++ b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@fleet@apm_server_schema.yaml @@ -33,6 +33,18 @@ post: application/json: schema: $ref: '../components/schemas/400_response.yaml' + '401': + description: Unauthorized response + content: + application/json: + schema: + $ref: '../components/schemas/401_response.yaml' + '403': + description: Forbidden response + content: + application/json: + schema: + $ref: '../components/schemas/403_response.yaml' '404': description: Not found response content: diff --git a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@services@{serviceName}@annotation.yaml b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@services@{serviceName}@annotation.yaml index 17973858f7711..3894bd6da2015 100644 --- a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@services@{serviceName}@annotation.yaml +++ b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@services@{serviceName}@annotation.yaml @@ -32,3 +32,21 @@ post: application/json: schema: $ref: '../components/schemas/400_response.yaml' + '401': + description: Unauthorized response + content: + application/json: + schema: + $ref: '../components/schemas/401_response.yaml' + '403': + description: Forbidden response + content: + application/json: + schema: + $ref: '../components/schemas/403_response.yaml' + '404': + description: Not found response + content: + application/json: + schema: + $ref: '../components/schemas/404_response.yaml' diff --git a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@services@{serviceName}@annotation@search.yaml b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@services@{serviceName}@annotation@search.yaml index edb8bc2cb5b06..0f1391be89806 100644 --- a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@services@{serviceName}@annotation@search.yaml +++ b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@services@{serviceName}@annotation@search.yaml @@ -43,3 +43,15 @@ get: application/json: schema: $ref: '../components/schemas/400_response.yaml' + '401': + description: Unauthorized response + content: + application/json: + schema: + $ref: '../components/schemas/401_response.yaml' + '500': + description: Internal Server Error response + content: + application/json: + schema: + $ref: '../components/schemas/500_response.yaml' diff --git a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@settings@agent_configuration.yaml b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@settings@agent_configuration.yaml index 45dc5a21f8b18..c7d7251d1d8fb 100644 --- a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@settings@agent_configuration.yaml +++ b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@settings@agent_configuration.yaml @@ -19,6 +19,12 @@ get: application/json: schema: $ref: '../components/schemas/400_response.yaml' + '401': + description: Unauthorized response + content: + application/json: + schema: + $ref: '../components/schemas/401_response.yaml' '404': description: Not found response content: @@ -52,6 +58,18 @@ delete: application/json: schema: $ref: '../components/schemas/400_response.yaml' + '401': + description: Unauthorized response + content: + application/json: + schema: + $ref: '../components/schemas/401_response.yaml' + '403': + description: Forbidden response + content: + application/json: + schema: + $ref: '../components/schemas/403_response.yaml' '404': description: Not found response content: @@ -90,6 +108,18 @@ put: application/json: schema: $ref: '../components/schemas/400_response.yaml' + '401': + description: Unauthorized response + content: + application/json: + schema: + $ref: '../components/schemas/401_response.yaml' + '403': + description: Forbidden response + content: + application/json: + schema: + $ref: '../components/schemas/403_response.yaml' '404': description: Not found response content: diff --git a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@settings@agent_configuration@agent_name.yaml b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@settings@agent_configuration@agent_name.yaml index af5689b021a3d..a1f3b13451d6a 100644 --- a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@settings@agent_configuration@agent_name.yaml +++ b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@settings@agent_configuration@agent_name.yaml @@ -25,6 +25,12 @@ get: application/json: schema: $ref: '../components/schemas/400_response.yaml' + '401': + description: Unauthorized response + content: + application/json: + schema: + $ref: '../components/schemas/401_response.yaml' '404': description: Not found response content: diff --git a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@settings@agent_configuration@search.yaml b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@settings@agent_configuration@search.yaml index c253f20746c1a..8ae4ce975fc08 100644 --- a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@settings@agent_configuration@search.yaml +++ b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@settings@agent_configuration@search.yaml @@ -27,6 +27,12 @@ post: application/json: schema: $ref: '../components/schemas/400_response.yaml' + '401': + description: Unauthorized response + content: + application/json: + schema: + $ref: '../components/schemas/401_response.yaml' '404': description: Not found response content: diff --git a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@settings@agent_configuration@view.yaml b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@settings@agent_configuration@view.yaml index 127f877aa359b..c32bac7df383c 100644 --- a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@settings@agent_configuration@view.yaml +++ b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@settings@agent_configuration@view.yaml @@ -8,13 +8,11 @@ get: - name: name in: query description: Service name - required: true schema: type: string - name: environment in: query description: Service environment - required: true schema: type: string responses: @@ -30,6 +28,12 @@ get: application/json: schema: $ref: '../components/schemas/400_response.yaml' + '401': + description: Unauthorized response + content: + application/json: + schema: + $ref: '../components/schemas/401_response.yaml' '404': description: Not found response content: diff --git a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@sourcemaps.yaml b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@sourcemaps.yaml index 48fbdebc949df..0c70853bca01e 100644 --- a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@sourcemaps.yaml +++ b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@sourcemaps.yaml @@ -27,6 +27,12 @@ get: application/json: schema: $ref: '../components/schemas/400_response.yaml' + '401': + description: Unauthorized response + content: + application/json: + schema: + $ref: '../components/schemas/401_response.yaml' '500': description: Internal Server Error response content: @@ -67,6 +73,18 @@ post: application/json: schema: $ref: '../components/schemas/400_response.yaml' + '401': + description: Unauthorized response + content: + application/json: + schema: + $ref: '../components/schemas/401_response.yaml' + '403': + description: Forbidden response + content: + application/json: + schema: + $ref: '../components/schemas/403_response.yaml' '500': description: Internal Server Error response content: diff --git a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@sourcemaps@{id}.yaml b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@sourcemaps@{id}.yaml index 57e7ce141652f..4a6685dc2be38 100644 --- a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@sourcemaps@{id}.yaml +++ b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@sourcemaps@{id}.yaml @@ -25,6 +25,18 @@ delete: application/json: schema: $ref: '../components/schemas/400_response.yaml' + '401': + description: Unauthorized response + content: + application/json: + schema: + $ref: '../components/schemas/401_response.yaml' + '403': + description: Forbidden response + content: + application/json: + schema: + $ref: '../components/schemas/403_response.yaml' '500': description: Internal Server Error response content: diff --git a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/apm@settings@agent_configuration@environments.yaml b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/apm@settings@agent_configuration@environments.yaml index e40943cd23f45..c0791b92ac148 100644 --- a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/apm@settings@agent_configuration@environments.yaml +++ b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/apm@settings@agent_configuration@environments.yaml @@ -23,6 +23,12 @@ get: application/json: schema: $ref: '../components/schemas/400_response.yaml' + '401': + description: Unauthorized response + content: + application/json: + schema: + $ref: '../components/schemas/401_response.yaml' '404': description: Not found response content: