mirror of https://github.com/zulip/zulip.git
bd9a1dc971
Although our POST /messages handler accepts the ‘to’ parameter with or without JSON encoding, there are two problems with passing it as an unencoded string. Firstly, you’d fail to send a message to a stream named ‘true’ or ‘false’ or ‘null’ or ‘2022’, as the JSON interpretation is prioritized over the plain string interpretation. Secondly, and more importantly for our tests, it violates our OpenAPI schema, which requires the parameter to be JSON-encoded. This is because OpenAPI has no concept of a parameter that’s “optionally JSON-encoded”, nor should it: such a parameter cannot be unambiguously decoded for the reason above. Our version of openapi-core doesn’t currently detect this schema violation, but after the next upgrade it will. Signed-off-by: Anders Kaseorg <anders@zulip.com> |
||
---|---|---|
.. | ||
api-doc-template.md | ||
api-keys.md | ||
changelog.md | ||
client-libraries.md | ||
configuring-python-bindings.md | ||
construct-narrow.md | ||
create-stream.md | ||
deploying-bots.md | ||
incoming-webhooks-overview.md | ||
incoming-webhooks-walkthrough.md | ||
index.md | ||
installation-instructions.md | ||
integrations-overview.md | ||
mark-all-as-read.md | ||
missing.md | ||
non-webhook-integrations.md | ||
outgoing-webhooks.md | ||
real-time-events.md | ||
rest-error-handling.md | ||
rest.md | ||
roles-and-permissions.md | ||
running-bots.md | ||
send-message.md | ||
sidebar_index.md | ||
writing-bots.md |