[BUG] POST endpoint playgrounds on http://api.openapi-generator.tech are broken
Created by: mpiroc
Bug Report Checklist
-
Have you provided a full/minimal spec to reproduce the issue? -
Have you validated the input using an OpenAPI validator (example)? -
What's the version of OpenAPI Generator used? -
Have you search for related issues/PRs? -
What's the actual output vs expected output? -
[Optional] Bounty to sponsor the fix (example)
Description
The POST endpoints throw the same error (a Jackson serialization error) regardless of what language/framework you request, or which OpenAPI document you specify. Example:
{
"timestamp": "2019-10-04T22:26:58.306Z",
"status": 500,
"error": "Internal Server Error",
"message": "Type definition error: [simple type, class io.swagger.models.auth.SecuritySchemeDefinition]; nested exception is com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `io.swagger.models.auth.SecuritySchemeDefinition` (no Creators, like default construct, exist): abstract types either need to be mapped to concrete types, have custom deserializer, or contain additional type information\n at [Source: (PushbackInputStream); line: 9, column: 25] (through reference chain: org.openapitools.codegen.online.model.GeneratorInput[\"securityDefinition\"])",
"path": "/api/gen/clients/typescript-inversify"
}
openapi-generator version
Tested on:
4.2.0-SNAPSHOT
4.1.2
OpenAPI declaration file content or url
https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml I also tried with several other definitions, both from the OpenAPITools repo, and by third parties.
{
"authorizationValue": {
"keyName": "string",
"type": "string",
"value": "string"
},
"openAPIUrl": "https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml",
"options": {},
"securityDefinition": {
"description": "string",
"type": "string"
},
"spec": {}
}
Command line used for generation
N/A -- I used http://api.openapi-generator.tech
Steps to reproduce
- Visit http://api.openapi-generator.tech in your browser.
- Expand the client POST endpoint and enter any language for the 'language' field (tested with typescript-inversify, typescript-nodejs, javascript, and java) OR Expand the server POST endpoint and enter any framework for the 'framework' field.
- Enter any language for the 'language' field (tested with typescript-inversify, typescript-nodejs, javascript, and java)
- Leave the default request as-is (I also tried pointing it at a number of other OpenAPI definition docs, with the same results).
- Click
Try