1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
//! # OpenAPI Specification (OAS) 3.0 Rust Implementation
//!
//! This crate provides a complete implementation of the OpenAPI Specification 3.0 in Rust,
//! with comprehensive support for serialization/deserialization and convenient builder patterns
//! for programmatic API specification creation.
//!
//! ## Features
//!
//! - **Complete OAS 3.0 Support**: All OpenAPI 3.0 specification features including schemas,
//! operations, parameters, responses, security, callbacks, and links
//! - **Serde Integration**: Full JSON/YAML serialization and deserialization support
//! - **Builder Patterns**: Fluent APIs for easy specification construction
//! - **Type Safety**: Leverages Rust's type system to prevent invalid specifications
//! - **Reference System**: Support for both inline definitions and `$ref` references
//!
//! ## Quick Start
//!
//! ```rust
//! use oas::{builders, Referenceable, PathItem, Tag, Server};
//!
//! let api = builders::api("My API", "1.0.0")
//! .with_description("A sample API")
//! .add_server(Server::new("https://api.example.com"))
//! .add_path("/users", PathItem::new()
//! .with_get(builders::get("List users")
//! .response("200", Referenceable::ok("User list"))
//! .build()));
//!
//! println!("{}", api.to_string());
//! ```
//!
//! ## Core Types
//!
//! - [`OpenAPIV3`] - The root OpenAPI document
//! - [`Referenceable<T>`] - Wrapper for inline data or references
//! - [`builders`] - Module containing builder utilities
//! - [`OperationBuilder`] - Builder for complex operations
//!
//! ## Reference vs Inline Data
//!
//! The [`Referenceable<T>`] type allows you to specify either inline data or references
//! to reusable components:
//!
//! ```rust
//! use oas::{Referenceable, Schema};
//!
//! // Inline schema
//! let inline = Referenceable::data(Schema::string());
//!
//! // Reference to component
//! let reference = Referenceable::schema_ref("User");
//! ```
// Module declarations
// Re-export main types for convenience
pub use *;
pub use *;
// Re-export builder functionality
pub use *;