DarkaOnLine / L5-Swagger

OpenApi or Swagger integration to Laravel
https://github.com/DarkaOnLine/L5-Swagger
MIT License
2.64k stars 394 forks source link

Attributes: OA\Post not show on documentation page #509

Closed lucaele closed 1 year ago

lucaele commented 1 year ago

Description:

OA\Post not show on documentation page, but OA\Get is present on documentation page and working fine.

How solve this?

Steps To Reproduce:

`

[OA\Get(

path: '/eData2',
tags: ['EMP'],
summary: 'Qualcosa nel sommario2',
description: 'Qualcosa nella descrizione2',
responses: [
    new OA\Response(response: 200, description: 'An example resource'),
    new OA\Response(response: 401, description: 'Not allowed')
]

)]

[OA\Post(

path: '/eData3',
tags:['EMP'],
summary:"Adds a new user - with oneOf examples",
description:"Return a list of Data",
response: [
    new OA\Response(response: 200, description: 'An example resource'),
]

)] `

EdgarsJoja commented 1 year ago

Noticed, that you seem to have typo in POST when listing responses. The key is "response", but in GET example you have "responses". AFAIK missing responses definition is one of the reasons why the endpoint would not show up in the docs.