holochain_util 0.5.3

This crate is a collection of various utility functions that are used in the other crates in the holochain repository.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! Custom schema representations for serializing third-party types in JSON Schema format.

use schemars::{
    gen::SchemaGenerator,
    schema::{InstanceType, Schema, SchemaObject},
};

/// Custom schemars representation for `Url2`
pub fn url2_schema(_: &mut SchemaGenerator) -> Schema {
    Schema::Object(SchemaObject {
        instance_type: Some(InstanceType::String.into()),
        format: Some("uri".to_string()),
        ..Default::default()
    })
}