remove description from ApiMethod
We use the description from parameters ObjectSchema instead.
This commit is contained in:
parent
768e01091a
commit
3e1497fb75
|
@ -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>,
|
||||
|
|
|
@ -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,7 +42,6 @@ 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.")
|
||||
.optional("force", BooleanSchema::new("Test for boolean options")),
|
||||
returns: Schema::Null,
|
||||
|
|
Loading…
Reference in New Issue