baqup-schema 0.0.1

JSON Schema validation and environment variable loading for baqup agent configuration
Documentation
# baqup-schema

JSON Schema validation and environment variable loading for baqup agent configuration.

> ⚠️ **This is a placeholder crate.** Full implementation coming soon.

## What is baqup?

[baqup](https://github.com/baqupio/baqup) is a container-native backup orchestration system. It uses a controller-agent architecture where:

- The **controller** discovers workloads via Docker labels
- **Agents** perform backup/restore operations
- Configuration is defined via JSON Schema

This crate provides schema validation for agent configuration, used by both:
- Agents (to validate their own configuration at startup)
- Controller (to pre-flight validate before spawning agents)

## Planned Features

- JSON Schema validation (draft-2020-12)
- Environment variable loading with type coercion
- Custom format validators (`path`, `hostname`, etc.)
- Conditional validation support

## Installation

```toml
[dependencies]
baqup-schema = "0.0.1"
```

## Usage (Preview API)

```rust
use baqup_schema::{validate, load_from_env};

// Load and validate from environment variables
let config = load_from_env("agent-schema.json")?;

// Or validate an existing value
let result = validate(&schema, &config)?;
if !result.valid {
    for error in result.errors.unwrap() {
        println!("{}: {}", error.path, error.message);
    }
}
```

## Related Crates

| Crate | Description |
|-------|-------------|
| `baqup-schema` | Schema validation (this crate) |
| `baqup-agent` | Agent SDK for Rust |

## Links

- [GitHub]https://github.com/baqupio/baqup
- [Documentation]https://github.com/baqupio/baqup/blob/main/AGENT-CONTRACT-SPEC.md
- [docs.rs]https://docs.rs/baqup-schema

## License

Fair Source License - see [LICENSE](./LICENSE) for details.