Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix, clarify, and simplify content type schemas #2351

Merged
merged 6 commits into from
Feb 11, 2021

Commits on Sep 17, 2020

  1. Fix, clarify, and simplify content type schemas

    This fixes OAI#2349, which caught that an encoded PNG image
    is encoded into a text media type.
    
    In the process I realized some other errors, and simplified things.
    
    * HTTP `Content-Type` is always handled by OAS
        * Media Type Object key in most cases
        * Encoding object (possibly inferred from schema) in `multipart/form-data`
    * HTTP-level `Content-Encoding` is always handled by the OAS Header Object
    * JSON Schema "content*" is used for embedding one media type into another
        * the encoded resource is of media type `text/plain`
        * `"contentMediaType"` is the embedded media type after decoding
        * `"contentEncoding"` is how to encode/decode binary to/from text
    
    This removes any chance of `"contentMediaType"` conflicting with
    the Media Type Object key or with `contentType` in the Encoding Object,
    as they now always do different things.
    
    Likewise, the HTTP `Content-Encoding` header (with values like
    gzip, deflate, etc.) does different things than `"contentEncoding"`
    (which has values like base64, base64url, quoted-printable, etc.).
    
    The deprecated part header `Content-Transfer-Encoding` is likewise
    handled in the Encoding Object, but is probably never used.
    handrews committed Sep 17, 2020
    Configuration menu
    Copy the full SHA
    8ae8aa9 View commit details
    Browse the repository at this point in the history

Commits on Jan 21, 2021

  1. Fix Content-Type to indicate semantics

    ...rather than literal content format on the wire.
    handrews committed Jan 21, 2021
    Configuration menu
    Copy the full SHA
    7477f9b View commit details
    Browse the repository at this point in the history

Commits on Jan 28, 2021

  1. Update 3.1.0.md

    Fixed a typo and changed a SHOULD to MAY.
    darrelmiller authored Jan 28, 2021
    Configuration menu
    Copy the full SHA
    9321a4b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ed267e3 View commit details
    Browse the repository at this point in the history

Commits on Feb 11, 2021

  1. Configuration menu
    Copy the full SHA
    fd8cb80 View commit details
    Browse the repository at this point in the history
  2. Describe interaction between JSON Schema contentEncoding and HTTP Con…

    …tent-Encoding header
    
    Co-authored-by: Mike Kistler <mkistler@us.ibm.com>
    darrelmiller and Mike Kistler authored Feb 11, 2021
    Configuration menu
    Copy the full SHA
    90e4d36 View commit details
    Browse the repository at this point in the history