Support for custom code samples
under review
Matt Dublin
Every major API documentation publishing platform that uses OpenAPI spec allows for the use of custom code samples in a path definition.
For example, Redocly supports the use of the "x-codeSamples" extension.
Please add support for the use of some kind of "code" parameter or extension in the YAML file so we can add custom code samples.
Log In
Shakeer Hussain S
Hi Matt - Your feedback is highly appreciated. To provide you with more effective assistance, could you kindly provide answers to the following questions?
Could you elaborate on the specific use cases where you envision utilizing these custom code samples?
Are there particular scenarios or types of code examples you have in mind?
How many custom code samples do you anticipate adding to each path or operation?
Matt Dublin
Shakeer Hussain S: The primary use case is the ability to create a custom code sample request and response when the automatically-generated request & response doesn't work. In our case, because the base URL of our API can vary, we can't use the base URL included in the OpenAPI spec description document, so we'd need to let customers add their full base URL, as well as other parameters. Also, the cURL requests that are currently automatically generated in Document360 just aren't effective examples for our customers.
Shakeer Hussain S
under review