REST API Request/Response Schema

Is there some sort of Web-browseable or in-Code declarative REST API Request/Response Schema Documentation?

Overall read seems to be no:

The docs advise to look in the browser inspector what metabase itself does (but that’s comparatively uncomfortable).

Things like metabase/dashboard.clj at master · metabase/metabase · GitHub look to me like responses are just ad-hoc assembled as data structures, and requests are just read using destructuring expressions, and there’s no declarative schema describing either format.

So I guess, no, but wanted to ask just to be sure.

Hi @berndhaug
You're probably asking about OpenAPI schema or something similar. The answer is (still) unfortunately "No".

However, you can help move this forward by upvoting these issues:

Thanks, the first two refs are great!

@ OpenAPI I really don’t like it: IME Swagger/OpenAPI, “API playgrounds”, & client autogeneration seems to push project cultures towards RPC style of API (no idea how that happens, but I’ve seen it many times across multiple teams) over REST / declarative.

That way lies coupling, complexity and churn busywork.

Ideal from my POV would be some nice prose and examples instead of just URL paths… but I’d rather just read source & browser logs than get some OpenAPI playground.

@berndhaug in that case, I believe this initiative would be interesting to you :slight_smile: [Epic] Adopt Malli - Internal Use · Issue #26940 · metabase/metabase · GitHub

1 Like

Oh – that’s cool, Malli is awesome. Thanks for conveying the great news!