jdorn / json-editor

JSON Schema Based Editor
MIT License
5.81k stars 1.08k forks source link

Extend/Expand json schema properties #442

Open CalaxDev opened 9 years ago

CalaxDev commented 9 years ago

Hello there. In hopes that someone here reads this and could help me out - I tried it over at the GitHub Json-schema GitRepo and it died off silently as no one replied.

So, I currently have a Schema using Localization (which is implemented by myself via code), tough I had to make modifications so that it doesnt really conform Draft04 anymore. It looks like this, as an Example:

 "title": {
    "x-none": "default text since no default language was used",
    "de-AT": "austrian german",
    "de": "germany german",
    "en": "general english"
  } 

As you all might know, the property "title" is of type String. Now I wanted to ask if it was possible to extend/expand the "title" so that it does not only accept strings, but an object containing strings. Currently it is according to Draft-04

"title": { "format": "string" } But I think I would need something like: "title": { "oneOf":[ { "type": "string"}, {"type": "object"} ] }

Is there any way to do this?

stevage commented 9 years ago

Does this work for you? link