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
//! Vendored copy of the IBKR Client Portal Web API OpenAPI specification.
//!
//! Interactive Brokers publishes the spec at
//! <https://api.ibkr.com/gw/api/v3/api-docs> as OpenAPI **3.0**. Bezant
//! vendors a pinned copy so downstream crates always build from a known
//! version. For Rust codegen via the [`bezant-api`] crate we upgrade
//! the spec to **3.1** (see [`SPEC_JSON_3_1`]) — the 3.0 source is
//! preserved via [`SPEC_JSON`] so consumers running their own generator
//! can pick whichever major they need.
//!
//! Refresh the vendored copy with `scripts/refresh-spec.sh`, then run
//! `scripts/codegen.sh` to regenerate the 3.1 derivative and the Rust client.
//!
//! [`bezant-api`]: https://docs.rs/bezant-api
/// The pinned IBKR OpenAPI 3.0 spec as a UTF-8 string — verbatim from
/// upstream.
///
/// Use [`SPEC_JSON`] if you need the original 3.0 wording; use
/// [`SPEC_JSON_3_1`] if you want the normalised-and-upgraded variant
/// `bezant-api` itself is generated from.
pub const SPEC_JSON: &str = include_str!;
/// The normalised + 3.1-upgraded spec as a UTF-8 string. Produced by
/// `scripts/codegen.sh` and checked in alongside the 3.0 source so
/// consumers don't need Python to reproduce our generator input.
pub const SPEC_JSON_3_1: &str = include_str!;
/// IBKR-reported spec version embedded in the vendored spec's `info.version`
/// field. Updated by `scripts/refresh-spec.sh`.
pub const UPSTREAM_VERSION: &str = "2.29.0";