fixed the schema

Dieser Commit ist enthalten in:
Sebastian Tobie 2025-06-15 08:54:07 +02:00
Ursprung 4cb07326a7
Commit 034d69fd39
4 geänderte Dateien mit 14 neuen und 9 gelöschten Zeilen

Datei anzeigen

@ -97,7 +97,8 @@
"properties": {
"directory": {
"description": "Url for the directory",
"type": "uri"
"type": "string",
"format": "uri"
},
"email_addresses": {
"description": "Email addresses for the CA to contact the user",
@ -106,7 +107,8 @@
"null"
],
"items": {
"type": "email"
"type": "string",
"format": "email"
}
},
"eab_token": {

Datei anzeigen

@ -27,7 +27,8 @@
"description": "EmailAdresses that this Certificate is valid for",
"type": "array",
"items": {
"type": "email"
"type": "string",
"format": "email"
},
"default": []
},
@ -140,7 +141,8 @@
"properties": {
"directory": {
"description": "Url for the directory",
"type": "uri"
"type": "string",
"format": "uri"
},
"email_addresses": {
"description": "Email addresses for the CA to contact the user",
@ -149,7 +151,8 @@
"null"
],
"items": {
"type": "email"
"type": "string",
"format": "email"
}
},
"eab_token": {

Datei anzeigen

@ -205,7 +205,7 @@ fn serialize_with_formatter<T: Serialize, F: Formatter>(value: &T, formatter: F)
Ok(_) => {},
Err(error) => return Error::err(format!("Failed to Serialize the schema: {error}")),
}
store.push(b'\n');
Ok(unsafe { String::from_utf8_unchecked(store) })
}

Datei anzeigen

@ -208,14 +208,14 @@ pub mod schema {
if is_array(val) {
if let Some(items) = schema.get("items") {
let mut items = items.to_owned();
items.as_object_mut().unwrap().insert("type".to_string(), typval);
items.as_object_mut().unwrap().insert("format".to_string(), typval);
schema.insert("items".to_owned(), items);
} else {
schema.insert(
"items".to_owned(),
Value::Object({
let mut items = Map::with_capacity(1);
items.insert("type".to_owned(), typval);
items.insert("format".to_owned(), typval);
items
}),
);
@ -223,7 +223,7 @@ pub mod schema {
return;
}
}
schema.insert("type".to_string(), typval);
schema.insert("format".to_string(), typval);
}
pub fn email_transform(schema: &mut Schema) {