Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DefaultGenerator: fix NullPointerException #109

Merged
merged 1 commit into from
May 20, 2018
Merged

Conversation

jmini
Copy link
Member

@jmini jmini commented May 19, 2018

Fix this null pointer:

Exception in thread "main" java.lang.NullPointerException
	at org.openapitools.codegen.DefaultGenerator.generateModels(DefaultGenerator.java:297)
	at org.openapitools.codegen.DefaultGenerator.generate(DefaultGenerator.java:783)

When the generator is started on a OAS3 without any components section like ping.yaml

This PR also activate one test case that was ignored and add a new one.

@jmini jmini added this to the 3.0.0 milestone May 19, 2018
Copy link
Member

@wing328 wing328 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me 👍

@jmini jmini merged commit cd4640d into OpenAPITools:master May 20, 2018
@jmini jmini deleted the fix_npe branch May 20, 2018 06:57
jimschubert added a commit to jimschubert/openapi-generator that referenced this pull request May 23, 2018
* master: (36 commits)
  jaxrs-cxf-cdi: fix outer enum (OpenAPITools#131)
  Move bash argv opt to end of ags line in scripts (OpenAPITools#124)
  Reduce CI logging (OpenAPITools#119)
  Download elm dependencies without prompting user. (OpenAPITools#118)
  [aspnetcore] Make the use of Swashbuckle optional (OpenAPITools#110)
  DefaultGenerator: fix NullPointerException (OpenAPITools#109)
  [Java] use html entities in javadoc of generated code (OpenAPITools#106)
  Update PULL_REQUEST_TEMPLATE.md
  [java] Enum in array of array (OpenAPITools#66)
  Rename datatype to dataType in CodegenProperty (OpenAPITools#69)
  update elm test to compile all elm files (OpenAPITools#95)
  Fix Petstore example for Elm (OpenAPITools#96)
  Update Docker documentation (OpenAPITools#97)
  CaseFormatLambda has been added, params for Rest-assured client has been refactored (OpenAPITools#91)
  Update integration.md
  [Clojure] Add util method to set the api-context globally (OpenAPITools#93)
  [JaxRS-Java] issue with implFolder on windows, and required fields generation for containers (OpenAPITools#88)
  Set parameters allowableValues dynamically (OpenAPITools#65)
  Meta: set version for "build-helper-maven-plugin" (OpenAPITools#89)
  Fix javadoc issues in "openapi-generator" module (OpenAPITools#84)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants