-
Notifications
You must be signed in to change notification settings - Fork 3.8k
feat(api): generate v2 OpenAPI from contracts #6509
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
TheodoreSpeaks
merged 10 commits into
improvement/v2-endpoints
from
feat/zod-generated-openapi
Aug 11, 2026
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
8ba4528
feat(api): generate v2 OpenAPI from contracts
TheodoreSpeaks 63d772d
fix(api): preserve string boolean wire defaults
TheodoreSpeaks bc2572a
fix(api): document file download headers
TheodoreSpeaks 21fc117
fix(docs): use TypeScript CLI with Next.js
TheodoreSpeaks d3ff369
fix(docs): avoid client-rendered theme script
TheodoreSpeaks d527e0e
fix(api): document departed audit default
TheodoreSpeaks 829fa6b
feat(api): replace legacy core docs with v2
TheodoreSpeaks cb0f154
feat(api): generate v2 OpenAPI from contracts
TheodoreSpeaks 5c9671b
feat(api): refine generated v2 OpenAPI docs
TheodoreSpeaks f7c6952
fix(docs): align localized v2 execution examples
TheodoreSpeaks File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| 'use client' | ||
|
|
||
| import type { ComponentProps } from 'react' | ||
| import { useId } from 'react' | ||
| import { ChevronDown } from '@sim/emcn/icons' | ||
| import type { APIPageClientOptions } from 'fumadocs-openapi/ui/client' | ||
|
|
||
| type FumadocsAPIExampleSelector = NonNullable< | ||
| NonNullable<APIPageClientOptions['operation']>['APIExampleSelector'] | ||
| > | ||
|
|
||
| interface APIExampleSelectorProps extends ComponentProps<FumadocsAPIExampleSelector> {} | ||
|
|
||
| export function APIExampleSelector({ items, value, onValueChange }: APIExampleSelectorProps) { | ||
| const id = useId() | ||
|
|
||
| if (items.length <= 1) return null | ||
|
|
||
| const selectedValue = value ?? items[0].id | ||
| const selectedItem = items.find((item) => item.id === selectedValue) | ||
|
|
||
| return ( | ||
| <div className='not-prose mb-2 flex flex-col gap-1.5'> | ||
| <label htmlFor={id} className='sr-only'> | ||
| Request example | ||
| </label> | ||
| <div className='relative'> | ||
| <select | ||
| id={id} | ||
| value={selectedValue} | ||
| onChange={(event) => onValueChange(event.target.value)} | ||
| className='w-full appearance-none rounded-md border bg-fd-secondary py-2 ps-3 pe-9 text-start font-medium text-fd-secondary-foreground text-sm outline-none transition-colors hover:bg-fd-accent focus-visible:ring-2 focus-visible:ring-fd-ring' | ||
| > | ||
| {items.map((item) => ( | ||
| <option key={item.id} value={item.id}> | ||
| {item.name} | ||
| </option> | ||
| ))} | ||
| </select> | ||
| <ChevronDown className='-translate-y-1/2 pointer-events-none absolute end-3 top-1/2 size-[14px] text-fd-muted-foreground' /> | ||
| </div> | ||
| {selectedItem?.description && ( | ||
| <p className='text-fd-muted-foreground text-xs'>{selectedItem.description}</p> | ||
| )} | ||
| </div> | ||
| ) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.