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

Support Multiple Media Types Request Bodies #222

Closed
gracekarina opened this issue Nov 18, 2017 · 2 comments
Closed

Support Multiple Media Types Request Bodies #222

gracekarina opened this issue Nov 18, 2017 · 2 comments
Assignees
Labels

Comments

@gracekarina
Copy link
Contributor

Support Form Data Request Bodies

@gracekarina gracekarina self-assigned this Nov 18, 2017
@gracekarina gracekarina changed the title Support Form Data Request Bodies Support Multiple Media Types Request Bodies Dec 26, 2017
@gracekarina
Copy link
Contributor Author

gracekarina commented Jan 6, 2018

info:
  title: httpbin
  version: '1.0'
servers:
  - url: http://httpbin.org
  - url: https://httpbin.org

paths:
  /post:
    post:
      summary: Returns the POSTed data
      requestBody:
        content:
          application/json:
            schema:
              nullable: true
              anyOf:
                - type: object
                  additionalProperties: {}
                - type: array
                  items: {}
                - type: string
                - type: number
                - type: boolean
          application/xml:
            schema:
              $ref: '#/components/schemas/PizzaOrder'
          text/plain:
            schema:
              type: string
              example: Hi there
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PizzaOrder'
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                description:
                  type: string
      responses:
        '200':
          description: OK

components:
  schemas:
    PizzaOrder:
      type: object
      properties:
        custname:
          type: string
          example: Alice
        custtel:
          type: string
          example: +1-202-555-0100
        custemail:
          type: string
          format: email
          example: [email protected]
        size:
          type: string
          enum:
            - small
            - medium
            - large
        topping:
          type: array
          items:
            type: string
            enum:
              - bacon
              - cheese
              - mushroom
              - onion
        delivery:
          type: string
          example: '13:30'
        comments:
          type: string
          example: ASAP

@gracekarina
Copy link
Contributor Author

solved by #241

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant