-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Description
Description
For the Ada client generator, when a REST operation uses application/x-www-urlencoded and several parameters the submitted body is sent empty. The client code compiles but it is not correct.
Swagger-codegen version
Version 2.4.0
Swagger declaration file content or url
The following operation will have incorrect code generated and the server will receive an empty body even if all parameters are passed to the Ada procedure.
post:
tags:
- ticket
summary: Create a ticket
description: ''
operationId: do_create_ticket
consumes:
- application/x-www-form-urlencoded
produces:
- application/json
parameters:
- name: owner
in: formData
description: Ticket owner
required: false
type: string
- name: status
in: formData
description: Ticket status
required: false
type: string
enum: [open assigned closed]
- name: title
in: formData
description: Ticket title
required: true
type: string
- name: description
in: formData
description: Ticket description
required: false
type: string
responses:
'201':
description: ticket created
headers:
Location:
description: The URL of the new ticket
type: string
'405':
description: Invalid input
security:
- ticket_auth:
- 'write:ticket'
Command line used for generation
java -jar swagger-codegen-cli.jar generate \
-l ada -i regtests/swagger.yaml -o regtests/client \
-DprojectName=TestAPI --model-package TestAPI
Steps to reproduce
Related issues/PRs
Suggest a fix/enhancement
The generated code initialized the request but "forgets" to pass it to the Call procedure, thus submitting an empty body...
Metadata
Metadata
Assignees
Labels
No labels