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

Formatting for application/xml body #2070

Open
SoftMadHatter opened this issue Mar 17, 2022 · 3 comments
Open

Formatting for application/xml body #2070

SoftMadHatter opened this issue Mar 17, 2022 · 3 comments
Labels
enhancement New feature or request triaged

Comments

@SoftMadHatter
Copy link

SoftMadHatter commented Mar 17, 2022

Describe the bug

Request body in applicaiton/xml is formatted as JSON in samples/request.
Is this a bug or xml is not (and will not) be supported ?

To Reproduce

  1. Given this OpenAPI document
openapi: 3.0.1
info:
  title: Super API
paths:
  /api/post:
    post:
      summary: Submit somthing
      operationId: writtenItem
      requestBody:
        description: request
        content:
          application/xml:
            schema:
              $ref: '#/components/schemas/Deposit'
        required: true
      responses:
        "200":
          description: Returns an `OK` response on success
          content:
            application/xml:
              schema:
                $ref: '#/components/schemas/Deposit'
        "400":
          description: Returns an `NOK` response on failure
          content:
            application/xml:
              schema:
                $ref: '#/components/schemas/Deposit'
components:
  schemas:
    Deposit:
      required:
      - itle
      - lang
      - text
      type: object
      properties:
        Title:
          type: string
          description: "The title"
          example: Super Title
        lang:
          type: string
          description: "ISO ISO 639 alpha-2 code"
          example: de
        text:
          minLength: 1
          type: string
          description: The text
      description: A request for submission
  1. See error (screenshot below)

Expected behavior

Request in XML ex.

<deposit>
   <title>Super Title</title>
   <lang>de</lang>
   <text>string</text>
</deposit>

Screenshots
image

@mnaumanali94 mnaumanali94 added the enhancement New feature or request label Mar 24, 2022
@paul-uz
Copy link

paul-uz commented Jun 16, 2023

Any movement on this?

@HebeHH
Copy link

HebeHH commented Jul 19, 2023

I would also appreciate this!

@HebeHH
Copy link

HebeHH commented Feb 19, 2024

Any likelihood this will be built out anytime soon?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triaged
Projects
None yet
Development

No branches or pull requests

5 participants