Skip to content

Commit

Permalink
Add API Docs for OONI Run and OONI Findings API (#7)
Browse files Browse the repository at this point in the history
* Bump dependencies

* Add support for oonirun and oonifindings APIs

xref: ooni/devops#26
  • Loading branch information
hellais authored Nov 27, 2024
1 parent 9069674 commit b878709
Show file tree
Hide file tree
Showing 5 changed files with 3,200 additions and 3,355 deletions.
19 changes: 18 additions & 1 deletion astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { defineConfig } from "astro/config";
import starlight from "@astrojs/starlight";
import starlightOpenAPI, { openAPISidebarGroups } from 'starlight-openapi'
import vercel from "@astrojs/vercel/static";

// https://astro.build/config
Expand All @@ -12,6 +13,21 @@ export default defineConfig({
social: {
github: "https://github.com/ooni/docs",
},
plugins: [
// Generate the OpenAPI documentation pages.
starlightOpenAPI([
{
base: 'api-oonirun',
label: 'OONI Run API',
schema: './schemas/oonirun.json',
},
{
base: 'api-oonifindings',
label: 'OONI Findings API',
schema: './schemas/oonifindings.json',
},
]),
],
sidebar: [
{
label: "Data",
Expand Down Expand Up @@ -49,8 +65,9 @@ export default defineConfig({
directory: "legacybackend",
},
},
...openAPISidebarGroups
],
customCss: ["./src/styles/custom.css"],
}),
],
]
});
Loading

0 comments on commit b878709

Please sign in to comment.