Skip to content

Commit

Permalink
Add data type hints to column and entry descriptions
Browse files Browse the repository at this point in the history
Fixes eclipse-cdt-cloud#35

With this, it is expected that column and entry descriptions may contain
an optional typing option, to explain what the data type is and, if
available, what unit to use when formatting it.

This allow the server implementations to send raw data to the client,
who would then have the option to format the data, but also the
possibility to do some other actions, like sorting, or use the data for
richer data interactions, as raw data may have a same meaning in
different outputs, unlike pre-formatted data which may not allow such
interaction.

Signed-off-by: Geneviève Bastien <[email protected]>
  • Loading branch information
tahini committed Jan 25, 2021
1 parent d313f12 commit 8897d35
Showing 1 changed file with 43 additions and 37 deletions.
80 changes: 43 additions & 37 deletions API.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1871,31 +1871,47 @@ components:
description: Tags for the entire line
type: integer
format: int32
ColumnHeaderEntry:
DataType:
type: object
properties:
id:
description: Unique id to identify this column in the backend.
type: integer
format: int32
name:
description: Displayed name for this column
type: string
description:
description: Description of the column
unit:
description: The units used for this data, to be appended to the data
type: string
type:
description: Type of data associated to this column
dataType:
description: Type of data a value represents. Gives a hint on the formatting to give to the data
type: string
enum:
- NUMBER
- BINARY_NUMBER
- TIMESTAMP
- DURATION
- STRING
ColumnHeaderEntry:
allOf:
- type: object
properties:
id:
description: Unique id to identify this column in the backend.
type: integer
format: int32
name:
description: Displayed name for this column
type: string
description:
description: Description of the column
type: string
- $ref: '#/components/schemas/DataType'
EntryHeader:
type: object
properties:
name:
description: Displayed name for this header
type: string
tooltip:
description: Displayed tooltip for this header. Optional, no tooltip is applied if absent.
type: string
allOf:
- type: object
properties:
name:
description: Displayed name for this header
type: string
tooltip:
description: Displayed tooltip for this header. Optional, no tooltip is applied if absent.
type: string
- $ref: '#/components/schemas/DataType'
required:
- name
XYModel:
Expand Down Expand Up @@ -1954,23 +1970,13 @@ components:
- xValues
- yValues
XYAxis:
type: object
properties:
label:
description: Label to apply to the axis
type: string
unit:
description: The units used for this axis, to be appended to the data
type: string
dataType:
description: Type of data this series represents. Gives a hint on the formatting to give to the data
type: string
enum:
- NUMBER
- BINARY_NUMBER
- TIMESTAMP
- DURATION
- STRING
allOf:
- type: object
properties:
label:
description: Label to apply to the axis
type: string
- $ref: '#/components/schemas/DataType'
TimeGraphModel:
type: object
properties:
Expand Down

0 comments on commit 8897d35

Please sign in to comment.