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
//! HttpInboundAdaptersSpec: collection of HttpInboundAdapterSpec entries sharing a single version.
//!
//! Mirrors ServiceActivatorsSpec / FiltersSpec semantics for ordered aggregation, preserving
//! declaration order and deferring uniqueness / auto-id concerns to builder logic.
//!
//! # Responsibilities
//! * Store version (validated by YAML parser).
//! * Preserve adapter declaration order (Vec internally).
//! * Allow optional / duplicate ids (uniqueness enforced later).
//!
//! # Auto-ID Strategy (Builder Level - FUTURE)
//! * Missing `http-inbound-adapter.id` values assigned deterministic `http-inbound-adapter:auto.N`.
//! * Duplicate explicit ids -> build error.
//!
//! # Example
//! ```rust
//! use allora_runtime::spec::{HttpInboundAdapterSpec, HttpInboundAdaptersSpec};
//! let spec = HttpInboundAdaptersSpec::new(1)
//! .add(HttpInboundAdapterSpec::with_id("http.recv", "0.0.0.0", 8080, "/recv", vec!["POST".into()], "inbound.recv"))
//! .add(HttpInboundAdapterSpec::new("127.0.0.1", 8081, "/health", vec!["GET".into()], "inbound.health"));
//! assert_eq!(spec.adapters().len(), 2);
//! assert_eq!(spec.adapters()[0].id(), Some("http.recv"));
//! assert!(spec.adapters()[1].id().is_none());
//! ```
use crateHttpInboundAdapterSpec;