numinnex opened a new issue, #4727:
URL: https://github.com/apache/iggy/issues/4727
### Bug description
Two requests in `core/server/server.http` no longer match what the server
accepts.
1. **`POST /streams/{stream_id}/topics`** sends `compression_algorithm`,
`max_topic_size` and `message_expiry` at the top level. Since
`refuse_misplaced_options` was added (#4615), the server rejects these with 400
`InvalidCommand`, naming `compression_algorithm` first. They belong in the
`options` map.
2. **`PUT /streams/{stream_id}/topics/{topic_id}`** sends
`compression_algorithm`, which can only be set when the topic is created. The
server answers with `OptionNotUpdatable` (4103), also a 400.
Possibly a third: in `POST .../messages`, the example header values look the
wrong size for their kinds. The `uint32` value `"Kg=="` decodes to 1 byte and
the `int32` value `"AAAA"` to 3. We did not confirm that the HTTP path rejects
them.
An external tester hit the first one: copying the topic-create body from
`server.http` returned a 400.
### Affected area / component
Server: HTTP API examples
### Proposed fix
Move the options into `"options": {...}` in the create request, drop
`compression_algorithm` from the update request, and fix the header example
values.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]