Uploaded image for project: 'Red Hat 3scale API Management'
  1. Red Hat 3scale API Management
  2. THREESCALE-6379

text/plain content rendered as array of chars

    XMLWordPrintable

Details

    • False
    • False
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • No
    • Undefined
    • Hide

      Try to add an endpoint that returns a Content-Type: text/plain to an OAS3 for an ActiveDocs to one of the services in 3scale.

      Example:

      {
        "paths": {
          "/test": {
            "get": {
              "operationId": "getOpenText",
              "responses": {
                "200": {
                  "content": {
                    "text/plain": {
                      "schema": {
                        "type": "string"
                      }
                    }
                  },
                  "description": "OK"
                }
              },
              "tags": [
                "tests-controller"
              ]
            }
          }
        },
        "openapi": "3.0.1",
        "info": {
          "description": "A service with test endpoints",
          "title": "Test service",
          "version": "1.5-SNAPSHOT"
        },
        "components": {
          "securitySchemes": {
            "bearerAuth": {
              "description": "Oauth2 flow",
              "flows": {
                "clientCredentials": {
                  "scopes": {
                    "test.write": "for write operations",
                    "test.read": "for read operations"
                  },
                  "tokenUrl": "https://test.com/v1/oidc/authorization"
                }
              },
              "type": "oauth2"
            }
          }
        },
        "servers": [
          {
            "url": "https://echo-api.3scale.net"
          }
        ]
      }
      
      Show
      Try to add an endpoint that returns a Content-Type: text/plain to an OAS3 for an ActiveDocs to one of the services in 3scale. Example: { "paths" : { "/test" : { "get" : { "operationId" : "getOpenText" , "responses" : { "200" : { "content" : { "text/plain" : { "schema" : { "type" : "string" } } }, "description" : "OK" } }, "tags" : [ "tests-controller" ] } } }, "openapi" : "3.0.1" , "info" : { "description" : "A service with test endpoints" , "title" : "Test service" , "version" : "1.5-SNAPSHOT" }, "components" : { "securitySchemes" : { "bearerAuth" : { "description" : "Oauth2 flow" , "flows" : { "clientCredentials" : { "scopes" : { "test.write" : " for write operations" , "test.read" : " for read operations" }, "tokenUrl" : "https: //test.com/v1/oidc/authorization" } }, "type" : "oauth2" } } }, "servers" : [ { "url" : "https: //echo-api.3scale.net" } ] }

    Description

      When an endpoint returns a Content-Type: text/plain ActiveDocs on developer/admin portal readers it as an array of chars.
      Using the same OAS3 on another OAS3 renderer (eg. swagger.io) it works as expected.
      Example:

      {"0":"t","1":"e","2":"x","3":"t","servers":[]}
      
      Response headers
       cache-control: no-cache, no-store, max-age=0, must-revalidate 
       content-length: 5 
       content-type: text/plain;charset=UTF-8 
       expires: 0 
       pragma: no-cache 
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            rhn-support-cpalmier Carlo Palmieri (Inactive)
            Carlo Palmieri Carlo Palmieri (Inactive)
            Damian Peralta Damian Peralta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: