Skip to content

Commit 6f20d7f

Browse files
committed
chore(api): Refactor and reuse data:
- Makes OSS v2 config consistent with other platforms and more convenient - Changes getSwagger.sh to use the new v2 config and to allow generating v1-compat individually for each platform - Refactors JS into modules. - Reuses existing product (platform) data - Adds an apis property to product data that references the config file for each product's API docs - Generates pages for all products that have the property - Adds the script to package.json
1 parent 89951e8 commit 6f20d7f

File tree

20 files changed

+386
-327
lines changed

20 files changed

+386
-327
lines changed

api-docs/cloud-dedicated/management/openapi.yml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,7 @@ info:
1313
url: https://opensource.org/licenses/MIT
1414
version: ''
1515
servers:
16-
- url: https://{baseurl}/api/v0
17-
description: InfluxDB Cloud Dedicated Management API URL
18-
variables:
19-
baseurl:
20-
enum:
21-
- console.influxdata.com
22-
default: console.influxdata.com
23-
description: InfluxDB Cloud Dedicated Console URL
16+
- url: /
2417
security:
2518
- bearerAuthManagementToken: []
2619
bearerAuthJwt: []
@@ -37,8 +30,6 @@ tags:
3730
See how to [create a management token](/influxdb/cloud-dedicated/admin/tokens/management/).
3831
3932
By default, management tokens in InfluxDB v3 are short-lived tokens issued by an OAuth2 identity provider that grant a specific user administrative access to your InfluxDB cluster. However, for automation purposes, you can manually create management tokens that authenticate directly with your InfluxDB cluster and do not require human interaction with your identity provider.
40-
41-
4233
- name: Database tokens
4334
description: Manage database read/write tokens for a cluster
4435
- name: Databases
@@ -1020,7 +1011,6 @@ paths:
10201011
For example, see how to [authenticate Telegraf using tokens in your OS secret store](https://github.com/influxdata/telegraf/tree/master/plugins/secretstores/os).
10211012
10221013
If you lose a token, [delete the token from InfluxDB](/influxdb/cloud-dedicated/admin/tokens/database/delete/) and create a new one.
1023-
10241014
parameters:
10251015
- name: accountId
10261016
in: path

api-docs/cloud-dedicated/v1-compatibility/swaggerV1Compat.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ tags:
3535
3636
<!-- ReDoc-Inject: <security-definitions> -->
3737
x-traitTag: true
38+
- name: Ping
3839
- name: Query
3940
- name: Write
4041
paths:
@@ -244,7 +245,7 @@ paths:
244245
get:
245246
description: |
246247
Reports the InfluxQL bridge querier health and the InfluxDB version of the instance.
247-
248+
248249
The response is a HTTP `204` status code to inform you the querier is available.
249250
250251
For InfluxDB Cloud Dedicated, this endpoint only checks the status of queriers; doesn't check the status of ingesters.
@@ -282,15 +283,14 @@ paths:
282283
head:
283284
description: |
284285
Reports the InfluxQL bridge querier health and the InfluxDB version of the instance.
285-
286+
286287
The response is a HTTP `204` status code to inform you the querier is available.
287288
288289
For InfluxDB Cloud Dedicated, this endpoint only checks the status of queriers; doesn't check the status of ingesters.
289290
290291
To check the health of ingesters before writing data, send a request to one of the [write endpoints](/influxdb/cloud-dedicated/api/v2/#tag/Write).
291292
292293
This endpoint doesn't require authentication.
293-
294294
operationId: HeadPing
295295
responses:
296296
'204':
@@ -357,9 +357,9 @@ components:
357357
properties:
358358
results:
359359
description: |
360-
A resultset object that contains the `statement_id` and the `series` array.
360+
A resultset object that contains the `statement_id` and the `series` array.
361361
362-
Except for `statement_id`, all properties are optional and omitted if empty. If a property is not present, it is assumed to be `null`.
362+
Except for `statement_id`, all properties are optional and omitted if empty. If a property is not present, it is assumed to be `null`.
363363
items:
364364
properties:
365365
error:
@@ -408,12 +408,12 @@ components:
408408
type: integer
409409
type: object
410410
oneOf:
411-
- required:
412-
- statement_id
413-
- error
414-
- required:
415-
- statement_id
416-
- series
411+
- required:
412+
- statement_id
413+
- error
414+
- required:
415+
- statement_id
416+
- series
417417
type: array
418418
type: object
419419
InfluxQLCSVResponse:

api-docs/cloud-dedicated/v2/ref.yml

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,7 @@ info:
1212
summary: The InfluxDB v2 HTTP API for InfluxDB Cloud Dedicated provides a v2-compatible programmatic interface for writing data stored in an InfluxDB Cloud Dedicated database.
1313
version: ''
1414
servers:
15-
- url: https://{baseurl}
16-
description: InfluxDB Cloud Dedicated API URL
17-
variables:
18-
baseurl:
19-
enum:
20-
- cluster-id.a.influxdb.io
21-
default: cluster-id.a.influxdb.io
22-
description: InfluxDB Cloud Dedicated URL
15+
- url: /
2316
security:
2417
- BearerAuthentication: []
2518
- TokenAuthentication: []
@@ -150,7 +143,7 @@ paths:
150143
get:
151144
description: |
152145
Reports the InfluxQL bridge querier health and the InfluxDB version of the instance.
153-
146+
154147
The response is a HTTP `204` status code to inform you the querier is available.
155148
156149
For InfluxDB Cloud Dedicated, this endpoint only checks the status of queriers; doesn't check the status of ingesters.
@@ -188,7 +181,7 @@ paths:
188181
head:
189182
description: |
190183
Reports the InfluxQL bridge querier health and the InfluxDB version of the instance.
191-
184+
192185
The response is a HTTP `204` status code to inform you the querier is available.
193186
194187
For InfluxDB Cloud Dedicated, this endpoint only checks the status of queriers; doesn't check the status of ingesters.
@@ -1243,9 +1236,9 @@ components:
12431236
properties:
12441237
results:
12451238
description: |
1246-
A resultset object that contains the `statement_id` and the `series` array.
1239+
A resultset object that contains the `statement_id` and the `series` array.
12471240
1248-
Except for `statement_id`, all properties are optional and omitted if empty. If a property is not present, it is assumed to be `null`.
1241+
Except for `statement_id`, all properties are optional and omitted if empty. If a property is not present, it is assumed to be `null`.
12491242
items:
12501243
properties:
12511244
error:
@@ -1294,12 +1287,12 @@ components:
12941287
type: integer
12951288
type: object
12961289
oneOf:
1297-
- required:
1298-
- statement_id
1299-
- error
1300-
- required:
1301-
- statement_id
1302-
- series
1290+
- required:
1291+
- statement_id
1292+
- error
1293+
- required:
1294+
- statement_id
1295+
- series
13031296
type: array
13041297
type: object
13051298
IntegerLiteral:

api-docs/cloud-serverless/v1-compatibility/swaggerV1Compat.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -280,9 +280,9 @@ components:
280280
properties:
281281
results:
282282
description: |
283-
A resultset object that contains the `statement_id` and the `series` array.
283+
A resultset object that contains the `statement_id` and the `series` array.
284284
285-
Except for `statement_id`, all properties are optional and omitted if empty. If a property is not present, it is assumed to be `null`.
285+
Except for `statement_id`, all properties are optional and omitted if empty. If a property is not present, it is assumed to be `null`.
286286
items:
287287
properties:
288288
error:
@@ -331,12 +331,12 @@ components:
331331
type: integer
332332
type: object
333333
oneOf:
334-
- required:
335-
- statement_id
336-
- error
337-
- required:
338-
- statement_id
339-
- series
334+
- required:
335+
- statement_id
336+
- error
337+
- required:
338+
- statement_id
339+
- series
340340
type: array
341341
type: object
342342
InfluxQLCSVResponse:

api-docs/cloud-serverless/v2/ref.yml

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,7 @@ info:
1313
The InfluxDB v2 HTTP API for InfluxDB Cloud Serverless provides a programmatic interface for writing data stored in an InfluxDB Cloud Serverless bucket.
1414
version: ''
1515
servers:
16-
- url: https://{baseurl}
17-
description: InfluxDB Cloud Serverless API URL
18-
variables:
19-
baseurl:
20-
enum:
21-
- us-east-1-1.aws.cloud2.influxdata.com
22-
default: us-east-1-1.aws.cloud2.influxdata.com
23-
description: InfluxDB Cloud Serverless URL
16+
- url: /
2417
security:
2518
- TokenAuthentication: []
2619
tags:
@@ -10280,9 +10273,9 @@ components:
1028010273
properties:
1028110274
results:
1028210275
description: |
10283-
A resultset object that contains the `statement_id` and the `series` array.
10276+
A resultset object that contains the `statement_id` and the `series` array.
1028410277
10285-
Except for `statement_id`, all properties are optional and omitted if empty. If a property is not present, it is assumed to be `null`.
10278+
Except for `statement_id`, all properties are optional and omitted if empty. If a property is not present, it is assumed to be `null`.
1028610279
items:
1028710280
properties:
1028810281
error:
@@ -10331,12 +10324,12 @@ components:
1033110324
type: integer
1033210325
type: object
1033310326
oneOf:
10334-
- required:
10335-
- statement_id
10336-
- error
10337-
- required:
10338-
- statement_id
10339-
- series
10327+
- required:
10328+
- statement_id
10329+
- error
10330+
- required:
10331+
- statement_id
10332+
- series
1034010333
type: array
1034110334
type: object
1034210335
IntegerLiteral:

api-docs/cloud/v1-compatibility/swaggerV1Compat.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -276,9 +276,9 @@ components:
276276
properties:
277277
results:
278278
description: |
279-
A resultset object that contains the `statement_id` and the `series` array.
279+
A resultset object that contains the `statement_id` and the `series` array.
280280
281-
Except for `statement_id`, all properties are optional and omitted if empty. If a property is not present, it is assumed to be `null`.
281+
Except for `statement_id`, all properties are optional and omitted if empty. If a property is not present, it is assumed to be `null`.
282282
items:
283283
properties:
284284
error:
@@ -327,12 +327,12 @@ components:
327327
type: integer
328328
type: object
329329
oneOf:
330-
- required:
331-
- statement_id
332-
- error
333-
- required:
334-
- statement_id
335-
- series
330+
- required:
331+
- statement_id
332+
- error
333+
- required:
334+
- statement_id
335+
- series
336336
type: array
337337
type: object
338338
InfluxQLCSVResponse:

api-docs/clustered/v1-compatibility/swaggerV1Compat.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -280,9 +280,9 @@ components:
280280
properties:
281281
results:
282282
description: |
283-
A resultset object that contains the `statement_id` and the `series` array.
283+
A resultset object that contains the `statement_id` and the `series` array.
284284
285-
Except for `statement_id`, all properties are optional and omitted if empty. If a property is not present, it is assumed to be `null`.
285+
Except for `statement_id`, all properties are optional and omitted if empty. If a property is not present, it is assumed to be `null`.
286286
items:
287287
properties:
288288
error:
@@ -331,12 +331,12 @@ components:
331331
type: integer
332332
type: object
333333
oneOf:
334-
- required:
335-
- statement_id
336-
- error
337-
- required:
338-
- statement_id
339-
- series
334+
- required:
335+
- statement_id
336+
- error
337+
- required:
338+
- statement_id
339+
- series
340340
type: array
341341
type: object
342342
InfluxQLCSVResponse:

api-docs/clustered/v2/ref.yml

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,7 @@ info:
1212
url: https://opensource.org/licenses/MIT
1313
summary: The InfluxDB v2 HTTP API for InfluxDB Clustered provides a v2-compatible programmatic interface for writing data stored in an InfluxDB Clustered database.
1414
servers:
15-
- url: https://{baseurl}
16-
description: InfluxDB Clustered API URL
17-
variables:
18-
baseurl:
19-
enum:
20-
- cluster-host.com
21-
default: cluster-host.com
22-
description: InfluxDB Clustered URL
15+
- url: /
2316
security:
2417
- BearerAuthentication: []
2518
- TokenAuthentication: []
@@ -1219,9 +1212,9 @@ components:
12191212
properties:
12201213
results:
12211214
description: |
1222-
A resultset object that contains the `statement_id` and the `series` array.
1215+
A resultset object that contains the `statement_id` and the `series` array.
12231216
1224-
Except for `statement_id`, all properties are optional and omitted if empty. If a property is not present, it is assumed to be `null`.
1217+
Except for `statement_id`, all properties are optional and omitted if empty. If a property is not present, it is assumed to be `null`.
12251218
items:
12261219
properties:
12271220
error:
@@ -1270,12 +1263,12 @@ components:
12701263
type: integer
12711264
type: object
12721265
oneOf:
1273-
- required:
1274-
- statement_id
1275-
- error
1276-
- required:
1277-
- statement_id
1278-
- series
1266+
- required:
1267+
- statement_id
1268+
- error
1269+
- required:
1270+
- statement_id
1271+
- series
12791272
type: array
12801273
type: object
12811274
IntegerLiteral:

0 commit comments

Comments
 (0)