Open mcpicoli opened 3 months ago
There's a PR to add a nullable
feature. Does this meet your concerns? https://github.com/knuckleswtf/scribe/pull/834
There's a PR to add a
nullable
feature. Does this meet your concerns? #834
Only if it is implemented into the HTML docs and Postman collection as well.
Scribe version
4.34.0
Your question
How do I specify and send a NULL value as a possible input for a field?
For example, one of the parameters of my API accepts an integer or NULL for some user operation:
Content-Type
andAccept
are bothapplication/json
. That is important since if data was sent using URLEncoded values, there wouldn't be this possibility unless (controversially) encoding NULL as %00 as a missing value for an existing parameter would mean "empty string" not NULL.Sending a NULL value is completely different from omitting the value for the API being documented. A NULL value means "no user_id for verification" (maybe changing it from some previous integer value), omitting it means "do not change the user for verification".
How do I specify that this parameter accepts a valid integer or NULL as valid input?
When the documentation is generated...
string
), it is sent as the "null"string
.Maybe I am missing something obvious?
P.S.: The same question may be extended to "How do I specify and send an empty string value for a field?"
Docs