Skip to content

Commit

Permalink
chore: remove partitioning from posture-history openapi spec
Browse files Browse the repository at this point in the history
  • Loading branch information
computator committed Nov 20, 2024
1 parent fecfe36 commit d424744
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 220 deletions.
111 changes: 15 additions & 96 deletions packages/go/openapi/doc/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -13250,9 +13250,6 @@
"type": "string",
"format": "date-time"
}
},
{
"$ref": "#/components/parameters/query.partition-by"
}
],
"responses": {
Expand All @@ -13265,46 +13262,30 @@
{
"$ref": "#/components/schemas/api.response.time-window"
},
{
"$ref": "#/components/schemas/api.response.partition"
},
{
"type": "object",
"properties": {
"data_type": {
"$ref": "#/components/schemas/data_type"
}
}
},
{
"oneOf": [
{
"type": "object",
"title": "Unpartitioned data",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"format": "date-time",
"readOnly": true
},
"value": {
"type": "integer",
"readOnly": true
}
}
},
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"format": "date-time",
"readOnly": true
},
"value": {
"type": "integer",
"readOnly": true
}
}
}
},
{
"$ref": "#/components/schemas/model.components.aggregation"
}
]
}
}
]
}
Expand Down Expand Up @@ -13677,14 +13658,6 @@
"schema": {
"$ref": "#/components/schemas/api.params.predicate.filter.time"
}
},
"query.partition-by": {
"name": "partition_by",
"description": "This query parameter is used to quantize time-series data by aggregating datapoints into one datapoint per time period.",
"in": "query",
"schema": {
"$ref": "#/components/schemas/api.params.query.partition-by"
}
}
},
"schemas": {
Expand Down Expand Up @@ -16319,60 +16292,6 @@
"session_completeness",
"group_completeness"
]
},
"api.params.query.partition-by": {
"type": "string",
"description": "Time period used for quantizing datapoints in time-series data.",
"enum": [
"day",
"week",
"month"
]
},
"api.response.partition": {
"type": "object",
"properties": {
"partition_by": {
"$ref": "#/components/schemas/api.params.query.partition-by"
}
}
},
"model.components.aggregation": {
"type": "object",
"title": "Partitioned data",
"properties": {
"aggregation_data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"min": {
"type": "integer",
"readOnly": true
},
"max": {
"type": "integer",
"readOnly": true
},
"average": {
"type": "integer",
"readOnly": true
},
"count": {
"type": "integer",
"readOnly": true
},
"date": {
"type": "string",
"format": "date-time",
"readOnly": true
}
},
"readOnly": true
},
"readOnly": true
}
}
}
},
"responses": {
Expand Down
21 changes: 0 additions & 21 deletions packages/go/openapi/src/parameters/query.partition-by.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ get:
schema:
type: string
format: date-time
- $ref: './../parameters/query.partition-by.yaml'
responses:
200:
description: OK
Expand All @@ -59,28 +58,22 @@ get:
schema:
allOf:
- $ref: './../schemas/api.response.time-window.yaml'
- $ref: './../schemas/api.response.partition.yaml'
- type: object
properties:
data_type:
$ref: '#/components/schemas/data_type'
- oneOf:
- type: object
title: Unpartitioned data
properties:
data:
type: array
items:
type: object
properties:
date:
type: string
format: date-time
readOnly: true
value:
type: integer
readOnly: true
- $ref: './../schemas/model.components.aggregation.yaml'
data:
type: array
items:
type: object
properties:
date:
type: string
format: date-time
readOnly: true
value:
type: integer
readOnly: true

400:
$ref: './../responses/bad-request.yaml'
Expand Down
22 changes: 0 additions & 22 deletions packages/go/openapi/src/schemas/api.params.query.partition-by.yaml

This file was deleted.

20 changes: 0 additions & 20 deletions packages/go/openapi/src/schemas/api.response.partition.yaml

This file was deleted.

42 changes: 0 additions & 42 deletions packages/go/openapi/src/schemas/model.components.aggregation.yaml

This file was deleted.

0 comments on commit d424744

Please sign in to comment.