-
Notifications
You must be signed in to change notification settings - Fork 6k
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
[JAVA] Exception (NullPointerException) for parameter with schema array and items as strings #6995
Comments
@stefanmeschke can you show an example of what the HTTP request body looks like? |
@wing328 Thanks for your reply. POST /api/pets/bulk
The swagger declaration is valid. I copied it to the swagger editor and tried the request. It works as expected. Do you need more information? |
I agree it's valid. 2.2.1 was released a while ago. Please give it another try with the latest master (the SNAPSHOT version can be found in the README) |
I can confirm the same error for 2.2.3. The same error does not appear when taking the current master branch, but unfortunatley I cannot move to 3.0.0 (master) yet as there are too many other breaking changes which are not feasable for us (increased boost dependencies for cpprest, huge dependency increase on javascript -> 65000 files of node modules and broken browserify support). For me it is failing with an integer array: swagger: "2.0"
info:
version: "0.0.1"
title: "com.test"
basePath: "/api"
paths:
/pets/bulk:
post:
summary: "Add new pets"
operationId: "bulkAddingPets"
parameters:
- in: "body"
name: "pets"
description: "The pet names which should be added"
required: true
schema:
type: "array"
items:
type: "integer"
format: "int32"
responses:
201:
description: "successful added" Update 1 (2017-11-27 17:52)It appears that for some reason a |
Description
I'm getting the following error:
Swagger-codegen version
Version: 2.2.1
Swagger declaration file content or url
If I remove
the generation succeeded.
Command line used for generation
swagger-codegen generate -i ./api-docs/test.yml -l typescript-angular2 -o ./src/app/api/test-api/
Steps to reproduce
Just run the code generation for the definition above.
Related issues/PRs
I think a related issue is the issue from @dancrumb:
#6272
The text was updated successfully, but these errors were encountered: