loops-so 0.2.0

Unofficial Rust SDK for the Loops.so email platform
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! The Loops OpenAPI spec [`generated`](crate::generated) was built from.
//!
//! Consumers can check their own fakes or contract tests against exactly the
//! API this crate speaks.

use std::path::Path;

/// The `info.version` of the shipped spec. `just generate` rewrites it
/// together with the spec and the generated code.
pub const LOOPS_API_VERSION: &str = "1.22.4";

/// The shipped OpenAPI spec, as YAML.
pub const OPENAPI_SPEC: &str = include_str!("openapi.yaml");

/// Filesystem path of the shipped OpenAPI spec inside the crate sources.
pub fn openapi_spec_path() -> &'static Path {
    Path::new(concat!(env!("CARGO_MANIFEST_DIR"), "/src/openapi.yaml"))
}