rjapi 0.0.1

A framework-agnostic JSON:API 1.1 implementation for Rust
Documentation
//! JSON:API 1.1 Implementation for Rust
//!
//! This crate provides a framework-agnostic implementation of the [JSON:API 1.1 specification](https://jsonapi.org/).
//! It includes data structures for JSON:API documents, resources, errors, and helper functions
//! for creating compliant responses.
//!
//! # Features
//!
//! - Fully compliant with JSON:API 1.1 specification
//! - Framework-agnostic design (works with Axum, Actix, Rocket, etc.)
//! - Support for resources, relationships, errors, and metadata
//! - Query parameter support for filtering, sorting, pagination, etc.
//! - Extensible and customizable
//!
//! # Usage
//!
//! ```rust
//! use rjapi::{JsonApiResponse, Resource};
//! use serde_json::json;
//!
//! let attributes = json!({
//!     "title": "Example Post",
//!     "content": "This is an example post."
//! });
//!
//! let resource = Resource {
//!     resource_type: "posts".to_string(),
//!     id: "1".to_string(),
//!     attributes: Some(attributes),
//!     relationships: None,
//!     links: None,
//!     meta: None,
//! };
//!
//! // Create a JSON:API response
//! let response = JsonApiResponse::new(resource).build();
//! println!("{}", serde_json::to_string_pretty(&response).unwrap());
//! ```

pub mod error;
pub mod middleware;
pub mod request;
pub mod response;

pub use error::*;
pub use middleware::*;
pub use response::*;

// Re-export http crate for convenience
pub use http;