<< All versions

Skill v1.0.0

currentLLM-judged scan98/100
kingwill101/routed/routed-openapi-builder
──Details
PublishedOctober 23, 2026 at 07:31 PM
Content Hashsha256:d8fdc46caccae0f8...
Git SHAda4a4cad5008
──Files
Files (1 file, 4.0 KB)
SKILL.md4.0 KBactive
SKILL.md · 98 lines · 4.0 KB

version: "1.0.0" name: routed-openapi-builder description: Maintain, extend, document, test, or troubleshoot the routed_openapi_builder subsystem in the Routed Dart monorepo. Use when a task touches routed_openapi_builder APIs, implementation, examples, tests, dependency boundaries, or integration with the Routed ecosystem.


routed_openapi_builder

This skill is the complete working guide for the routed_openapi_builder subsystem. The facts below are intentionally embedded here so the skill can be used without loading another document.

Subsystem contract

  • Package: routed_openapi_builder
  • Directory: packages/routed_openapi_builder
  • Version in this checkout: 0.1.0
  • Role: Build-time OpenAPI artifact generation
  • Purpose: The build_runner integration that turns the authoritative Routed route manifest into static OpenAPI artifacts.

Public API

  • OpenApiBuilder is the public build_runner Builder.
  • It consumes the runtime route manifest generated by the CLI; it does not scan source code or guess routes.
  • Outputs are lib/generated/openapi.json and lib/generated/openapi_controller.g.dart.
  • Nested groups, mounted routers, controllers, and cumulative prefixes are preserved from the manifest.

Public imports

  • package:routed_openapi_builder/routed_openapi_builder.dart

Runtime package dependencies

  • routed_core
  • routed_openapi

Composition rules

  • Install as a dev dependency, run dart run routed_cli openapi generate, then run dart run build_runner build --delete-conflicting-outputs.
  • Keep runtime engine/provider initialization in the application; this package is never an Engine provider.
  • Use literal group prefixes and named handlers for strongest annotation/Dartdoc enrichment; use fluent RouteBuilder metadata for dynamic/inline routes.

Known hazards

  • Do not add source-code route guessing to the builder; the manifest is authoritative.
  • Treat generated files as build outputs and test conflict/deletion behavior.
  • Keep builder output stable so downstream documentation and clients do not churn unnecessarily.

Minimal usage

dart
dev_dependencies:
routed_openapi_builder: ^0.1.0
dart run routed_cli openapi generate
dart run build_runner build --delete-conflicting-outputs

Change workflow

  1. Preserve unrelated dirty work and keep changes scoped to routed_openapi_builder.
  2. Keep the public import names and exported symbols above stable unless the

task explicitly changes the API. Never document a lib/src import.

  1. For provider or middleware changes, exercise registration, request-context

access, the success path, and the failure/reload path.

  1. For host or transport changes, test both the value/portable path and the

streaming/native path where this subsystem supports both.

  1. For generated output, make the input contract authoritative and verify the

generated artifact rather than hand-editing output.

  1. Update tests and user-facing package documentation when public behavior

changes; keep examples aligned with the usage contract above.

Focused test intent

Cover builder input discovery, manifest conversion, generated JSON/controller contents, nested prefixes, dynamic metadata, and build_runner integration.

Focused validation

bash
dart format --output=none --set-exit-if-changed packages/routed_openapi_builder
dart analyze --fatal-infos packages/routed_openapi_builder
dart test packages/routed_openapi_builder/test

Keep this skill's embedded facts synchronized when a public package version, public barrel, or dependency boundary changes.

Ecosystem boundary rules

  • Applications use routed for the full provider catalogue or

routed_core plus explicit adapters for slim compositions.

  • Routed adapters depend on routed_core and matching server_* runtimes;

they must not depend on the batteries-included routed facade.

  • Host I/O belongs in routed_io, routed_node, or server_native, not in

feature adapters.

  • Framework-agnostic server_* implementations must not import Routed from

lib/.

All versions