Adding custom code samples
Learn how to configure custom code samples to display alongside your API endpoints
paths:
/users:
get:
summary: Retrieve users
x-codeSamples:
- lang: JavaScript
label: Node SDK
source: |
import { createAPIClient } from 'my-api-sdk';
const client = createAPIClient({ apiKey: 'my-api-key' });
client.users.list().then(users => {
console.log(users);
});
- lang: Java
label: Java SDK
source: |
MyApiClient client = new MyApiClient("my-api-key");
List<User> users = client.getUsers();
System.out.println(users);Last updated
Was this helpful?