docusaurus-openapi-docs icon indicating copy to clipboard operation
docusaurus-openapi-docs copied to clipboard

Support for custom code samples via `x-codeSamples`

Open rattrayalex opened this issue 1 year ago • 1 comments

Is your feature request related to a problem?

Yes, I would like docs to render with snippets that show use of an API's custom-built SDKs, rather than generic http requests. This is what Stripe does.

Describe the solution you'd like

If x-codeSamples is present, as with redocly, render the code present there rather than the code that would be generated by default.

Describe alternatives you've considered

n/a

Additional context

Previously discussed at https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/issues/153

I might be willing to fund a PR for this if it would be accepted. Please share any requirements for it.

rattrayalex avatar Jan 25 '24 22:01 rattrayalex

@sserrata would you accept a PR adding this?

rattrayalex avatar Mar 28 '24 21:03 rattrayalex

Addressed in:

#697 #701 #706 #707

sserrata avatar Jun 28 '24 19:06 sserrata