Przeglądaj źródła

refactor(hermes): move docs_examples inside api

Ali Behjati 2 lat temu
rodzic
commit
cefdd84483

+ 1 - 0
hermes/src/api.rs

@@ -27,6 +27,7 @@ use {
     utoipa_swagger_ui::SwaggerUi,
 };
 
+mod doc_examples;
 mod metrics_middleware;
 mod rest;
 mod types;

+ 0 - 0
hermes/src/doc_examples.rs → hermes/src/api/doc_examples.rs


+ 1 - 1
hermes/src/api/rest/get_price_feed.rs

@@ -6,13 +6,13 @@ use {
             UnixTimestamp,
         },
         api::{
+            doc_examples,
             rest::RestError,
             types::{
                 PriceIdInput,
                 RpcPriceFeed,
             },
         },
-        doc_examples,
     },
     anyhow::Result,
     axum::{

+ 1 - 1
hermes/src/api/rest/get_vaa.rs

@@ -7,10 +7,10 @@ use {
             UnixTimestamp,
         },
         api::{
+            doc_examples,
             rest::RestError,
             types::PriceIdInput,
         },
-        doc_examples,
     },
     anyhow::Result,
     axum::{

+ 1 - 1
hermes/src/api/rest/latest_vaas.rs

@@ -3,10 +3,10 @@ use {
     crate::{
         aggregate::RequestTime,
         api::{
+            doc_examples,
             rest::RestError,
             types::PriceIdInput,
         },
-        doc_examples,
     },
     anyhow::Result,
     axum::{

+ 5 - 7
hermes/src/api/types.rs

@@ -1,11 +1,9 @@
 use {
-    crate::{
-        aggregate::{
-            PriceFeedUpdate,
-            Slot,
-            UnixTimestamp,
-        },
-        doc_examples,
+    super::doc_examples,
+    crate::aggregate::{
+        PriceFeedUpdate,
+        Slot,
+        UnixTimestamp,
     },
     base64::{
         engine::general_purpose::STANDARD as base64_standard_engine,

+ 0 - 1
hermes/src/main.rs

@@ -19,7 +19,6 @@ use {
 mod aggregate;
 mod api;
 mod config;
-mod doc_examples;
 mod network;
 mod serde;
 mod state;

+ 0 - 0
hermes/src/metrics_server.rs