Low-level values (functions, constants) shared among OpenAPI generator implementations.
Logs
Parsers
Converters
val definitive_optionality :
required:bool ->
nullable:bool ->
'a option ->
[ `DefinitivelyOptional | `DefinitivelyRequired | `Undetermined of 'a ]definitive_optionality ~required ~nullable primkind is true when a field that may be required and/or nullable, having format format and a possible enumeration of values enum, being of possible primitive type primkind, is definitely optional or definitely required. When it is not definitive one way or the other, then an `Undetermined primkind is returned.
Printers
val pp_callfunc :
?bare:unit ->
func:string ->
(Restapis_o.Open__.Format.formatter -> 'a -> unit) ->
Restapis_o.Open__.Format.formatter ->
'a ->
unitval path_as_json_ptr :
?wildcards:bool ->
[< `Field of string | `Index of int | `Next | `Star ] list ->
stringval pp_path :
Restapis_o.Open__.Format.formatter ->
[< `Field of string | `Index of int | `Next | `Star Field ] list ->
unittype operation_id = OaTypes.operation_id = | OpPath of {doc_path : Json_query.path;path_template : string;name : string;
}| OpId of {}
val pp_operation_id :
brief:bool ->
Restapis_o.Open__.Format.formatter ->
operation_id ->
unitval pp_numeric_specs :
Restapis_o.Open__.Format.formatter ->
Json_schema.numeric_specs ->
unitval pp_operation :
brief_operation_id:bool ->
Restapis_o.Open__.Format.formatter ->
OaTypes.operation ->
unitErrors
val print_error :
?print_unknown:(Restapis_o.Open__.Format.formatter -> exn -> unit) ->
Restapis_o.Open__.Format.formatter ->
exn ->
unitDocument Paths
val paths_path_of_template :
?paths_path:string ->
string ->
[> `Field of string | `Index of int | `Next ] listval parameter_path_of_name :
?parameters_path:string ->
string ->
[> `Field of string | `Index of int | `Next ] listval schema_path_of_name :
?schemas_path:string ->
string ->
[> `Field of string | `Index of int | `Next ] listval header_path_of_name :
?headers_path:string ->
string ->
[> `Field of string | `Index of int | `Next ] listval request_body_path_of_name :
?request_bodies_path:string ->
string ->
[> `Field of string | `Index of int | `Next ] listval response_path_of_name :
?responses_path:string ->
string ->
[> `Field of string | `Index of int | `Next ] listinclude DkCoder_Std.SCRIPT
__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:
- calling the
__initfunction 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__initreturns to the caller. - you can override the
__initfunction by simply defining the__initidempotently. That will shadow the top__initand when the bottom__initis executed your__initwill 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.
__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:
- you can override the
__replfunction by simply defining the__replidempotently. That will shadow the top__repland when the bottom__replis executed your__replwill be called instead of the do-nothing top__repl.
The run-time module information for the script module.

