Postel's Law


#1

Do we violate Postel’s law when we require case-sensitive mediaTypeExtensions? Rather than define 15 or more aliases, could a new RAML version support canonicalization? E.g.

#%RAML INVALID
mediaTypeExtension:
  description: |
    The enum key is the canonical value returned
    for a matching pattern.
  enum:
    - .json
      pattern: /\.json\Z/i
    - .html
      pattern: /\.html?\Z/i

This could be generalized for resources:

#RAML INVALID
/{login}:
  uriParameters:
    login:
      enum:
        - login
          pattern: /login|logon/

Responses would be required to use an enum constant, but humans using curl could get away with equivalents.