Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2 tasks
parmentf opened this issue Jul 10, 2024 · 1 comment
Open
2 tasks
Labels
documentation Improvements or additions to documentation

Comments

@parmentf
Copy link
Contributor

parmentf commented Jul 10, 2024

It is application/json instead of text/csv

post.requestBody.content.application/json.example.0 = a,value
post.requestBody.content.application/json.example.1 = 1,2
post.responses.default.content.application/json.example.0 = a;value
post.responses.default.content.application/json.example.1 = 1;true

post.requestBody.content.application/json.example.0 = a,b
post.requestBody.content.application/json.example.1 = 1,2
post.responses.default.content.application/json.example.0 = a;b
post.responses.default.content.application/json.example.1 = 1;2

Which produces:

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

Fix:

  • v1/echo/csv
  • v1/true/csv
@parmentf parmentf added the documentation Improvements or additions to documentation label Jul 10, 2024
@parmentf parmentf changed the title [base-line] Swagger example for /v1/true/csv has wrong mime-type [base-line] Swagger example for /v1/true/csv and /v1/echo/csv has wrong mime-type Jul 10, 2024
@parmentf
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant