docson icon indicating copy to clipboard operation
docson copied to clipboard

Enum value false doesn't render

Open zbodor-gs opened this issue 5 years ago • 1 comments

Hi, I guess because of an old Handlebars bug (https://github.com/wycats/handlebars.js/issues/827) false enum values (and thus 'constant' values too) don't render properly: they result in an empty string.

For example

{
  "type": "object",
  "properties": {
    "testTrue": {
      "type": "boolean",
      "enum": [ true ]
    },
    "testFalse": {
      "type": "boolean",
      "enum": [ false ]
    }
  }
}

results in

image

Is it possible to update the underlying handlebars lib to a newer version to fix this bug?

Thanks, Zoli

(Possible workarounds until then: https://stackoverflow.com/questions/17664323/handlebars-doesnt-render-boolean-variables-when-false)

zbodor-gs avatar Feb 04 '20 14:02 zbodor-gs

Hi! Can you submit a PR with the change? I don't have a lot of tuits to work on this project, but I should be at least be able to merge and publish PRs.

yanick avatar Feb 06 '20 21:02 yanick