Skip to content

What is the meaning of a Media Type Object with no schema defined? #2874

Closed Answered by webron
kerrykimbrough asked this question in Q&A
Discussion options

You must be logged in to vote

Not exactly. When you define the media type, you're telling the user what is expected to go over the wire. The schema is there to help validate the actual content. However, in many cases, a schema doesn't make sense - PDFs, audio files, binary files and so on, so specifying the schema is pointless.

At the moment, we only support JSON Schema for the Schema Object, meaning you can only describe JSON payloads (and to some limited extent XMLs). Had we supported things like XSD (which we may in the future), that would allow you to define schemas (or something similar) for additional media types.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by kerrykimbrough
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants