package tezos-openapi

  1. Overview
  2. Docs
val fail : ('a, unit, string, 'b) format4 -> 'c
type arg = {
  1. id : string;
  2. name : string;
  3. descr : string option;
}
type 'a tree =
  1. | Static of 'a static
  2. | Dynamic of Json.t
and 'a static = {
  1. get_service : 'a option;
  2. post_service : 'a option;
  3. put_service : 'a option;
  4. delete_service : 'a option;
  5. patch_service : 'a option;
  6. subdirs : 'a subdirs option;
}
and 'a subdirs =
  1. | Suffixes of 'a suffix list
  2. | Dynamic_dispatch of {
    1. arg : arg;
    2. tree : 'a tree;
    }
and 'a suffix = {
  1. name : string;
  2. tree : 'a tree;
}
val opt_mandatory : string -> Json.t -> 'a option -> 'b
val parse_arg : Json.t -> arg
val parse_tree : Json.t -> Json.t tree
val parse_subdirs : Json.t -> Json.t subdirs
val parse_suffix : Json.t -> Json.t suffix
type path_item =
  1. | PI_static of string
  2. | PI_dynamic of arg
val show_path_item : path_item -> string
type path = path_item list
val show_path : path_item list -> string
type 'a endpoint = {
  1. path : path;
  2. get : 'a option;
  3. post : 'a option;
  4. put : 'a option;
  5. delete : 'a option;
  6. patch : 'a option;
}
val flatten_tree : path_item list -> 'a endpoint list -> 'b tree -> 'a endpoint list
val flatten_static : path_item list -> 'a endpoint list -> 'b static -> 'a endpoint list
val flatten_subdirs : path_item list -> 'a endpoint list -> 'b subdirs -> 'a endpoint list
val flatten_suffix : path_item list -> 'a endpoint list -> 'b suffix -> 'a endpoint list
val flatten : 'a tree -> 'a endpoint list
type schemas = {
  1. json_schema : Json.t;
  2. binary_schema : Json.t;
}
type query_parameter_kind =
  1. | Optional of {
    1. name : string;
    }
  2. | Multi of {
    1. name : string;
    }
  3. | Single of {
    1. name : string;
    }
  4. | Flag
type query_parameter = {
  1. id : string option;
  2. name : string;
  3. description : string option;
  4. kind : query_parameter_kind;
}
type service = {
  1. meth : Method.t;
  2. path : path_item list;
  3. description : string;
  4. query : query_parameter list;
  5. input : schemas option;
  6. output : schemas option;
  7. error : schemas option;
}
val parse_schemas : Json.t -> schemas
val parse_path_item : Json.t -> path_item
val parse_path : Json.t -> path
val parse_query_parameter : Json.t -> query_parameter
val parse_service : Json.t -> service
val map_tree : ('a -> 'b) -> 'c tree -> 'd tree
val map_static : ('a -> 'b) -> 'c static -> 'd static
val map_subdirs : ('a -> 'b) -> 'c subdirs -> 'd subdirs
val map_suffix : ('a -> 'b) -> 'c suffix -> 'd suffix
val parse_services : Json.t tree -> service tree
OCaml

Innovation. Community. Security.