influxdata / openapi

An OpenAPI specification for influx (cloud/oss) apis.
MIT License
17 stars 10 forks source link

fix(bucket schemas): `requestBody` for `createMeasurementSchema` and `updateMeasurementSchema` should be required #607

Closed bednar closed 1 year ago

bednar commented 1 year ago

The request body should be marked as a required. Without required the OpenAPI generator allow creates request without body which causes InfluxDB error:

>>> Request: 'POST https://us-west-2-1.aws.cloud2.influxdata.com/api/v2/buckets/7100bd8a60da51ca/schema/measurements?orgID=04014de4ed590000'
>>> Accept: application/json
>>> Content-Type: application/json
>>> Authorization: ***
>>> User-Agent: influxdb-client-python/1.34.0dev0
>>> Body: None
<<< Response: 400
<<< Date: Sun, 06 Nov 2022 20:31:04 GMT
<<< Content-Type: application/json; charset=utf-8
<<< Content-Length: 67
<<< Connection: keep-alive
<<< trace-id: d86c9bd64c29c43d
<<< trace-sampled: false
<<< x-platform-error-code: invalid
<<< Strict-Transport-Security: max-age=15724800; includeSubDomains
<<< X-Influxdb-Request-ID: 83205924ffa18967e95a3ce441b2bb7b
<<< X-Influxdb-Build: Cloud
<<< Body: {
    "code": "invalid",
    "message": "failed to unmarshal json: EOF"
}
bednar commented 1 year ago

cc @jstirnaman, @sunbryely-influxdata

Can you take a look?

bednar commented 1 year ago

@sunbryely-influxdata thanks for your approval. Can you merge this PR? I don't have a permission...