Skip to content

Баг клиента для get запросов без query params #17

@misha-rollun

Description

@misha-rollun

При попытке get запроса с клиента:

$this->rest->get();

Получаем ошибку

Class 'TestingCollection\OpenAPI\V1\DTO\QueryParamsGETQueryData' not found

Манифест

openapi: 3.0.0
info:
  version: "1"
  title: "TestingCollection"
  description: Collection of various rest resources for testing purposes
servers:
  - url: http://rollun-openapi-nginx/openapi/TestingCollection/v1
tags:
  - name: QueryParams
paths:
  "/queryParams":
    get:
      tags:
        - QueryParams
      summary: "Get list of items"
      responses:
        "200":
          description: "Success"
          content:
            aplication/json:
              schema:
                $ref: "#/components/schemas/QueryParamsListResult"
        '500':
          description: "Internal error"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResult'

Происходит потому что перед отправкой запроса в Rest объекте массив превращается в объект (с query параметрами), для валидации. А такой объект не сгенерировался, потому что нету никаких query параметров

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions