Skip to main content

load_from_path

Function load_from_path 

Source
pub fn load_from_path(path: &Path) -> Result<SchemaConfig, MiniAppError>
Expand description

Loads and parses a schema.yaml file from the given path.

The YAML file must conform to the following structure:

table: <table_name>
fields:
  - name: <field_name>
    type: string|number|boolean|array|object
    required: true|false   # optional, defaults to false

§Arguments

  • path: filesystem path to the schema.yaml file.

§Returns

A fully-parsed SchemaConfig on success.

§Errors