swagger-api/swagger-codegen

Composed body parameter causes null pointer exception

Open

#4,798 opened on Feb 14, 2017

View on GitHub
 (1 comment) (0 reactions) (0 assignees)HTML (12,701 stars) (5,474 forks)batch import
Feature: Composition / InheritanceIssue: BugServer: Javahelp wanted

Description

Description

Defining an api operation with composite parameter causes a ComposedModel to be generated. The swagger-codegen then does not handle that type in class DefaultCodegen function fromParameter. Resulting in a null pointer exception.

Swagger-codegen version

2.2.2-SNAPSHOT

Swagger declaration file content or url

Use Animal object from the swagger spec as body object in the operation.

Command line used for generation

java -jar swagger-codegen/modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate -l jaxrs-cxf - -i api.json

Steps to reproduce
Related issues
Suggest a Fix

Implement composite support for body parameter

Contributor guide