Skip to content

Add basic docs page#36

Merged
keenanjohnson merged 1 commit into
mainfrom
api-docs
Jun 1, 2026
Merged

Add basic docs page#36
keenanjohnson merged 1 commit into
mainfrom
api-docs

Conversation

@keenanjohnson

Copy link
Copy Markdown
Member

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a hosted, interactive API reference (Scalar UI) backed by an OpenAPI 3.1 spec embedded into the binary. It also reworks the README to point users at the live docs and adds a lightweight docs subcommand for previewing the docs locally without needing InfluxDB or the API key store.

Changes:

  • New internal/docs package that embeds openapi.yaml and serves it along with a Scalar-rendered HTML reference at /openapi.yaml and /docs.
  • main.go registers the new doc routes on the main server and adds a docs subcommand that runs a minimal docs-only server.
  • README is rewritten to link to the hosted docs, document rate limits, the new /healthz and /docs endpoints, and the docs update workflow.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
README.md Replaces inline endpoint docs with links to /docs, adds rate-limit and docs-preview sections, updates run command to go run ..
main.go Wires /docs and /openapi.yaml into the server and adds a docs subcommand for a docs-only preview.
internal/docs/docs.go New package: embeds the spec and serves the Scalar reference HTML.
internal/docs/openapi.yaml New OpenAPI 3.1 spec describing all endpoints, schemas, auth, and error responses.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@keenanjohnson keenanjohnson merged commit 0b892aa into main Jun 1, 2026
7 checks passed
@keenanjohnson keenanjohnson deleted the api-docs branch June 1, 2026 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants