Skip to content

feat: new sdk reference page with snippets#2552

Open
wassimoo wants to merge 10 commits into
masterfrom
feat/sdk-code-samples
Open

feat: new sdk reference page with snippets#2552
wassimoo wants to merge 10 commits into
masterfrom
feat/sdk-code-samples

Conversation

@wassimoo

@wassimoo wassimoo commented May 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a new SDK reference page to the API docs, initially for Python, Go, and TypeScript.

Each operation now shows real, copy-pasteable SDK snippets (generated from the Ory SDKs) alongside cURL, instead of only auto-generated HTTP examples.

image

How it works

  • Spec is the source of truth: The SDK snippets live inside the OpenAPI spec (src/static/api.json) as x-codeSamples entries on each operation.
  • Injection script: scripts/inject-sdk-code-samples.mjs reads the generated Ory SDKs from the sibling ory/sdk repo and injects the Python, Go, and TypeScript samples into api.json:

Open questions

Right now the SDK samples are injected manually. We should automate this eg. the same way we currently update:

  • A CI job in the SDK source repo runs the injection + regeneration whenever the SDKs/spec change.
  • The bot opens a chore(docs): update of SDK reference PR against this repo with the regenerated api.json and reference docs.

wassimoo and others added 2 commits May 12, 2026 13:26
Replaces the auto-generated axios/curl examples in the OpenAPI
reference with idiomatic snippets pulled directly from the Ory SDK
clients (@ory/client TypeScript and client-go).

- Add scripts/inject-sdk-code-samples.mjs: reads TypeScript request
  interfaces from the TS SDK and Go examples from the pre-generated
  docs in the Go SDK (sdk/clients/client/go/docs/), then writes
  x-codeSamples into src/static/api.json for all 149 operations

- Configure docusaurus.config.ts: add TypeScript and Go language tabs
  with correct codeSampleLanguage matching; include all Postman
  languages for the interactive explorer

- Swizzle CodeSnippets and CodeTabs theme components to guard against
  empty variants arrays crashing <Tabs>

- Regenerate docs/reference/openapi/ MDX from the updated spec

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@wassimoo wassimoo changed the title Feat/sdk code samples feat: sdk code samples May 12, 2026
@wassimoo wassimoo changed the title feat: sdk code samples feat: new sdk reference with snippets May 12, 2026
@coderabbitai

coderabbitai Bot commented May 12, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 3259d7b7-6724-45ac-85b8-ea32cb8ee86d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • ✅ Review completed - (🔄 Check again to review again)
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/sdk-code-samples

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@wassimoo wassimoo changed the title feat: new sdk reference with snippets feat: new sdk reference page with snippets May 13, 2026
@vinckr vinckr added the upstream Issue is caused by an upstream dependency. label Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

upstream Issue is caused by an upstream dependency.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants