OpenAPI data type pretty printer orchestrator.

OaPp has a functor Make where you give it a high-level description of what needs to be printed. OaPp then gives you a printer that will print complete documents from Schema Objects in an OpenAPI specification.

It is not suitable for printing documents from other objects in OpenAPI like Paths Objects.

Primitive and reference data types are never on the LHS of an equation. Instead, they are expanded when used on the RHS of an equation.

module StringMap : sig ... end
Sourcemodule Tuples : sig ... end
Sourceval generalized_array : ?aspecs:OaTypes.array_specs -> singleton_items:bool -> OaTypes.schema list -> [> `List of OaTypes.schema | `Singleton of OaTypes.schema ] list
Sourceval mk_pp_recursive_defns : include_doc:bool -> pp_doc: (Restapis_o.Open__.Format.formatter -> title:'a -> description:'b -> param_docs:'c list -> see:(unit -> string) -> unit) -> first:bool Stdlib414Shadow.ref -> title:'a -> description:'b -> path:[< `Field of string | `Index of int | `Next | `Star Field ] list -> intro_first:string -> intro_rest:string -> (Restapis_o.Open__.Format.formatter -> 'd -> unit) -> Restapis_o.Open__.Format.formatter -> 'd -> unit
Sourcemodule type PRINTER = sig ... end
Sourcetype enclosing_type =
  1. | Named
  2. | Anonymous of {
    1. id : string option;
    }
Sourcetype field_kind =
  1. | Mandatory
  2. | Optional
  3. | Additional
Sourcetype field = {
  1. field_path : Json_query.path;
  2. field_kind : field_kind;
  3. field_pp : unit Fmt.t;
  4. field_pp_doc : unit Fmt.t;
}
Sourcemodule Make (F : PRINTER) : sig ... end
include DkCoder_Std.SCRIPT
Sourceval __init : DkCoder_Std.Context.t -> unit

__init context is the entry point for running a script module. The DkCoder compiler will inject this function at the top and bottom of the script module. The top __init does nothing, while the bottom __init calls the prior __init.

That means:

  1. calling the __init function guarantees that the script module is initialized; that is, all of the script module's side-effects (ex. let () = Format.printf "Hello world@.") are executed before the __init returns to the caller.
  2. you can override the __init function by simply defining the __init idempotently. That will shadow the top __init and when the bottom __init is executed your __init will be called instead of the do-nothing top __init.

Future versions of DkCoder will call __init in dependency order for all `You script modules. Your __init function may be called several times.

Sourceval __repl : DkCoder_Std.Context.t -> unit

__repl context is the entry point for debugging a script module in a REPL. The DkCoder compiler will inject this function at the top and bottom of the script module. The top __repl does nothing, while the bottom __repl calls the prior __repl.

That means:

  1. you can override the __repl function by simply defining the __repl idempotently. That will shadow the top __repl and when the bottom __repl is executed your __repl will be called instead of the do-nothing top __repl.
Sourceval __module_info : unit -> DkCoder_Std.ModuleInfo.t

The run-time module information for the script module.