Reference
CLI Options Reference
Complete reference for every autosdk generate flag and option.
Complete reference for all autosdk generate command options.
Usage
autosdk generate <input> [options]<input> — Path or URL to an OpenAPI 3.0/3.1 or AsyncAPI 2.x specification (JSON or YAML).
Core Options
| Option | Type | Default | Description |
|---|---|---|---|
--output | string | Generated | Output directory for generated files |
--namespace | string | From project | C# namespace for all generated types |
--clientClassName | string | Api | Name of the generated HTTP client class |
--targetFramework | string | From project | Target framework (e.g., net10.0, netstandard2.0) |
--single-file | bool | false | Generate all code in a single file |
Security Options
| Option | Type | Default | Description |
|---|---|---|---|
--security-scheme | string | — | Auth scheme (repeatable). Format: Type:Location:Name |
--base-url | string | — | Inject server URL into the spec |
Security Scheme Format
Type:Location:Name where:
- Type:
ApiKeyorHttp - Location:
Header,Query, orCookie - Name: Parameter name or auth scheme (
Bearer,Basic)
Examples:
--security-scheme Http:Header:Bearer # Bearer token
--security-scheme ApiKey:Header:x-api-key # API key in header
--security-scheme ApiKey:Query:api_key # API key in query string
--security-scheme Http:Header:Basic # Basic authNaming Options
| Option | Type | Default | Description |
|---|---|---|---|
--methodNamingConvention | enum | SimpleOperationId | Method naming strategy |
--methodNamingConventionFallback | enum | MethodAndPath | Fallback when operationId missing |
--useExtensionNaming | bool | false | Use x-fern-sdk-group-name/x-fern-sdk-method-name |
Method naming conventions: SimpleOperationId, MethodAndPath, OperationIdWithDots
Filtering Options
| Option | Type | Default | Description |
|---|---|---|---|
--exclude-deprecated-operations | bool | false | Skip deprecated operations |
--includeOperationIds | string | — | Only generate these operations (semicolon-separated) |
--excludeOperationIds | string | — | Skip these operations (semicolon-separated) |
--includeTags | string | — | Only generate operations with these tags |
--excludeTags | string | — | Skip operations with these tags |
--includeModels | string | — | Only generate these models |
--excludeModels | string | — | Skip these models |
Model Options
| Option | Type | Default | Description |
|---|---|---|---|
--modelStyle | enum | Class | Model code style: Class, Record, ReadonlyRecordStruct |
--validation | bool | false | Generate validation methods on models |
--compute-discriminators | bool | false | Auto-detect oneOf/anyOf discriminators |
JSON Options
| Option | Type | Default | Description |
|---|---|---|---|
--json-serializer-type | enum | SystemTextJson | Serializer: SystemTextJson or NewtonsoftJson |
--json-serializer-context | string | — | Reference existing JsonSerializerContext |
AsyncAPI / WebSocket Options
| Option | Type | Default | Description |
|---|---|---|---|
--websocket-class-name | string | Auto | Override WebSocket client class name |
--types-namespace | string | — | Reference types from another namespace |
--generate-models | bool | true | Whether to generate model classes |
Code Generation Options
| Option | Type | Default | Description |
|---|---|---|---|
--generate-polyfills | bool | true | Generate framework compatibility shims |
--generate-exceptions | bool | true | Generate exception types |
--generate-cli | bool | false | Generate CLI wrapper for the SDK |
--group-by-tags | bool | false | Group operations by OpenAPI tags |
Error Handling
| Option | Type | Default | Description |
|---|---|---|---|
--ignore-openapi-errors | bool | true | Continue on spec parse errors |
--ignore-openapi-warnings | bool | true | Suppress spec warnings |
Edit on GitHub
Last updated on