This document serves two jobs:
- It is the current guide to which example app demonstrates which feature area.
- It defines the route packs and follow-on work needed to grow the example suite without turning every app into the same demo.
It complements:
- getting-started for config setup
- jsdoc-reference for route-level tags
- openapi-version-coverage for version-specific behavior
- workflows-and-integrations for adoption stories
Open one of these first based on what you want to evaluate:
apps/next-app-zod: Zod-first usage and the primary OpenAPI3.2.0showcaseapps/next-app-typescript: TypeScript-first contracts and inferred type flowsapps/next-app-mixed-schemas: mixedzod,typescript, andschemaFilesapps/next-app-drizzle-zod: Drizzle anddrizzle-zodintegrationapps/next-pages-router: legacy Pages Router supportapps/tanstack-app: TanStack Router framework parityapps/react-router-app: React Router framework parityapps/next-app-next-config,apps/next-app-ts-config,apps/next-app-adapter: config and adapter integration pathsapps/next-app-sandbox: edge-case route behavior and exclusion coverageapps/next-app-scalar,apps/next-app-swagger: docs UI scaffolding variants
The example suite should cover two classes of functionality:
- Generated features that come directly from route metadata, schemas, and type inference.
- Preserved features that come from
next.openapi.json,schemaFiles, or custom OpenAPI fragments.
flowchart LR
routeJsdoc["Route JSDoc and schemas"] --> generatedFeatures["Generated features"]
configFragments["Config and custom fragments"] --> preservedFeatures["Preserved features"]
generatedFeatures --> exampleSuite["Example apps"]
preservedFeatures --> exampleSuite
Each app should have a clear primary job. New routes should deepen that job first, then add parity coverage only when it improves cross-framework confidence.
| App | Primary responsibility | Secondary coverage |
|---|---|---|
apps/next-app-zod |
Main Zod example and primary OpenAPI 3.2.0 showcase |
Query/body/response examples, streaming, rich tags |
apps/next-app-typescript |
TypeScript utility types, inferred types, generic wrappers | Header/cookie params, redirects, downloads |
apps/next-app-mixed-schemas |
Mixed zod + typescript + schemaFiles |
Preserved OpenAPI fragments, callbacks, links, reusable components |
apps/next-app-drizzle-zod |
Drizzle and drizzle-zod examples, multi-resource relational APIs | Filters, sorting, batch operations, relation responses |
apps/next-app-sandbox |
Route-group and edge-case playground | @ignore, internal/admin routes, optional/nullish coverage |
apps/next-pages-router |
Pages Router parity and @method coverage |
Shared route packs adapted to default-export handlers |
apps/tanstack-app |
TanStack Router framework parity | Compact auth, multipart, response-set, loader/action coverage |
apps/react-router-app |
React Router framework parity | Compact auth, multipart, response-set, loader/action coverage |
apps/next-app-adapter |
Adapter-stage generation smoke coverage | One advanced route family proving adapter support |
apps/next-app-next-config |
next-openapi config through Next config integration |
One advanced route family proving config wiring |
apps/next-app-ts-config |
Typed config smoke coverage | One advanced route family proving config loading |
apps/next-app-scalar |
Scalar UI example | Reuse baseline App Router route surface |
apps/next-app-swagger |
Swagger UI example | Reuse baseline App Router route surface |
These route packs should be reused across apps, but not every app needs every pack at the same depth.
Use for every primary example app:
- list, detail, create, replace, patch, delete
- path params, query params, explicit body and response schemas
204responses@responseSetplus route-level@add- explicit
@operationIdon at least one route
Use where the framework and schema style can demonstrate it clearly:
- multipart upload with
@contentType multipart/form-data - binary download
- plain text or HTML response
- redirect response with
Location - non-JSON content type
Use in TypeScript, Zod, and framework parity apps:
- bearer auth
- API key or partner token
- cookie or header auth
- alternative security requirements via comma-separated
@auth - per-operation overrides
Use especially in the OpenAPI 3.2 showcase app:
- SSE or record-oriented stream
@responseContentType@responseItem@responseItemEncoding@responsePrefixEncoding
Use wherever route docs should demonstrate rich examples:
- inline examples
- exported typed examples
- serialized examples
- external examples
- querystring examples
- streaming examples
Use to demonstrate long-lived API evolution:
@deprecated- old/new route pairs
- versioned tags
- custom
@operationId
apps/next-app-zod already targets 3.2.0, so it should become the main
first-class route showcase for 3.2 tags from
jsdoc-reference.
Add at least one route family that exercises:
@tagSummary@tagKind@tagParent@querystring@responseContentType@responseItem@responseItemEncoding@responsePrefixEncoding- rich
@examples
Recommended route family:
api/events/streamapi/reports/exportapi/search/advanced
Keep these in config or schemaFiles instead of forcing them into route tags:
- root
$self servers[].nameoauth2MetadataUrl- OAuth
deviceAuthorization - example objects with
dataValue,serializedValue, andexternalValue - discriminator
defaultMapping
apps/next-app-mixed-schemas is the best place to preserve and validate these
with custom fragments because it already combines route-generated content with
schemaFiles.
- Add an OpenAPI 3.2 route family for streaming and advanced querystring docs.
- Add richer examples and deprecation/migration routes.
- Keep this app as the strongest end-to-end docs-backed example.
- Add routes that showcase
Awaited,ReturnType,Parameters, indexed access, and generic wrappers. - Add a download route, redirect route, and cookie/header-auth route.
- Keep at least one route relying on inference and one route fully explicit.
- Add route families that consume YAML fragments and reusable responses.
- Preserve callbacks, links, path items, and advanced examples through
schemaFiles. - Use this app to prove generated plus preserved features can coexist cleanly.
- Add a second resource such as authors, comments, or tags.
- Add relation responses, filters, sorting, pagination, and batch updates.
- Keep request and response schemas close to realistic drizzle-zod usage.
- Add more edge-case routes for route groups and excluded paths.
- Expand nullable, nullish, optional, and mixed body/query scenarios.
- Keep this app intentionally experimental.
- Add more methods on default-export handlers.
- Mirror the baseline pack in Pages Router style.
- Include one multipart or auth-focused example to keep router parity honest.
- Add a compact parity pack with auth, multipart, response sets, and framework-specific loader/action semantics.
- Keep the pack smaller than the Next apps, but equivalent enough to validate framework support.
For next-app-adapter, next-app-next-config, and next-app-ts-config:
- add one advanced smoke route family
- ensure generation still works through the intended config entrypoint
- avoid turning these into full tutorial apps
Start with the broadest and most docs-aligned examples:
apps/next-app-zodapps/next-app-typescriptapps/next-app-mixed-schemas
Outcome:
- primary route packs exist
- OpenAPI 3.2 is visible in shipped examples
- TypeScript, Zod, and mixed preservation stories are easy to compare
Expand schema and router edge cases:
apps/next-app-drizzle-zodapps/next-app-sandboxapps/next-pages-router
Outcome:
- drizzle and route-group edge cases are covered
- Pages Router depth matches modern App Router examples more closely
Add cross-framework parity:
apps/tanstack-appapps/react-router-app- config-focused apps
Outcome:
- framework adapters prove the same conceptual surface
- config-loading paths stay exercised with realistic routes
Optional UI parity follow-up:
- add dedicated Redoc, Stoplight, and RapiDoc example siblings if needed
Outcome:
- supported UI providers have runnable app coverage comparable to Scalar and Swagger
Coverage growth should land with matching verification updates.
- extend app-focused generation assertions for new route families
- continue version-aware validation through
tests/integration/validation/openapi-validation.test.ts - add explicit assertions for 3.2 tags and sequential media in generated example specs, not only synthetic unit tests
- rebuild workspace packages before regenerating app specs
- regenerate
public/openapi.jsonfor affected apps - compare outputs against the intended route-pack matrix
- keep each app README aligned with its responsibility
- document which app demonstrates which feature area
- prefer a small number of purposeful route families over random expansion
If this roadmap is implemented incrementally, each slice should be small enough to review cleanly:
next-app-zod3.2 showcase routes plus generated-spec assertionsnext-app-typescripttransport and generic-wrapper routes plus assertionsnext-app-mixed-schemaspreserved-fragment routes plus validation checksnext-app-drizzle-zodmulti-resource expansion- router and framework parity passes