{ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "Config", "description": "App-level configuration, which is global across all sessions and\ncollections. This is *not* meant to modifiable during a session. If changes\nare made to the config file while a TUI session is running, they won't be\npicked up until the app restarts.", "type": "object", "properties": { "editor": { "description": "Command to use for in-app editing. If provided, overrides\n`VISUAL`/`EDITOR` environment variables.", "type": [ "string", "null" ], "default": null }, "ignore_certificate_hosts": { "description": "TLS cert errors on these hostnames are ignored. Be careful!", "type": "array", "items": { "type": "string" }, "default": [] }, "large_body_size": { "description": "Request/response bodies over this size are treated differently, for\nperformance reasons", "type": "integer", "format": "uint", "minimum": 0, "default": 1000000 }, "follow_redirects": { "description": "Follow 3xx redirects automatically. Enabled by default", "type": "boolean", "default": true }, "commands": { "description": "Configuration for in-app query and export commands", "$ref": "#/$defs/CommandsConfig", "default": { "shell": [ "/bin/sh", "-c" ], "default_query": {} } }, "pager": { "description": "Command to use to browse response bodies. If provided, overrides\n`PAGER` environment variable. This could be a single command, or a\nmap of {content_type: command} to use different commands\nbased on response type. Aliased for backward compatibility\nwith the old name.", "$ref": "#/$defs/MimeMap", "default": {} }, "preview_templates": { "description": "Should templates be rendered inline in the UI, or should we show\nthe raw text?", "type": "boolean", "default": true }, "input_bindings": { "description": "Overrides for default key bindings", "$ref": "#/$defs/InputMap", "default": { "quit": [ "q" ], "force_quit": [ "ctrl c" ], "scroll_left": [ "shift left" ], "scroll_right": [ "shift right" ], "open_actions": [ "x" ], "open_help": [ "?" ], "fullscreen": [ "f" ], "reload_collection": [ "f5" ], "history": [ "h" ], "search": [ "/" ], "export": [ ":" ], "previous_pane": [ "shift tab" ], "next_pane": [ "tab" ], "up": [ "up" ], "down": [ "down" ], "left": [ "left" ], "right": [ "right" ], "page_up": [ "pageup" ], "page_down": [ "pagedown" ], "home": [ "home" ], "end": [ "end" ], "submit": [ "enter" ], "toggle": [ "space" ], "cancel": [ "escape" ], "delete": [ "delete" ], "edit": [ "e" ], "reset": [ "z" ], "view": [ "v" ], "select_collection": [ "f3" ], "select_profile_list": [ "p" ], "select_recipe_list": [ "l" ], "select_recipe": [ "c" ], "select_response": [ "r" ] } }, "theme": { "description": "Visual configuration for the TUI (e.g. colors)", "$ref": "#/$defs/Theme", "default": { "primary_color": "Blue", "primary_text_color": "White", "secondary_color": "Yellow", "success_color": "Green", "error_color": "Red" } }, "persist": { "description": "Enable/disable persistence for all TUI requests? The CLI ignores\nthis in favor of the absence/presence of the `--persist`\nflag", "type": "boolean", "default": true } }, "examples": [ { "editor": null, "ignore_certificate_hosts": [], "large_body_size": 1000000, "follow_redirects": true, "commands": { "shell": [ "/bin/sh", "-c" ], "default_query": {} }, "pager": {}, "preview_templates": true, "input_bindings": { "quit": [ "q" ], "force_quit": [ "ctrl c" ], "scroll_left": [ "shift left" ], "scroll_right": [ "shift right" ], "open_actions": [ "x" ], "open_help": [ "?" ], "fullscreen": [ "f" ], "reload_collection": [ "f5" ], "history": [ "h" ], "search": [ "/" ], "export": [ ":" ], "previous_pane": [ "shift tab" ], "next_pane": [ "tab" ], "up": [ "up" ], "down": [ "down" ], "left": [ "left" ], "right": [ "right" ], "page_up": [ "pageup" ], "page_down": [ "pagedown" ], "home": [ "home" ], "end": [ "end" ], "submit": [ "enter" ], "toggle": [ "space" ], "cancel": [ "escape" ], "delete": [ "delete" ], "edit": [ "e" ], "reset": [ "z" ], "view": [ "v" ], "select_collection": [ "f3" ], "select_profile_list": [ "p" ], "select_recipe_list": [ "l" ], "select_recipe": [ "c" ], "select_response": [ "r" ] }, "theme": { "primary_color": "Blue", "primary_text_color": "White", "secondary_color": "Yellow", "success_color": "Green", "error_color": "Red" }, "persist": true } ], "patternProperties": { "^\\.": { "description": "Ignore any property beginning with `.`" } }, "$defs": { "CommandsConfig": { "description": "Configuration for in-app query and export commands", "type": "object", "properties": { "shell": { "description": "Wrapping shell to parse and execute commands\nIf empty, commands will be parsed with shell-words and run natievly", "type": "array", "items": { "type": "string" }, "default": [ "/bin/sh", "-c" ] }, "default_query": { "description": "Default query command for responses", "$ref": "#/$defs/MimeMap", "default": {} } } }, "MimeMap": { "description": "A map of content type patterns to values. Use this when you need to select a\nvalue based on the `Content-Type` header of a request/response. The patterns\nuse [glob] for matching, so technically it's trying to match a Unix\npath-like string, but that happens to look the same as a MIME type.", "type": "object", "additionalProperties": { "type": "string" } }, "InputMap": { "description": "Mapping of actions to input bindings\n\nIntuitively this should be binding:action since we get key events from the\nuser and need to look up the corresponding actions. But we can't look up a\nbinding from the map based on an input event because event<=>binding\nmatching is more nuanced that simple equality (e.g. bonus modifiers keys can\nbe ignored). We have to iterate over map when checking inputs, but keying by\naction at least allows us to look up action=>binding for help text.", "type": "object", "additionalProperties": { "$ref": "#/$defs/InputBinding" } }, "InputBinding": { "description": "One or more key combinations, which should correspond to a single action", "type": "array", "items": { "$ref": "#/$defs/KeyCombination" } }, "KeyCombination": { "description": "Key input sequence, which can trigger an action", "type": "string" }, "Theme": { "description": "User-configurable visual settings. These are used to generate the full style\nset.", "type": "object", "properties": { "primary_color": { "description": "Color for primary content such as the selected pane", "$ref": "#/$defs/Color", "default": "Blue" }, "primary_text_color": { "description": "Color for text on top of the primary color. This should contrast with\nthe primary color well", "$ref": "#/$defs/Color", "default": "White" }, "secondary_color": { "description": "Color for secondary accented content", "$ref": "#/$defs/Color", "default": "Yellow" }, "success_color": { "description": "Color representing success (e.g. for 2xx status codes)", "$ref": "#/$defs/Color", "default": "Green" }, "error_color": { "description": "Color representing error (e.g. for 4xx status codes)", "$ref": "#/$defs/Color", "default": "Red" } }, "additionalProperties": false }, "Color": { "description": "ANSI color code\n\nThis type accepts input beyond the enumerated values, but for simplicity\nthis type only declares the named colors. The other available options\nare very rarely used and make the schema harder to read.\n\nFor a full list of allowed types, see\n[the ratatui docs](https://docs.rs/ratatui/0.29.0/ratatui/style/enum.Color.html#impl-FromStr-for-Color).", "type": "string", "enum": [ "black", "red", "green", "yellow", "blue", "magenta", "cyan", "gray", "darkgray", "lightred", "lightgreen", "lightyellow", "lightblue", "lightmagenta", "lightcyan", "white", "reset" ] } } }