Commit cbf02914 authored by Luc Yriarte's avatar Luc Yriarte
Browse files

Merge branch 'spec-statistics' into 'master'

Fix /logs/{logid}/statistics response spec to reflect real API behavior

See merge request !248
parents c60b8ae9 73214940
Pipeline #68069 failed with stages
in 104 minutes and 2 seconds
......@@ -30,7 +30,7 @@ The following software have components provided under the terms of this license:
- openapi-spec-validator (from https://github.com/p1c2u/openapi-spec-validator)
- opencensus (from https://github.com/census-instrumentation/opencensus-python)
- opencensus-context (from https://github.com/census-instrumentation/opencensus-python/tree/master/context/opencensus-context)
- opencensus-ext-azure (from )
- opencensus-ext-azure (from https://github.com/census-instrumentation/opencensus-python/tree/master/contrib/opencensus-ext-azure)
- opencensus-ext-logging (from )
- opencensus-ext-ocagent (from https://github.com/census-instrumentation/opencensus-python/tree/master/contrib/opencensus-ext-ocagent)
- opencensus-ext-stackdriver (from https://github.com/census-instrumentation/opencensus-python/tree/master/contrib/opencensus-ext-stackdriver)
......
......@@ -14,7 +14,7 @@
import asyncio
import json
from typing import List, Optional
from typing import Dict, List, Optional
import numpy as np
import pandas as pd
......@@ -392,15 +392,11 @@ class StatsColumn(BaseModel):
max: float = Field(..., description="Maximum of the values in the object")
class GetStatisticResponse(BaseModel):
columns: List[StatsColumn]
@router.get('/logs/{logid}/statistics',
summary='Data statistics',
description="This API will return count, mean, std, min, max and percentiles of each column. {}"
.format(REQUIRED_ROLES_READ),
response_model=GetStatisticResponse,
response_model=Dict[str, StatsColumn],
)
async def get_log_data_statistics(logid: str,
bulk_id_path: str = Depends(bulk_id_path_parameter),
......
......@@ -2221,22 +2221,6 @@
}
]
},
"GetStatisticResponse": {
"properties": {
"columns": {
"items": {
"$ref": "#/components/schemas/StatsColumn"
},
"title": "Columns",
"type": "array"
}
},
"required": [
"columns"
],
"title": "GetStatisticResponse",
"type": "object"
},
"GetTrajectoryDataResponse": {
"oneOf": [
{
......@@ -12960,7 +12944,11 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetStatisticResponse"
"additionalProperties": {
"$ref": "#/components/schemas/StatsColumn"
},
"title": "Response Get Log Data Statistics Ddms V2 Logs Logid Statistics Get",
"type": "object"
}
}
},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment