Skip to content

Commit 9cfe357

Browse files
committed
tie protocol versions
The protocol version is indicated in the `openapi.yml` file must also be up to date at compile time in the Rust source code. For now, a comment to link the Rust constant to the YAML version has been made.
1 parent 1f7973f commit 9cfe357

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

mithril-aggregator/src/http_server/mod.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,8 @@ mod server;
33

44
pub use server::{Server, SERVER_BASE_PATH};
55

6-
pub const MITHRIL_API_VERSION: &str = "0.1.0";
6+
/// Mithril API protocol version
7+
/// this is the same as the one in openapi.yml file.
8+
/// If you want to update this version to reflect changes in the protocol,
9+
/// please also update the entry in the openapi.yml
10+
pub const MITHRIL_API_VERSION: &str = "0.0.1";

openapi.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
openapi: "3.0.0"
22
info:
3+
# The protocol version is embedded in the code as constant in the
4+
# `mithril-aggregator/src/http_server/mod.rs` file. If you plan to update it
5+
# here to reflect changes in the API, please also update the constant in the
6+
# Rust file.
37
version: 0.0.1
48
title: Mithril Aggregator Server
59
description: |

0 commit comments

Comments
 (0)