oas/generator/lift

Types

A unique id from hashing the fields contents of an anonymous object

pub type ContentId {
  ContentId(first: String, rest: String)
}

Constructors

  • ContentId(first: String, rest: String)
pub type Fields {
  Fields(
    named: List(#(String, #(Schema(ContentId), Bool))),
    additional: option.Option(Schema(ContentId)),
    required: List(String),
  )
}

Constructors

pub type Lifted =
  Schema(ContentId)
pub type Primitive {
  Boolean
  Integer
  Number
  String
  Null
  Always
  Never
}

Constructors

  • Boolean
  • Integer
  • Number
  • String
  • Null
  • Always
  • Never
pub type Schema(t) {
  Named(String)
  Primitive(Primitive)
  Array(Schema(ContentId))
  Tuple(List(Schema(ContentId)))
  Compound(t)
  Dictionary(Schema(ContentId))
  Unsupported
}

Constructors

pub type Top =
  Schema(Fields)

Values

pub fn content_id_to_fn_prefix(id: ContentId) -> String
pub fn content_id_to_type(id: ContentId) -> String
pub fn do_lift(
  schema: json_schema.Ref(json_schema.Schema),
  acc: List(#(ContentId, Fields)),
) -> #(Schema(Fields), Bool, List(#(ContentId, Fields)))
Search Document