influxdata / influxdata/openapi
InfluxDB 2.0: The LabelResponse schema isn't used for "/scrapers/{scraperTargetID}/labels" and "/buckets/{bucketID}/labels" (POST method) [area/api]
- Dominant language
- Shell
- Stars
- 18
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Description
The `POST` response for `/scrapers/{scraperTargetID}/labels` and `/buckets/{bucketID}/labels` is defined as inner object:
```yaml
'/scrapers/{scraperTargetID}/labels':
post:
tags:
- ScraperTargets
summary: add a label to a scraper target
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: scraperTargetID
schema:
type: string
required: true
description: ID of the scraper target
requestBody:
description: label to add
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/Label"
responses:
'200':
description: a list of all labels for a scraper target
content:
application/json:
schema:
type: object
properties:
labels:
$ref: "#/components/schemas/Labels"
links:
$ref: "#/components/schemas/Links"
...
'/buckets/{bucketID}/labels':
post:
tags:
- Buckets
summary: add a label to a bucket
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: bucketID
schema:
type: string
required: true
description: ID of the bucket
requestBody:
description: label to add
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/LabelMapping"
responses:
'200':
description: a list of all labels for a bucket
content:
application/json:
schema:
type: object
properties:
labels:
$ref: "#/components/schemas/Labels"
links:
$ref: "#/components/schemas/Links"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
```
but has to be defined as `LabelResponse` (same type as for `GET`).
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.