kubeshop / kusk-gateway

Kusk-gateway is an OpenAPI-driven API Gateway for Kubernetes
https://kubeshop.github.io/kusk-gateway/
MIT License
253 stars 21 forks source link

Mocking with external returns an error #902

Open aabedraba opened 1 year ago

aabedraba commented 1 year ago
openapi: 3.0.0
info:
  title: my-api
  version: 1.0.0
x-kusk:
  mocking:
    enabled: true
paths:
  /hola:
    get:
      summary: Get a list of things
      responses:
        200:
          description: A list of things
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: https://pastebin.com/raw/EraFtUQq

Running Kusk Mocking:

kusk mock -i api.yaml

Returns the following:

curl localhost:8081/hola

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Unexpected error</title>
</head>
<body>
<h1>Unexpected error</h1>
<p>An unexpected error occurred:<br>[coordinatingGenerator] failed to generate response data:<br> [regularArrayGenerator] error occurred while generating array value:<br> [coordinatingSchemaGenerator] data generation for objects of type '' is not supported</p>
<p>
If you see this message, please investigate your specification for errors.
If it seems to be a problem with the application, then make an issue at the project page
<a href="https://github.com/muonsoft/openapi-mock/issues">https://github.com/muonsoft/openapi-mock/issues</a>.
Thank you for your support.
</p>
</body>
</html>