docs: add SDK configuration example
Add sdk-full.yaml example showing full SDK generation configuration including spec path, languages, package naming, diff detection, and publish settings. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
7970e984e4
commit
f70c6fb1c1
1 changed files with 43 additions and 0 deletions
43
docs/examples/sdk-full.yaml
Normal file
43
docs/examples/sdk-full.yaml
Normal file
|
|
@ -0,0 +1,43 @@
|
||||||
|
# Example: Full SDK Configuration
|
||||||
|
# Generate typed API clients from OpenAPI specs
|
||||||
|
|
||||||
|
sdk:
|
||||||
|
# OpenAPI spec source (auto-detected if omitted)
|
||||||
|
spec: api/openapi.yaml
|
||||||
|
|
||||||
|
# Languages to generate
|
||||||
|
languages:
|
||||||
|
- typescript
|
||||||
|
- python
|
||||||
|
- go
|
||||||
|
- php
|
||||||
|
|
||||||
|
# Output directory (default: sdk/)
|
||||||
|
output: sdk/
|
||||||
|
|
||||||
|
# Package naming
|
||||||
|
package:
|
||||||
|
name: myapi
|
||||||
|
version: "{{.Version}}"
|
||||||
|
|
||||||
|
# Breaking change detection
|
||||||
|
diff:
|
||||||
|
enabled: true
|
||||||
|
fail_on_breaking: true # CI fails on breaking changes
|
||||||
|
|
||||||
|
# Optional: publish to monorepo
|
||||||
|
publish:
|
||||||
|
repo: myorg/sdks
|
||||||
|
path: packages/myapi
|
||||||
|
|
||||||
|
# Required tools (install one per language):
|
||||||
|
# TypeScript: npm i -g openapi-typescript-codegen (or Docker)
|
||||||
|
# Python: pip install openapi-python-client (or Docker)
|
||||||
|
# Go: go install github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen@latest
|
||||||
|
# PHP: Docker required
|
||||||
|
#
|
||||||
|
# Usage:
|
||||||
|
# core sdk generate # Generate all configured languages
|
||||||
|
# core sdk generate --lang go # Generate single language
|
||||||
|
# core sdk diff --base v1.0.0 # Check for breaking changes
|
||||||
|
# core sdk validate # Validate spec
|
||||||
Loading…
Add table
Reference in a new issue