Skip to content

Conversation

@jtassin
Copy link
Contributor

@jtassin jtassin commented Dec 21, 2018

Support of the nullable option of ajv (Open API 3 specification) on object.

An object declared nullable can have a null value.

Today, a null object stringified lead to this error:

TypeError: Cannot read property 'toJSON' of null

As described in the issue #130

@mcollina
Copy link
Member

@jtassin I do not think this is fixing #130. Can you also add a unit test/fix for that case?

@mcollina
Copy link
Member

Can you also add some docs in the readme about nullable?

@jtassin
Copy link
Contributor Author

jtassin commented Dec 21, 2018

Thx @mcollina for your feedback.

I'll add tests on #130 specific case and some docs.

@jtassin jtassin force-pushed the feature/better-null-support branch from a9205c9 to 18b24ae Compare December 21, 2018 20:42
@jtassin jtassin force-pushed the feature/better-null-support branch from 18b24ae to 209a343 Compare December 21, 2018 20:44
@jtassin
Copy link
Contributor Author

jtassin commented Dec 21, 2018

Here comes a few docs and a test case on #130 issue.

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mcollina mcollina merged commit 073b41e into fastify:master Dec 22, 2018
@mcollina
Copy link
Member

Thanks you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants