Skip to content

[PHP][Lumen] body name parameter should be ignore #7455

Open
@robertocastro

Description

@robertocastro
Description

When I generate a Lumen server stub from swagger editor online, generated controller has param validation for body name. Documentation here
say that this name is ignored but Lumen Stub has check for body name parameter.

Swagger-codegen version

online swagger editor 2.2.3

Swagger declaration file content or url
paths:
  /visite:
    post:
      security:
        - api_key: []
      tags:
        - Visite
      summary: Ajouter une visite
      description: ''
      operationId: addVisite
      consumes:
      - application/json
      produces:
      - application/json
      parameters: 
      - name: body
        in: body
        description: Objet visite à ajouter
        required: true
        schema:
          $ref: '#/definitions/Visite'

Lumen stub has this check :

if (!isset($input['body'])) {
    throw new \InvalidArgumentException('Missing the required parameter $body when calling addVisite');
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions