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
  • #8966
Closed
Open
Issue created Mar 13, 2021 by Administrator@rootContributor5 of 6 checklist items completed5/6 checklist items

[BUG][SCALA-AKKA] Doesn't generate models when defined inline (reproduced for java & scala-akka)

Created by: Coder-DG

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output? No models generated vs models generated
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

Running java -jar openapi-generator-cli.jar generate -i 'swagger.json' -g scala-akka -o scala_client --generate-alias-as-model (also without config and/or without --generate-alias-as-model), doesn't produce any model libs.

Removing "additionalProperties": false, from the inline schema def makes it generate model classes. What also works is to define the schema using definitions + "$ref" : "..." - but that's not really feasible with the library I'm using for my server.

openapi-generator version

5.0.1 and also tested with openapi-generator-cli-5.1.0-20210304.083949-99.jar

OpenAPI declaration file content or url

swagger.json gist

Generation Details

X

Steps to reproduce

Just run java -jar openapi-generator-cli.jar generate -i 'swagger.json' -g scala-akka -o scala_client where swagger.json is the file I linked above, and the jar is either 5.0.1 or the snapshot version I mentioned.

Related issues/PRs

X

Suggest a fix

Somehow removing "additionalProperties": false, from the inline schema def makes it generate model classes. Setting it to true doesn't help either (not sure true is valid though). Referencing it with "$ref": "..." and moving the schema to definitions also solves this (but I can't use that solution due to the. lib I'm using).

Assignee
Assign to
Time tracking