Inist-CNRS / web-services

Web services at Inist-CNRS
https://services.istex.fr
5 stars 0 forks source link

[base-line] Swagger example for /v1/true/csv and /v1/echo/csv has wrong mime-type #112

Open parmentf opened 2 months ago

parmentf commented 2 months ago

It is application/json instead of text/csv

https://github.com/Inist-CNRS/web-services/blob/ed4d850feeb7c6d587fe74522ba2ecd981ab267b/services/base-line/v1/true/csv.ini#L9-L12

https://github.com/Inist-CNRS/web-services/blob/ed4d850feeb7c6d587fe74522ba2ecd981ab267b/services/base-line/v1/echo/csv.ini#L9-L12

Which produces:

[;Column #1
a,b;
1,2
]

Fix:

parmentf commented 1 month ago

The swagger editor gives a working syntax: image

But I can't produce such a JSON using metadata in .ini.

# Example
post.requestBody.content.text/csv.example = a,value\n1,2\n
post.responses.default.content.text/csv.example = a;value\n1;true\n

gives

image

No success with fix("a,value\n1,2\n") either.