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

[BUG] CAT endpoints response bodies' content-types are application/json #293

Closed
nhtruong opened this issue May 13, 2024 · 3 comments
Closed
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@nhtruong
Copy link
Collaborator

While the vast majority of OpenSearch endpoints' response bodies are in JSON format, CAT endpoints return tabular data as plaintext instead. The spec currently uses application/json for these endpoints, which is incorrect.

@nhtruong nhtruong added bug Something isn't working untriaged good first issue Good for newcomers and removed untriaged labels May 13, 2024
@Xtansia
Copy link
Collaborator

Xtansia commented May 13, 2024

They can and will return JSON if you pass ?format=json which is what a number of the language clients are hardcoded to do

@dblock
Copy link
Member

dblock commented May 13, 2024

Note that https://localhost:9200/_cat?format=json doesn't return JSON. AFAIK there's no way in OpenAPI to say parameter X -> this kind of output, or is there?

@dblock
Copy link
Member

dblock commented Jul 11, 2024

This was fixed in #360 and #357.

@dblock dblock closed this as completed Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants