I have API yaml specification that defines what should be the response from each endpoint, e.g. I want that /version
returns version1.0
as defined:
openapi: "3.0.3"
info:
title: "TITLE"
description: "DESCRIPTION"
version: "1.0.0"
paths:
/version:
get:
description: "description"
responses:
"200":
description: "description"
content:
application/json:
schema:
$ref: '#/components/schemas/version'
components:
schemas:
version:
type: object
properties:
version:
type: string
example:
"version": "version1.0"
API server that runs on Swaggerhub works like expected, but e.g. python-flask server stub generated by Swaggerhub and run locally on my machine returns do some magic!
for every endpoint and not the example
provided in yaml. The same with server stubs generated using swagger-codegen and openapi-generator.
I am mainly interested in making it work for openapi-generator generated server stub.