Configuration Options Reference
Comprehensive guide to all configuration options available for the JSON-RPC tools suite
On this page
Overview
The JSON-RPC tools suite offers extensive configuration options to customize the behavior of each tool according to your specific needs. This reference document provides a comprehensive list of all available configuration options for each tool in the suite.
Configuration options can be specified in several ways:
- Through the web interface for each tool
- Via command-line arguments when using the CLI tools
- In configuration files when integrating with build systems
- Through API parameters when using the JavaScript libraries
Validator Options
The JSON-RPC Validator supports the following configuration options:
Option | Type | Default | Description |
---|---|---|---|
version | string | "2.0" | JSON-RPC protocol version to validate against ("1.0" or "2.0") |
strictMode | boolean | true | Enforce strict validation according to the specification |
allowExtraFields | boolean | false | Allow additional fields not defined in the specification |
validateParams | boolean | true | Validate parameter types and structure if schema is provided |
batchLimit | number | 100 | Maximum number of requests allowed in a batch request |
maxDepth | number | 20 | Maximum depth for nested objects and arrays |
Usage Example
Web Interface
In the web interface, these options are available in the settings panel of the Validator tool.
Command Line
npx jsonrpc-validator --version=1.0 --strictMode=false --allowExtraFields=true ./api/schema.json
API Usage
import { validateJsonRpc } from '@jsonrpc-tools/validator'; const result = validateJsonRpc(jsonRpcMessage, { version: '2.0', strictMode: true, allowExtraFields: false, validateParams: true, batchLimit: 50, maxDepth: 10 });
Generator Options
The JSON-RPC Generator supports these configuration options:
Option | Type | Default | Description |
---|---|---|---|
version | string | "2.0" | JSON-RPC protocol version to generate ("1.0" or "2.0") |
idGenerator | function | auto | Function to generate request IDs (numeric, string, or null) |
paramsStyle | string | "auto" | Style for parameters: "array", "object", or "auto" |
errorData | boolean | true | Include data field in error responses |
batchMode | boolean | false | Generate batch requests/responses |
Tester Options
The JSON-RPC Request Tester has these configuration options:
Option | Type | Default | Description |
---|---|---|---|
timeout | number | 30000 | Request timeout in milliseconds |
headers | object | {} | Custom HTTP headers to include with requests |
validateResponse | boolean | true | Validate responses against JSON-RPC specification |
cors | boolean | true | Include CORS headers in requests |
credentials | string | "same-origin" | Credentials mode for fetch requests |
Global Options
These global options apply to multiple tools in the suite:
Option | Type | Default | Description |
---|---|---|---|
theme | string | "light" | UI theme ("light", "dark", or "system") |
saveSettings | boolean | true | Save user settings in local storage |
debug | boolean | false | Enable debug mode with additional logging |
language | string | "en" | UI language (when multiple languages are supported) |
Note: Configuration options can be exported and imported using the settings menu in each tool. This allows you to save and share your preferred configurations.