Skip to content
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

User story: custom code samples #2453

Closed
7 tasks
rattrayalex opened this issue Nov 18, 2023 · 3 comments
Closed
7 tasks

User story: custom code samples #2453

rattrayalex opened this issue Nov 18, 2023 · 3 comments

Comments

@rattrayalex
Copy link

User Story Description

As an API provider who offers SDKs for my API,

I want to include code snippets demonstrating those SDKs for each API request,

so I can make my users integrations much easier.

Acceptance Criteria

  • Read from a property like x-codeSamples in the OAS for each operation with something like a hash like {go: '…', node: '…', python: '…'} (no opinions here)
  • Display that instead of the default for the given language

Notes

  1. this was originally filed within Update code samples, support typescript, add custom code samples #2175 which was closed as stale
  2. This is a feature that ReadMe.com offers as x-readme.code-samples, and I think Redoc supports as well.

Sprint Ready Checklist

  • Acceptance criteria defined
  • Team understands acceptance criteria
  • Team has defined solution / steps to satisfy acceptance criteria
  • Acceptance criteria is verifiable / testable
  • External / 3rd Party dependencies identified
@weyert
Copy link
Contributor

weyert commented Apr 25, 2024

@rattrayalex I have been working on a PR to support an initial round of the x-codeSamples vendor extension

Copy link

This ticket has been labeled jira. A tracking ticket in Stoplight's Jira (STOP-492) has been created.

@rattrayalex
Copy link
Author

I assume this is now fixed in #2574 – thank you @weyert !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants