FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
How We Documented 95 API Endpoints with OpenAPI and Scalar
How-ToWeb Development

How We Documented 95 API Endpoints with OpenAPI and Scalar

via Dev.to WebdevAlex Neamtu1mo ago

SendRec has grown to 95 API endpoints covering authentication, video management, playlists, folders, tags, billing, webhooks, and public watch pages. We needed documentation that stayed in sync with the code and didn't require a separate build step. Here's how we set it up. The approach: embedded YAML + Scalar We wanted three things: a single YAML file we could lint and test, interactive docs that render in the browser, and zero infrastructure beyond the Go binary itself. The solution is straightforward. The OpenAPI spec lives at internal/docs/openapi.yaml , and Go's //go:embed directive bakes it into the binary at compile time: package docs import ( _ "embed" "net/http" ) //go:embed openapi.yaml var specYAML [] byte func HandleSpec ( w http . ResponseWriter , r * http . Request ) { w . Header () . Set ( "Content-Type" , "application/yaml" ) _ , _ = w . Write ( specYAML ) } For the interactive UI, we serve a minimal HTML page that loads Scalar from a CDN: func HandleDocs ( w http . Res

Continue reading on Dev.to Webdev

Opens in a new tab

Read Full Article
22 views

Related Articles

Learning a Recurrent Visual Representation for Image Caption Generation
How-To

Learning a Recurrent Visual Representation for Image Caption Generation

Dev.to • 22h ago

How-To

# 5 JSON Mistakes Developers Make (And How to Fix Them Fast)

Medium Programming • 1d ago

10 subtle go mistakes that only show up in production
How-To

10 subtle go mistakes that only show up in production

Medium Programming • 1d ago

Stop Configuring Third-Party Libraries by Hand — Let Your Agent Handle It!
How-To

Stop Configuring Third-Party Libraries by Hand — Let Your Agent Handle It!

Medium Programming • 1d ago

How-To

How I Stay Consistent While Learning Coding

Medium Programming • 1d ago

Discover More Articles