Skip to content

Commit

Permalink
[OpenAPI] Fix Serverless API base URL (elastic#202373)
Browse files Browse the repository at this point in the history
  • Loading branch information
lcawl authored and hop-dev committed Dec 5, 2024
1 parent 6a5256f commit e6dc202
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 38 deletions.
5 changes: 0 additions & 5 deletions oas_docs/kibana.info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,6 @@ info:
x-feedbackLink:
label: Feedback
url: https://github.com/elastic/docs-content/issues/new?assignees=&labels=feedback%2Ccommunity&projects=&template=api-feedback.yaml&title=%5BFeedback%5D%3A+
servers:
- url: https://{kibana_url}
variables:
kibana_url:
default: localhost:5601
security:
- apiKeyAuth: []
- basicAuth: []
Expand Down
6 changes: 1 addition & 5 deletions oas_docs/output/kibana.serverless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ servers:
- url: https://{kibana_url}
variables:
kibana_url:
default: localhost:5601
default: <KIBANA_URL>
security:
- apiKeyAuth: []
tags:
Expand Down Expand Up @@ -34488,8 +34488,6 @@ paths:
schema:
$ref: '#/components/schemas/SLOs_409_response'
description: Conflict - The SLO id already exists
servers:
- url: https://localhost:5601
summary: Create an SLO
tags:
- slo
Expand Down Expand Up @@ -34529,8 +34527,6 @@ paths:
schema:
$ref: '#/components/schemas/SLOs_403_response'
description: Unauthorized response
servers:
- url: https://localhost:5601
summary: Batch delete rollup and summary data
tags:
- slo
Expand Down
2 changes: 1 addition & 1 deletion oas_docs/overlays/kibana.overlays.serverless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ actions:
- url: https://{kibana_url}
variables:
kibana_url:
default: localhost:5601
default: <KIBANA_URL>
# Mark all operations as beta
- target: "$.paths[*]['get','put','post','delete','options','head','patch','trace']"
description: Add x-beta
Expand Down
11 changes: 11 additions & 0 deletions oas_docs/overlays/kibana.overlays.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ info:
title: Overlays for the Kibana API document
version: 0.0.1
actions:
# Clean up server definitions
- target: '$.servers.*'
description: Remove all servers so we can add our own.
remove: true
- target: '$.servers'
description: Add server into the now empty server array.
update:
- url: https://{kibana_url}
variables:
kibana_url:
default: localhost:5601
# Add an introduction to spaces
- target: '$'
description: Add an extra page about spaces
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@
},
"servers": [
{
"url": "http://localhost:5601",
"description": "local"
"url": "https://{kibana_url}",
"variables": {
"kibana_url": {
"default": "localhost:5601"
}
}
}
],
"tags": [
Expand Down Expand Up @@ -102,12 +106,7 @@
}
}
}
},
"servers": [
{
"url": "https://localhost:5601"
}
]
}
},
"get": {
"summary": "Get a paginated list of SLOs",
Expand Down Expand Up @@ -738,12 +737,7 @@
}
}
}
},
"servers": [
{
"url": "https://localhost:5601"
}
]
}
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ info:
name: Elastic License 2.0
url: https://www.elastic.co/licensing/elastic-license
servers:
- url: http://localhost:5601
description: local
- url: https://{kibana_url}
variables:
kibana_url:
default: localhost:5601
tags:
- name: slo
description: SLO APIs enable you to define, manage and track service-level objectives
Expand Down Expand Up @@ -63,8 +65,6 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/409_response'
servers:
- url: https://localhost:5601
get:
summary: Get a paginated list of SLOs
operationId: findSlosOp
Expand Down Expand Up @@ -448,8 +448,6 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/403_response'
servers:
- url: https://localhost:5601
components:
parameters:
kbn_xsrf:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ tags:
- name: slo
description: SLO APIs enable you to define, manage and track service-level objectives
servers:
- url: "http://localhost:5601"
description: local
- url: https://{kibana_url}
variables:
kibana_url:
default: localhost:5601
paths:
"/s/{spaceId}/api/observability/slos":
$ref: "paths/s@{spaceid}@[email protected]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ post:
application/json:
schema:
$ref: '../components/schemas/409_response.yaml'
servers:
- url: https://localhost:5601

get:
summary: Get a paginated list of SLOs
operationId: findSlosOp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,3 @@ post:
application/json:
schema:
$ref: '../components/schemas/403_response.yaml'
servers:
- url: https://localhost:5601

0 comments on commit e6dc202

Please sign in to comment.