From 3e1497fb75dfc5e8067839de45b77c1b15aacc33 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Fri, 23 Nov 2018 17:02:50 +0100 Subject: [PATCH] remove description from ApiMethod We use the description from parameters ObjectSchema instead. --- src/api/router.rs | 1 - src/api3.rs | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/api/router.rs b/src/api/router.rs index 5d2e0776..7d825f8e 100644 --- a/src/api/router.rs +++ b/src/api/router.rs @@ -5,7 +5,6 @@ use serde_json::{Value}; use std::collections::HashMap; pub struct ApiMethod { - pub description: &'static str, pub parameters: ObjectSchema, pub returns: Schema, pub handler: fn(Value, &ApiMethod) -> Result, diff --git a/src/api3.rs b/src/api3.rs index 4f09b82d..93534ed2 100644 --- a/src/api3.rs +++ b/src/api3.rs @@ -30,7 +30,6 @@ pub fn router() -> Router { let route3 = Router::new() .get(ApiMethod { - description: "Another Endpoint.", parameters: ObjectSchema::new("Another Endpoint."), returns: Schema::Null, handler: |param, _info| { @@ -43,8 +42,7 @@ pub fn router() -> Router { let route2 = Router::new() .get(ApiMethod { handler: test_sync_api_handler, - description: "This is a simple test.", - parameters: ObjectSchema::new("This is a simple test.") + parameters: ObjectSchema::new("This is a simple test.") .optional("force", BooleanSchema::new("Test for boolean options")), returns: Schema::Null, })