elements
elements copied to clipboard
User story: custom code samples
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-codeSamplesin the OAS for eachoperationwith something like a hash like{go: '…', node: '…', python: '…'}(no opinions here) - [ ] Display that instead of the default for the given language
Notes
- this was originally filed within https://github.com/stoplightio/elements/issues/2175 which was closed as stale
- 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
@rattrayalex I have been working on a PR to support an initial round of the x-codeSamples vendor extension
This ticket has been labeled jira. A tracking ticket in Stoplight's Jira (STOP-492) has been created.
I assume this is now fixed in https://github.com/stoplightio/elements/pull/2574 – thank you @weyert !