swagin
swagin copied to clipboard
x-codeSamples integration
This is more a question than an actual issue, but I think it is important to provide code samples to distribute the API docs directly in production, is there a way to use code sample objects? if anyone can point me in the right direction I can work in this functionality, as the official docs this object works like this in the API definition:
openapi: '3.0'
info: ...
tags: [...]
paths:
/example:
get:
summary: Example summary
description: Example description
operationId: examplePath
responses: [...]
parameters: [...]
x-codeSamples:
- lang: 'cURL'
label: 'CLI'
source: |
curl --request POST \
--url 'https://data.apiexample.com/api/example/batch_query/json?format=json' \
--header 'content-type: application/octet-stream: ' \
--data '{}'