What is the path where the data sent to a swagger api is stored. Where is it configured?
I have created an api with swagger-editor, I generate the server in nodejs and put it on my server. I configure it to use port 8499 instead of 80 and disable CORS to be able to communicate with itself.
Accedoo to the web 127.0.0.1:4899/docs and this the swagger-ui, from there if I make the test of recovering with the examples, it works.
Now, I create a JSON object, it returns an OK, and says that the route will go in the response section of the headers.
These are my headers
connection: keep-alive
content-type: application/json
date: Mon, 13 May 2024 11:41:42 GMT
keep-alive: timeout=5
transfer-encoding: chunked
x-powered-by: Express
And this is the response
{
"status": "201",
"description": "The resource was created. The Response Location HTTP header should be returned to indicate where the newly created resource is accessible.",
"more_info": ""
}
The question is, where is this object, can I configure where it is stored so that I can retrieve it later?
added this parameters to the app.js to try if the persistence should be activated
// swaggerRouter configuration
var options = {
routing: {
controllers: path.join(__dirname, './controllers'),
** cors:false,
tryItOutEnabled:true,
persistAuthorization:true**
},
Carlos Maldonado is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1