remove description from ApiMethod

We use the description from parameters ObjectSchema instead.
This commit is contained in:
Dietmar Maurer 2018-11-23 17:02:50 +01:00
parent 768e01091a
commit 3e1497fb75
2 changed files with 1 additions and 4 deletions

View File

@ -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<Value, Error>,

View File

@ -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,
})