L5 Swagger – Make documentation conditional

We have an API that for one of the endpoints will return a bunch of data, including either a user ID or a phone number, depending on the value of a .env variable that we have specified in the environment.

We are using Laravel and L5 Swagger to generate the documentation, but it doesn’t seem to be a way to make the documentation show either "phone number" or "user id" based on a value or a function. Is there a way that we can achieve this?

Thanks!

Leave a Reply

Your email address will not be published.