FasterXML / jackson-module-jsonSchema

Module for generating JSON Schema (v3) definitions from POJOs
371 stars 135 forks source link

Support for "media" property #65

Open vivin opened 9 years ago

vivin commented 9 years ago

Section 4.3 of the JSON Schema specification mentions the media property, which is used to give additional hints about the semantics of non-JSON data that is encoded as a JSON string. For example:

{
    "type": "string",
    "media": {
        "binaryEncoding": "base64",
        "type": "image/png"
    }
}

I think an annotation of some sort might help perhaps. The serializer can check to see if an annotation is present on that property and if so, it can generate the media property.