use std::fmt::{Debug, Display, Formatter};
use indexmap::{map::Iter, IndexMap};
use json_value::Number;
mod traits;
mod typing;
mod value;
#[derive(Clone)]
pub struct JssSchema {
pub kind: JssKind,
name: Option<String>,
description: String,
typing: JssType,
property: IndexMap<String, JssSchema>,
definition: IndexMap<String, JssSchema>,
attribute: IndexMap<String, JssValue>,
}
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
pub enum JssKind {
Scheme,
Property,
PropertyTop,
Definition,
}
#[derive(Clone, Debug, PartialEq)]
pub enum JssType {
Undefined,
Anything,
Nothing,
String,
Integer,
Number,
Array,
Object,
Reference(String),
Complex(Box<JssComplexType>),
}
#[derive(Clone, PartialEq)]
pub struct JssComplexType {
pub pattern: JssValue,
}
#[derive(Clone, Eq, PartialEq)]
pub enum JssValue {
Null,
Boolean(bool),
Number(Number),
String(String),
Url(String),
Regex(String),
Array(Vec<JssValue>),
Object(IndexMap<String, JssValue>),
}