Skip to content

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

Merged
sunbryely-influxdata merged 1 commit intoinfluxdata:masterfrom
bednar:fix-bucket-schemas
Nov 7, 2022
Merged

fix(bucket schemas): requestBody for createMeasurementSchema and updateMeasurementSchema should be required#607
sunbryely-influxdata merged 1 commit intoinfluxdata:masterfrom
bednar:fix-bucket-schemas

Conversation

@bednar
Copy link
Copy Markdown
Contributor

@bednar bednar commented Nov 6, 2022

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"
}

…`updateMeasurementSchema` should be required
@bednar bednar marked this pull request as ready for review November 6, 2022 20:32
@bednar bednar requested a review from a team as a code owner November 6, 2022 20:32
@bednar bednar requested review from noramullen1 and removed request for a team November 6, 2022 20:32
@bednar
Copy link
Copy Markdown
Contributor Author

bednar commented Nov 6, 2022

cc @jstirnaman, @sunbryely-influxdata

Can you take a look?

@bednar
Copy link
Copy Markdown
Contributor Author

bednar commented Nov 7, 2022

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

@sunbryely-influxdata sunbryely-influxdata merged commit 4a95780 into influxdata:master Nov 7, 2022
jstirnaman added a commit that referenced this pull request Nov 8, 2022
* 'master' of github.com:influxdata/openapi:
  chore: use /latest alias for OSS URL substitutions. (#603)
  fix(bucket schemas): `requestBody` for `createMeasurementSchema` and `updateMeasurementSchema` should be required (#607)
  fix(tasks): `orgID` should not be required for GetTasks (#606)
  chore(aim): Add Operator Entitlements Endpoints (#595)
  chore(aim): Add 403 to Org Creation Endpoints (#597)
  chore(invocable-scripts): add /api/v2/scripts/SCRIPT_ID/params (#593)
  Chore/api reference scripts delete (#444)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants