Skip to content

Encoding object has style and contentType #1551

Closed
@jwalton

Description

@jwalton

Let's say I have:

requestBody:
  content:
    application/x-www-form-urlencoded:
      schema:
        type: object
        properties:
          address:
            type: object
            properties: {}
      encoding:
        address:
            contentType: "application/json" # This is the default
            style: form # This is the default
            explode: true # This is the default

Since encoding has both a contentType and a style, what do I do with the address property? Do I decode it as an exploded form object? Do I extract the value of 'address' from the message body and run it through JSON.parse()? Do I decode it as an exploded form, but run the value of each key through JSON.parse()?

Or does contentType here only apply to multipart bodies?

Metadata

Metadata

Assignees

Labels

media and encodingIssues regarding media type support and how to encode data (outside of query/path params)

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions