- Start Date: 2015-11-18
- RFC PR: #18
Provide media types for each namespace.
Users of the namespaces should all use the same media types when exchanging documents so that it can be adequately conveyed what namespace is being used. If a generic media type is used for all Refract, the document should convey the namespace used within the document. Using a namespace-specific media type provides a way to convey that outside of the document.
The following media types are proposed for each respective namespace.
- API Description Namespace -
application/vnd.refract.api-description
- Data Structure -
application/vnd.refract.data-structure
- Parse Result -
application/vnd.refract.parse-result
In each case, the format used MUST be added as a suffix. For example, when exchanging the JSON format of a parse result representation, you would use:
application/vnd.refract.parse-result+json
All suffixes MUST conform to the structured syntax registry. YAML formats MUST use +yaml
.
The full refract version MUST be used with all representations prefixed with application/vnd.refract
.
Additionally, we SHOULD register all media types we use with the IANA media type registry.
The only drawback would be media type explosion.
As said, we can convey inside the document the namespace(s) used and use a Refract-generic media type.
None.