Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #4066
Closed
Open
Issue created Oct 04, 2019 by Administrator@rootContributor5 of 6 checklist items completed5/6 checklist items

[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
  1. Visit http://api.openapi-generator.tech in your browser.
  2. 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.
  3. Enter any language for the 'language' field (tested with typescript-inversify, typescript-nodejs, javascript, and java)
  4. Leave the default request as-is (I also tried pointing it at a number of other OpenAPI definition docs, with the same results).
  5. Click Try
Related issues/PRs
Suggest a fix
Assignee
Assign to
Time tracking