Endpoint not generated with the right body parameter
Created by: JFCote
Description
I really don't understand this one.
I have an endpoint declared like this:
/message-calendars/{message-calendar-id}/message-events:
post:
tags:
- Messaging
summary: Add a message event to the given message calendar
operationId: addMessageEventToMessageCalendar
parameters:
- $ref: "#/parameters/message-calendar-id"
- in: body
name: new-message-event
required: true
schema:
$ref: "./definitions.yaml#/definitions/MessageEventCoreWithTimeListEntries"
responses:
200:
description: OK
schema:
$ref: "./definitions.yaml#/definitions/GetMessageEventResponse"
The MessageEventCoreWithTimeListEntries
is declared like this:
MessageEventCoreWithTimeListEntries:
type: object
description: "Base of a message event with Time List entries"
allOf:
- $ref: "#/definitions/MessageEventCore"
- type: object
required:
- timeListEntries
properties:
timeListEntries:
type: array
items:
$ref: "#/definitions/TimeListEntry"
Strangely, the endpoint is generated like this:
GetMessageEventResponse addMessageEventToMessageCalendar(Long messageCalendarId, MessageEventCore body) throws Exception;
Instead of:
public GetMessageEventResponse addMessageEventToMessageCalendar(Long messageCalendarId, MessageEventCoreWithTimeListEntries newMessageEvent) throws Exception;
Please note that the MessageEventCoreWithTimeListEntries
model is generated, but not used in the declaration of the endpoint...
openapi-generator version
Latest master
Command line used for generation
java -jar openapi-generator-cli.jar generate -i swagger.yaml --generator-name java-play-framework -o generatedServer -DhideGenerationTimestamp=true
Steps to reproduce
Just run the above command
Related issues/PRs
No idea
Suggest a fix/enhancement
No idea!