Low-level values (functions, constants) shared among OpenAPI generator implementations.

Logs

Parsers

Sourceval response_code_of_string : string -> OaTypes.response_code

Converters

Sourceval primitive_kind_of_schema_kind : OaTypes.schema_kind -> OaTypes.primitive_kind option
Sourceval 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

Sourceval pp_list_i : ?sep:unit Fmt.t -> (int * 'a) Fmt.t -> Restapis_o.Open__.Format.formatter -> 'a list -> unit
Sourceval pp_callfunc : ?bare:unit -> func:string -> (Restapis_o.Open__.Format.formatter -> 'a -> unit) -> Restapis_o.Open__.Format.formatter -> 'a -> unit
Sourceval path_as_json_ptr : ?wildcards:bool -> [< `Field of string | `Index of int | `Next | `Star ] list -> string
Sourceval pp_path : Restapis_o.Open__.Format.formatter -> [< `Field of string | `Index of int | `Next | `Star Field ] list -> unit
Sourceval show_path : [< `Field of string | `Index of int | `Next | `Star Field ] list -> string
Sourcetype param_in = OaTypes.param_in =
  1. | Query
  2. | Header
  3. | Path
  4. | Cookie
Sourceval pp_param_in : Restapis_o.Open__.Format.formatter -> param_in -> unit
Sourcetype operation_id = OaTypes.operation_id =
  1. | OpPath of {
    1. doc_path : Json_query.path;
    2. path_template : string;
    3. name : string;
    }
  2. | OpId of {
    1. id : string;
    2. path_template : string;
    3. name : string;
    }
Sourceval pp_operation_id : brief:bool -> Restapis_o.Open__.Format.formatter -> operation_id -> unit
Sourceval pp_param_ref : Restapis_o.Open__.Format.formatter -> OaTypes.param_ref -> unit
Sourceval pp_pathobj_seg : Restapis_o.Open__.Format.formatter -> OaTypes.pathobj_seg -> unit
Sourceval pp_string : Restapis_o.Open__.Format.formatter -> string -> unit
Sourceval pp_opt : ('a -> 'b -> unit) -> 'a -> 'b option -> unit
Sourceval pp_num : Restapis_o.Open__.Format.formatter -> float -> unit
Sourceval pp_numeric_specs : Restapis_o.Open__.Format.formatter -> Json_schema.numeric_specs -> unit
Sourceval pp_desc : OaTypes.schema -> (Restapis_o.Open__.Format.formatter -> unit -> unit) option
Sourceval pp_description : Restapis_o.Open__.Format.formatter -> string -> unit
Sourceval pp_schema : Restapis_o.Open__.Format.formatter -> OaTypes.schema -> unit
Sourceval pp_object_contents : Restapis_o.Open__.Format.formatter -> OaTypes.object_specs -> unit
Sourceval pp_parameter : Restapis_o.Open__.Format.formatter -> OaTypes.parameter -> unit
Sourceval pp_header : Restapis_o.Open__.Format.formatter -> OaTypes.header -> unit
Sourceval pp_request_body : Restapis_o.Open__.Format.formatter -> OaTypes.request_body -> unit
Sourceval pp_responses : Restapis_o.Open__.Format.formatter -> OaTypes.responses -> unit
Sourceval pp_response_code : Restapis_o.Open__.Format.formatter -> OaTypes.response_code -> unit
Sourceval pp_response : Restapis_o.Open__.Format.formatter -> OaTypes.response -> unit
Sourceval pp_operation_seg : Restapis_o.Open__.Format.formatter -> OaTypes.operation_seg -> unit
Sourceval pp_operation : brief_operation_id:bool -> Restapis_o.Open__.Format.formatter -> OaTypes.operation -> unit
Sourceval pp_path_item : Restapis_o.Open__.Format.formatter -> OaTypes.path_item -> unit
Sourceval pp_media_type : Restapis_o.Open__.Format.formatter -> OaTypes.media_type -> unit
Sourceval pp : Restapis_o.Open__.Format.formatter -> OaTypes.t -> unit

Errors

Sourceval print_error : ?print_unknown:(Restapis_o.Open__.Format.formatter -> exn -> unit) -> Restapis_o.Open__.Format.formatter -> exn -> unit

Document Paths

Sourceval default_paths_path : string
Sourceval default_schemas_path : string
Sourceval default_headers_path : string
Sourceval default_responses_path : string
Sourceval default_request_bodies_path : string
Sourceval default_parameters_path : string
Sourceval paths_path_of_template : ?paths_path:string -> string -> [> `Field of string | `Index of int | `Next ] list
Sourceval parameter_path_of_name : ?parameters_path:string -> string -> [> `Field of string | `Index of int | `Next ] list
Sourceval schema_path_of_name : ?schemas_path:string -> string -> [> `Field of string | `Index of int | `Next ] list
Sourceval header_path_of_name : ?headers_path:string -> string -> [> `Field of string | `Index of int | `Next ] list
Sourceval request_body_path_of_name : ?request_bodies_path:string -> string -> [> `Field of string | `Index of int | `Next ] list
Sourceval response_path_of_name : ?responses_path:string -> string -> [> `Field of string | `Index of int | `Next ] list
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.