OCaml let getRestOperation = Routes.ksprintf k x printer.

Sourcetype response_info = {
  1. requestbody : requestbody_json_match option;
    (*

    The best request body, if any. Useful for clients to pick the best one.

    *)
  2. statuscodes : statuscode_info list;
  3. default_statuscode_qualified_type : string option;
  4. requestbody_serdes : ([ `Tag of string ] * string) list;
    (*

    All of the request body serdes. Useful for servers which must implement all request body types.

    *)
  5. requestbody_unsupported_content : ([ `Tag of string ] * [ `MediaType of string ]) list;
}
Sourceand requestbody_json_match = {
  1. requestbody_required : bool;
  2. requestbody_qualified_type : string;
  3. requestbody_content_type : string;
  4. requestbody_content_type_tag : string;
  5. requestbody_serde : string;
  6. requestbody_encoder_pp : Restapis_o.Open__.Format.formatter -> unit -> unit;
}
Sourceand statuscode_info = {
  1. statuscode_tag : string;
  2. statuscode_code_expr : [ `Literal of int | `Variable of string ];
  3. statuscode_pattern : string;
  4. statuscode_is_default : bool;
  5. statuscode_json_match : statuscode_json_match option;
  6. out_headers : header_info list;
}
Sourceand statuscode_json_match = {
  1. statuscode_qualified_type : string;
  2. statuscode_serde : string;
  3. statuscode_encoder_pp : Restapis_o.Open__.Format.formatter -> unit -> unit;
}
Sourceand header_info = {
  1. header_tag : string;
  2. header_qualified_type : string;
  3. header_json_match : header_json_match option;
}
Sourceand header_json_match = {
  1. header_literal : string;
  2. header_encoder_pp : Restapis_o.Open__.Format.formatter -> unit -> unit;
  3. header_required : bool;
  4. header_explode : bool;
  5. header_serde : string;
}
Sourceval style_tag : OaTypes.param_style -> string
Sourceval show_statuscode : int -> string
Sourceval pp_result_ok_type : Restapis_o.Open__.Format.formatter -> response_info -> unit
Sourceval gather_responses : pp_rhs_any_datatype: (summary:OaSummary.t -> wrap_primitive_and_ref:OaPp.field_kind -> format:string option -> enum:Json_repr.any list option -> path:Json_query.path -> 'a -> Restapis_o.Open__.Format.formatter -> OaTypes.schema_kind -> unit) -> wrap_primitive_and_ref_with_optional:bool -> summary:OaSummary.t -> path_template:string -> (module OaDocument.STANDARD) -> (module OaDocument.VENDOR) -> 'a -> OaTypes.request_body option -> OaTypes.responses -> response_info
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.