boon now included
This commit is contained in:
@ -764,6 +764,52 @@ pub fn title_override_schemas() -> JsonB {
|
||||
cache_json_schemas(jsonb(enums), jsonb(types), jsonb(puncs))
|
||||
}
|
||||
|
||||
pub fn format_with_ref_schemas() -> JsonB {
|
||||
let enums = json!([]);
|
||||
let types = json!([
|
||||
{
|
||||
"name": "entity",
|
||||
"schemas": [{
|
||||
"$id": "entity",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": { "type": "string", "format": "uuid" },
|
||||
"type": { "type": "string" },
|
||||
"name": { "type": "string" }
|
||||
},
|
||||
"required": ["id", "type"]
|
||||
}]
|
||||
},
|
||||
{
|
||||
"name": "job",
|
||||
"schemas": [{
|
||||
"$id": "job",
|
||||
"$ref": "entity",
|
||||
"properties": {
|
||||
"worker_id": { "type": "string", "format": "uuid" }
|
||||
}
|
||||
}]
|
||||
}
|
||||
]);
|
||||
|
||||
let puncs = json!([{
|
||||
"name": "save_job",
|
||||
"public": true,
|
||||
"schemas": [
|
||||
{
|
||||
"$id": "save_job.request",
|
||||
"$ref": "job"
|
||||
},
|
||||
{
|
||||
"$id": "save_job.response",
|
||||
"$ref": "job"
|
||||
}
|
||||
]
|
||||
}]);
|
||||
|
||||
cache_json_schemas(jsonb(enums), jsonb(types), jsonb(puncs))
|
||||
}
|
||||
|
||||
pub fn type_matching_schemas() -> JsonB {
|
||||
let enums = json!([]);
|
||||
let types = json!([
|
||||
|
||||
Reference in New Issue
Block a user