Another consumer of Apidog mentioned this but as I dug into it I can see it would be very helpful. Currently there is no way to set the mock value to NULL other than setting the JSON schema to null – if you have a nullable string, faker will populate it with placeholder text. Faker itself does not support null as a value (I’m guessing they assume you would set it as a fixed value rather than having the engine generate null), so it would be nice if the dropdown allowed setting NULL in the Apidog interface. Tagging Reja
May I ask if the dropdown allowed setting NULL mean this?
that would set the only acceptable value to null. Note in my screenshot that it’s set to “string” but the N next to it allows it to be nullable. This is represented in the OpenAPI contract as a field with the type “string” and “nullable” set to true. What I’m asking for is a way to additionally set the mock data to null so when Apidog auotgenerates a payload it will send a null.
Good thought but give it a try. Unfortunately typing the word “null” in the mock field creates a string with the word “null” as a quoted string.
that would set the only acceptable value to null. Note in my screenshot that it’s set to “string” but the N next to it allows it to be nullable. This is represented in the OpenAPI contract as a field with the type “string” and “nullable” set to true. What I’m asking for is a way to additionally set the mock data to null so when Apidog auotgenerates a payload it will send a null.