jdorn / json-editor

JSON Schema Based Editor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multiple checkbox enum with references

alb3ric opened this issue · comments

Hello,

I'm trying to display a multiple checkbox choice for an enum. But if my enum is a reference it is not rendering it as a multiple checkbox. Here is my example :

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Paramètres fonctionnels",
  "type": "object",
  "additionalProperties": false,
  "properties": {
   "With Ref" : {
      "type": "array",
      "uniqueItems": true,
       "items": {
         "$ref": "#/definitions/Colors"
      }
    },
    "Without Ref" : {
       "type": "array",
       "uniqueItems": true,
       "items": {
        "type": "string",
        "enum": ["Red","Blue","Yellow" ]
     }
    }
  },
  "definitions": {
    "Colors": {
      "type": "string",
      "description": "",
      "x-enumNames": [
        "Red",
        "Blue",
        "Yellow"
      ],
      "enum": [
        "Red",
        "Blue",
        "Yellow"
      ]
    }
  }
}

You can see it here :

http://jeremydorn.com/json-editor/?schema=N4IgJAzgxgFgpgWwIYgFwhgF0wB1QenwCsIB7AOwFpp5kA6UgJwHN8ATRpAM00oAYALPhqIkAYhAAaEJgCWmADZw0IAApJOCABeZGcCAAIuFKHIrk4CiFJkBPHMvSkARkTimbSNm3myKSBVVGUgdGOX00LgCIOGkcYNDw61RQAHV5GAMAJTguNFBMe0cQDU5bGwBXclkARwq4AElMRGTdeul5FvzwPTz0MXZc2Wqzcgh8AGFSBSZrAF856XTMGFIKzGzc7sKHFVKkcukq2vqmrtQ22JBOhGSCopUIXWHmGzhyCoQ0AG0QHLYbAAhBT1GwATUsMwA7iAALoLRYgNhDEZ+MbdKYzRh3Oy7dBPRgvN4fL6oX7/IEg5TSCEKaFwhFAA=&value=N4Ig6glgLgFgBAJQKYDMQC4DaBdANOaGAewFcpFUMcBfIA==&theme=bootstrap2&iconlib=fontawesome4&object_layout=normal&show_errors=interaction