Skip to content

Latest commit

 

History

History
42 lines (24 loc) · 1.92 KB

0007-namespace-media-types.md

File metadata and controls

42 lines (24 loc) · 1.92 KB
  • Start Date: 2015-11-18
  • RFC PR: #18

Summary

Provide media types for each namespace.

Motivation

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.

Detailed design

The following media types are proposed for each respective namespace.

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.

Drawbacks

The only drawback would be media type explosion.

Alternatives

As said, we can convey inside the document the namespace(s) used and use a Refract-generic media type.

Unresolved questions

None.