Closed sukhrajm closed 8 years ago
Quick question: is this only applicable for StringSchema
? I see one reference from HyperSchema
.
Hmmh. Actually, looking at https://tools.ietf.org/html/draft-zyp-json-schema-03#section-6 I only see references to mediaType
in HyperSchema
section... which makes me wonder if this change actually should be made at all. Why do you think it belong in StringSchema
?
We were using it for a property represented by a stringschema. There were other properties that we used in a StringSchema (maxLength, minLength, pattern). I was thinking that i could describe what media type that property would hold.
@sukhrajm what I want to know is simply how mediaType
should be handled in general: and since HyperSchema
does contain it, if that would work. If not, whether this should be something that all schema types should have. So basically looking at this from JSON Schema logical model perspective: not just what your particular use case needs (although obviously that is what matters to you, nothing wrong with that).
So I am not against this addition but I would like to know the bigger picture first.
I'll see if anyone on the mailing list can help.
It seems like mediatype should belong with any of the simple types so that it can be set for any property rather than just a link. Just seems restrictive that is just part of a linkdescription object.
Changes to add mediatype to the StringSchema according to json schema 0.3. Media type is specified in the schema but previously there was no way to set the media type on a StringSchema.