Lomkit / laravel-rest-api

Generate Api in seconds
https://laravel-rest-api.lomkit.com/
MIT License
297 stars 18 forks source link

how to set HTTP response codes for manually written controllers in RestDocumentationServiceProvider #115

Closed selva439 closed 2 months ago

selva439 commented 2 months ago

Description

i want to add multiple responses to the documentation , but not sure where to add the HTTP response codes for the responses.

GautierDele commented 2 months ago

Hello there, Did you read https://laravel-rest-api.lomkit.com/digging-deeper/documentation#add-your-own-routes ?

Basically, Rest Api only relates on Open Api, you need to implement the objects directly provided by the package and it will render the result in Open Api. You should refer to the documentation if you are not familiar with OpenApi https://spec.openapis.org/oas/v3.1.0