Skip to content

Commit

Permalink
[DOCS] Add text/plain response and examples
Browse files Browse the repository at this point in the history
  • Loading branch information
lcawl committed Mar 27, 2024
1 parent 50dd484 commit 445adc9
Showing 1 changed file with 43 additions and 23 deletions.
66 changes: 43 additions & 23 deletions docs/spec/openapi/apm-openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,35 +46,55 @@ components:
type: http
scheme: bearer
bearerFormat: Secret token
schemas:
200_server_info_noauth:
description: Indicates that the server is up.
200_server_info_auth:
description: When an API key or a secret token is passed along with the request, the response payload includes some information about the APM server.
type: object
properties:
build_date:
type: string
format: time-date
example: '2021-12-18T19:59:06Z'
build_sha:
type: string
example: 24fe620eeff5a19e2133c940c7e5ce1ceddb1445
publish_ready:
type: boolean
example: true
version:
type: string
example: 8.12.1
responses:
200_server_info:
description: A successful response.
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/200_server_info_noauth'
- $ref: '#/components/schemas/200_server_info_auth'
description: When an API key or a secret token is passed along with the request, the response payload includes some information about the APM server.
type: object
properties:
build_date:
type: string
format: time-date
build_sha:
type: string
publish_ready:
type: boolean
version:
type: string
examples:
getServerHealthAuthResponse:
summary: Example APM Server information request with a secret token
value:
build_date: '2021-12-18T19:59:06Z'
build_sha: 24fe620eeff5a19e2133c940c7e5ce1ceddb1445
publish_ready: true
version: 8.12.2
text/plain:
schema:
description: Indicates that the server is up.
type: string
examples:
getServerHealthBasicResponse:
summary: Example APM Server status request without credentials
value: |
* Trying 127.0.0.1:8200...
* TCP_NODELAY set
* Connected to 127.0.0.1 (10.244.3.40) port 8200 (#0)
> GET / HTTP/1.1
> Host: 127.0.0.1:8200
> User-Agent: curl/7.68.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< X-Content-Type-Options: nosniff
< Date: Tue, 17 Oct 2023 22:04:05 GMT
< Content-Length: 0
<
* Connection #0 to host 127.0.0.1 left intact
security:
- apiKeyAuth: [ ]
- secretToken: [ ]

0 comments on commit 445adc9

Please sign in to comment.