REST API
Beginner
1 min read
API Changelog and SDK Generation
Example
# CHANGELOG.md (Keep a Changelog format)
# Unreleased
# Added
# - GET /products/{id}/reviews endpoint
# - `tags` field on Product response
# [2.1.0] - 2025-04-01
# Added
# - Cursor-based pagination: `cursor` and `limit` query params on all collections
# - `X-RateLimit-*` headers on all responses
# Changed
# - `perPage` max increased from 50 to 100
# [2.0.0] - 2025-01-15
# Breaking
# - Renamed `user_id` -> `userId` in all responses (camelCase migration)
# - POST /users now returns 201 instead of 200
# - Removed deprecated `GET /users/{id}/profile` (use `GET /users/{id}`)
# SDK generation with openapi-generator-cli
# npm install @openapitools/openapi-generator-cli -g
# openapi-generator-cli generate \
# -i openapi.yaml \
# -g typescript-axios \
# -o ./sdk/typescript \
# --additional-properties=npmName=@myco/api-sdk,npmVersion=2.1.0
# Generated TypeScript SDK usage:
# import { ProductsApi, Configuration } from '@myco/api-sdk';
# const api = new ProductsApi(new Configuration({
# basePath: 'https://api.example.com/v1',
# accessToken: token,
# }));
# const { data } = await api.listProducts({ status: 'active', perPage: 20 });