TouK/nussknacker

`application/json` not fully supported in OpenAPI enrichments

trombka opened this issue · 0 comments

When using OpenAPI components with a service providing application/json request body not all JSON values are supported.
The only supported value is a JSON object.
When an OpenAPI service specifies a request as a JSON array, string, number or boolean, an empty request is always sent to the service with the Content-type header set to text/plain. Although the designer has a form field to describe the request body.

For instance, the following is a valid request definition, which is not handled properly:

openapi: 3.0.0
[...]
paths:
  /some:
    post:
      [...]
      requestBody:
        content:
          'application/json':
            schema:
              type: string
[...]