apispec icon indicating copy to clipboard operation
apispec copied to clipboard

Optionally disable 'nullable' values to follow Typescript convention.

Open h opened this issue 5 years ago • 0 comments

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.

h avatar Apr 28 '20 03:04 h