port-sdk 0.1.0

Rust SDK for Port APIs.
Documentation
/// Provides read-only access to the bundled Port OpenAPI schema.
///
/// The schema is copied directly from `schemas/port.swagger.json` and its SHA-256
/// digest is calculated during the build step. Update the source file whenever
/// Port publishes a new API definition.
pub const RAW_SCHEMA: &str = include_str!("../schemas/port.swagger.json");

include!(concat!(env!("OUT_DIR"), "/schema_meta.rs"));

/// Returns the embedded OpenAPI document as a JSON string.
pub fn raw_schema() -> &'static str {
    RAW_SCHEMA
}

/// Returns the SHA-256 digest of the embedded schema. Useful for cache busting
/// or telemetry so consumers can detect schema drift.
pub fn port_schema_sha256() -> &'static str {
    PORT_SCHEMA_SHA256
}