imIfOu / jsonschema-module-addon

Module for the jsonschema-generator – deriving JSON Schema attributes from annotations

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

defaultValue should not be limited to string

foldvari opened this issue · comments

The default value is not always a string. E.g. in the below example it is a boolean constant:

"isActive": {
  "default": false,
  "type": "boolean"
}

The defaultValue property of the annotation does not support cases when it is not a string.
I am not sure though if this is a limitation of this extension or jsonschema-generator itself.

commented

Making null available as a default would also be useful