Skip to content

Commit 81e6e79

Browse files
committed
docs: Update CoreData API doc
Update CoreData API doc and fix format Signed-off-by: bruce <[email protected]>
1 parent cb94a90 commit 81e6e79

File tree

2 files changed

+19
-20
lines changed

2 files changed

+19
-20
lines changed

openapi/core-data.yaml

+17-18
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,15 @@ components:
351351
minimum: 0
352352
default: 0
353353
description: "The number of items to skip before starting to collect the result set."
354+
readingOffsetParam:
355+
in: query
356+
name: offset
357+
required: false
358+
schema:
359+
type: integer
360+
minimum: 0
361+
default: 0
362+
description: "The number of items to skip before starting to collect the result set. Specify -1 will not count the total reading to improve the performance for the large dataset."
354363
limitParam:
355364
in: query
356365
name: limit
@@ -1138,7 +1147,7 @@ paths:
11381147
/reading/all:
11391148
parameters:
11401149
- $ref: '#/components/parameters/correlatedRequestHeader'
1141-
- $ref: '#/components/parameters/offsetParam'
1150+
- $ref: '#/components/parameters/readingOffsetParam'
11421151
- $ref: '#/components/parameters/limitParam'
11431152
get:
11441153
summary: "Given the entire range of readings sorted by origin descending, returns a portion of that range according to the offset and limit parameters. Readings returned will all inherit from BaseReading but their concrete types will be either SimpleReading or BinaryReading, potentially interleaved."
@@ -1280,7 +1289,7 @@ paths:
12801289
schema:
12811290
type: string
12821291
description: "Uniquely identifies a given device"
1283-
- $ref: '#/components/parameters/offsetParam'
1292+
- $ref: '#/components/parameters/readingOffsetParam'
12841293
- $ref: '#/components/parameters/limitParam'
12851294
get:
12861295
summary: "Given a range of readings from the specified device sorted by origin descending, returns a portion of that range according to the device name, offset and limit parameters."
@@ -1344,7 +1353,7 @@ paths:
13441353
schema:
13451354
type: string
13461355
description: The device resource name of readings.
1347-
- $ref: '#/components/parameters/offsetParam'
1356+
- $ref: '#/components/parameters/readingOffsetParam'
13481357
- $ref: '#/components/parameters/limitParam'
13491358
get:
13501359
summary: Returns a paginated list of readings whose resource name is of the specified one.
@@ -1416,7 +1425,7 @@ paths:
14161425
schema:
14171426
type: string
14181427
description: The device resource name of readings.
1419-
- $ref: '#/components/parameters/offsetParam'
1428+
- $ref: '#/components/parameters/readingOffsetParam'
14201429
- $ref: '#/components/parameters/limitParam'
14211430
get:
14221431
summary: "Returns a paginated range of readings by deviceName and resourceName"
@@ -1488,7 +1497,7 @@ paths:
14881497
schema:
14891498
type: integer
14901499
description: "Unix timestamp (nanoseconds) indicating the end of a date/time range"
1491-
- $ref: '#/components/parameters/offsetParam'
1500+
- $ref: '#/components/parameters/readingOffsetParam'
14921501
- $ref: '#/components/parameters/limitParam'
14931502
get:
14941503
summary: "Return a paginated range of readings with a create date inside the specified start/end values."
@@ -1566,7 +1575,7 @@ paths:
15661575
schema:
15671576
type: integer
15681577
description: "Unix timestamp (nanoseconds) indicating the end of a date/time range"
1569-
- $ref: '#/components/parameters/offsetParam'
1578+
- $ref: '#/components/parameters/readingOffsetParam'
15701579
- $ref: '#/components/parameters/limitParam'
15711580
get:
15721581
summary: "Return a paginated range of readings by resourceName and specified time range."
@@ -1650,7 +1659,7 @@ paths:
16501659
schema:
16511660
type: integer
16521661
description: "Unix timestamp (nanoseconds) indicating the end of a date/time range"
1653-
- $ref: '#/components/parameters/offsetParam'
1662+
- $ref: '#/components/parameters/readingOffsetParam'
16541663
- $ref: '#/components/parameters/limitParam'
16551664
get:
16561665
summary: "Return a paginated range of readings by deviceName, resourceName and specified time range."
@@ -1728,20 +1737,10 @@ paths:
17281737
schema:
17291738
type: integer
17301739
description: "Unix timestamp (nanoseconds) indicating the end of a date/time range"
1731-
- $ref: '#/components/parameters/offsetParam'
1740+
- $ref: '#/components/parameters/readingOffsetParam'
17321741
- $ref: '#/components/parameters/limitParam'
17331742
get:
17341743
summary: "Return a paginated range of readings by deviceName and specified time range while also allowing multiple resource names specified in the request body as query criteria. If resource names or request body is empty, return all the readings that meet deviceName and specified time range."
1735-
requestBody:
1736-
required: false
1737-
content:
1738-
application/json:
1739-
schema:
1740-
$ref: '#/components/schemas/AddEventRequest'
1741-
example:
1742-
resourceNames:
1743-
- resource-001
1744-
- resource-002
17451744
responses:
17461745
'200':
17471746
description: "OK"

openapi/core-metadata.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1178,16 +1178,16 @@ components:
11781178
required: false
11791179
schema:
11801180
type: boolean
1181+
default: false
11811182
description: "Indicates whether to skip the Device Service Validation API call."
1182-
default: false
11831183
forceParam:
11841184
in: query
11851185
name: force
11861186
required: false
11871187
schema:
11881188
type: boolean
1189+
default: false
11891190
description: "Indicates whether to force add the device if device name already exists."
1190-
default: false
11911191
headers:
11921192
correlatedResponseHeader:
11931193
description: "A response header that returns the unique correlation ID used to initiate the request."

0 commit comments

Comments
 (0)