src/api2/types.rs: define SINGLE_LINE_COMMENT_SCHEMA

This commit is contained in:
Dietmar Maurer
2020-01-13 12:02:13 +01:00
parent 167971ed49
commit 454c13edce
5 changed files with 13 additions and 12 deletions

View File

@ -16,13 +16,12 @@ lazy_static! {
// fixme: define better schemas
pub const DIR_NAME_SCHEMA: Schema = StringSchema::new("Directory name").schema();
pub const COMMENT_SCHEMA: Schema = StringSchema::new("Datastore comment").schema();
#[api(
properties: {
comment: {
optional: true,
schema: COMMENT_SCHEMA,
schema: SINGLE_LINE_COMMENT_SCHEMA,
},
path: {
schema: DIR_NAME_SCHEMA,

View File

@ -16,7 +16,6 @@ lazy_static! {
// fixme: define better schemas
pub const COMMENT_SCHEMA: Schema = StringSchema::new("Comment").schema();
pub const REMOTE_HOST_SCHEMA: Schema = StringSchema::new("Host IP address or DNS name.").schema();
pub const REMOTE_USERID_SCHEMA: Schema = StringSchema::new("User ID").schema();
pub const REMOTE_PASSWORD_SCHEMA: Schema = StringSchema::new("Password or auth token.").schema();
@ -25,7 +24,7 @@ pub const REMOTE_PASSWORD_SCHEMA: Schema = StringSchema::new("Password or auth t
properties: {
comment: {
optional: true,
schema: COMMENT_SCHEMA,
schema: SINGLE_LINE_COMMENT_SCHEMA,
},
host: {
schema: REMOTE_HOST_SCHEMA,