Skip to content
package

src.ce.core.util

module

src.ce.core.util.create_json_config_schema

Module for generating the JSON schema of the OpenTicketAI configuration.

This module defines the RootConfig model, which is a wrapper around the main configuration model OpenTicketAIConfig. The purpose of this wrapper is to facilitate the generation of a JSON schema that describes the entire configuration structure.

When this module is run as a script, it will:

  1. Generate the JSON schema for the RootConfig model.
  2. Write the schema to a file named config.schema.json in the project's root directory.

The generated schema file can be used for validating configuration files or for providing configuration autocompletion and documentation in editors.

Classes

class

RootConfig

From: src.ce.core.util.create_json_config_schema

Wrapper model used for schema generation.

This class serves as a container for the main configuration model of the OpenTicketAI system. It is designed to be used for generating JSON schema representations of the configuration.

Parameters

`open_ticket_ai``OpenTicketAIConfig`

The main configuration object containing all settings and parameters for the OpenTicketAI system.

module

src.ce.core.util.path_util

Utilities for handling file paths within the project.

This module provides helper functions for common path operations, particularly for locating important directories in the project structure.

Functions

module

src.ce.core.util.pretty_print_config

Module for pretty printing configuration objects.

This module provides functionality to display Pydantic configuration models in a nicely formatted and syntax highlighted way using the rich library. It converts Pydantic models to YAML format and applies syntax highlighting for improved readability.

Features:

  • Converts Pydantic BaseModel instances to dictionaries
  • Serializes configuration data to YAML format
  • Applies YAML syntax highlighting using rich
  • Prints highlighted output to console

Functions