Having documented my API, I filled the param of my request in the UI and clicked "Execute".
I was then given the corresponding curl and the response body.
For a reason I don't yet understand, I'm logged in but the response body is the one I would have expected were I logged out
But my real surprise is that when running the curl in my terminal I do receive the correct answer (the one received when logged in).
Here is the generated Curl :
curl -X GET "http://server/path" -H "accept: */*" -H "Cookie: PHPSESSID=uk30v14m2l788eehtkb9q1j260"
and the openapi specification
openapi: '3.0.0'
paths:
/add.php:
get:
tags:
- information
parameters:
- in: "header"
name: "Cookie"
type: string
responses:
'200':
description: successful operation
For context, I already had to add the "Access-Control-Allow-Origin:*" header to authorize queries from Swagger (before that I was given the "Failed to fetch error" described here)
Thanks for your help !