redpanda icon indicating copy to clipboard operation
redpanda copied to clipboard

Admin API swagger endpoint is returning invalid json

Open jcsp opened this issue 4 years ago • 4 comments

I think the seastar API helpers are trying to concatenate all our swagger json files to generate one, but this falls over because some of our .json files contain a full API definition rather than just some paths. They do that because they define models.

Point a client at http://server:9644/v1 to see it.

JIRA Link: CORE-791

jcsp avatar Dec 03 '21 17:12 jcsp

Hmm, so there's an add_definition function that might be usable if we put all our model definitions in separate files. The concatenation code in seastar src/http/api_docs.cc knows how to list out all the api paths before any definitions.

However Scylla seems to use fully-formed swagger files which I guess means treating each sub-path in the API as a separate API in its own right from a docs/swagger POV.

jcsp avatar Dec 03 '21 17:12 jcsp

I think that @BenPope has done the most with swagger stuff so he made know what's going on

dotnwat avatar Dec 06 '21 20:12 dotnwat

I gave up on using multiple files, it was not a nice experience: https://github.com/vectorizedio/redpanda/commit/128de604fa51529b47e87591b68a01bdfbce5075#diff-105db49bbcabef7358486b0a0e861348cb1af2fa90f68d9b09268b6281e71aa2

BenPope avatar Dec 06 '21 20:12 BenPope

This issue hasn't seen activity in 3 months. If you want to keep it open, post a comment or remove the stale label – otherwise this will be closed in two weeks.

github-actions[bot] avatar Jun 06 '25 06:06 github-actions[bot]

This issue was closed due to lack of activity. Feel free to reopen if it's still relevant.

github-actions[bot] avatar Jun 23 '25 06:06 github-actions[bot]