apispec
apispec copied to clipboard
Optionally disable 'nullable' values to follow Typescript convention.
Previously, apispec.ext.marshmallow accepted both undefined and null
values for optional fields. This is different from the convention
followed by Typescript, which uses only undefined values in preference
over null.
See: https://github.com/Microsoft/TypeScript/wiki/Coding-guidelines#null-and-undefined
This commit adds an option called allow_null that enables the new
functionality. By default, the previous convention is followed for
backward compatibility.