Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #192
Closed
Open
Issue created May 31, 2018 by Administrator@rootContributor

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!

Assignee
Assign to
Time tracking