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
  • #9
Closed
Open
Issue created May 13, 2018 by Administrator@rootContributor

[DefaultGenerator] NullPointerException when no components defined

Created by: jmini

Description

When there isn't any component defined in the specification, there is a NullPointerException in org.openapitools.codegen.utils.ModelUtils.getUnusedSchemas(OpenAPI)

Exception in thread "main" java.lang.NullPointerException
	at org.openapitools.codegen.utils.ModelUtils.getUnusedSchemas(ModelUtils.java:96)
	at org.openapitools.codegen.DefaultGenerator.generate(DefaultGenerator.java:781)
	at fr.jmini.openapi.openapitools.generator.TestOpenapitoolsCodegenMain.convert(TestOpenapitoolsCodegenMain.java:79)
openapi-generator version

3.0.0-SNAPSHOT

OpenAPI declaration file content or url
openapi: 3.0.1
info:
  title: ping test
  version: '1.0'
servers:
  - url: 'http://localhost:8000/'
paths:
  /ping:
    get:
      operationId: pingGet
      responses:
        '201':
          description: OK
Assignee
Assign to
Time tracking