{ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://api-evangelist.github.io/refitter/json-schema/refitter-settings-schema.json", "title": "Refitter Settings", "description": "Schema for the .refitter configuration file that controls how Refitter generates Refit HTTP client interfaces from OpenAPI specifications.", "type": "object", "properties": { "openApiPath": { "type": "string", "description": "Path or URL to the OpenAPI specification file. Supports local file paths and HTTP(S) URLs.", "examples": [ "./openapi.json", "https://petstore.swagger.io/v2/swagger.json" ] }, "namespace": { "type": "string", "description": "The C# namespace for generated code.", "default": "GeneratedCode", "examples": ["MyCompany.Api.Client"] }, "naming": { "type": "object", "description": "Naming convention configuration for generated types.", "properties": { "useOpenApiTitle": { "type": "boolean", "description": "Use the OpenAPI title as the namespace when true.", "default": false }, "interfaceName": { "type": "string", "description": "Name for the generated interface.", "default": "IApiClient" } } }, "outputFolder": { "type": "string", "description": "Output folder for generated files.", "default": "./Generated" }, "outputFilename": { "type": "string", "description": "Name of the generated output file.", "default": "RefitInterfaces.cs" }, "returnIApiResponse": { "type": "boolean", "description": "When true, generated methods return IApiResponse for access to response metadata.", "default": false }, "generateContracts": { "type": "boolean", "description": "Whether to generate contract model classes alongside the Refit interfaces.", "default": true }, "generateXmlDocCodeComments": { "type": "boolean", "description": "Whether to include XML documentation comments on generated members.", "default": true }, "addAutoGeneratedHeader": { "type": "boolean", "description": "Add an auto-generated code header comment to output files.", "default": true }, "addAcceptHeaders": { "type": "boolean", "description": "Add Accept headers to GET methods.", "default": true }, "useCancellationTokens": { "type": "boolean", "description": "Include CancellationToken parameters in generated methods.", "default": false }, "typeStyle": { "type": "string", "description": "Code style for generated types.", "enum": ["Classes", "Records", "RecordsStruct"], "default": "Classes" }, "contractsOutputFolder": { "type": "string", "description": "Separate output folder for generated contract/model classes." }, "multipleInterfaces": { "type": "string", "description": "Strategy for splitting output into multiple interfaces.", "enum": ["Unset", "ByEndpoint", "ByTag"] }, "includePathMatches": { "type": "array", "description": "Regex patterns for API paths to include in generation.", "items": { "type": "string" } }, "excludePathMatches": { "type": "array", "description": "Regex patterns for API paths to exclude from generation.", "items": { "type": "string" } }, "useDynamicQuerystringParameters": { "type": "boolean", "description": "Use dynamic query string parameter objects.", "default": false }, "generateDefaultAdditionalParameters": { "type": "boolean", "description": "Generate default additional parameters.", "default": false } }, "required": ["openApiPath"] }