knuckleswtf / scribe

Generate API documentation for humans from your Laravel codebase.✍
https://scribe.knuckles.wtf/laravel/
MIT License
1.58k stars 280 forks source link

The same response status code responds to each other, and the generated openapi.yaml lacks response content. #773

Open lz-freedom opened 6 months ago

lz-freedom commented 6 months ago

Scribe version

4.26.0

PHP version

8.1.7

Framework

Laravel

Framework version

8.83.26

Scribe config

------ SAME AS DEFAULT CONFIG ------

What happened?

The same status code, multiple return structures, the generated openapi.yaml only retains the last return structure.

image

Docs

shalvah commented 6 months ago

Isn't this a limitation from the OpenAPI spec? Does it support multiple response types for the same status code?

shalvah commented 6 months ago

I think the right way to do this is by using oneOf? 🤔 I don't know if that support separate descriptions, though.