Uploaded image for project: 'RAML Module Builder'
  1. RAML Module Builder
  2. RMB-319

Multiple content types for POST does not work

    XMLWordPrintable

Details

    • CP: Roadmap backlog
    • 5
    • Core: Platform

    Description

      Consider:

      #%RAML 1.0
      title: API with Types
      types:
        User: !include user.schema
      
      /users/{id}:
        post:
          description: Post user in XML format
          body:
            application/xml:
              type: string
            application/json:
              type: User
          responses:
            201:
              description: OK
              body:
                application/xml:
                  type: string
                  example: "<x>y</x>"
      

      RMB rejects this:

      curl -HX-Okapi-Tenant:testlib -HContent-Type:application/xml -XPOST -d'<xml/>' http://localhost:8081/users/1
      Content-type header must be ["application/json"] but it is "application/xml"
      

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                adam Adam Dickmeiss (Inactive)
                adam Adam Dickmeiss (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases