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>
Running Kusk Mocking:
Returns the following: