package awsm-codegen

  1. Overview
  2. Docs
type t

The abstract representation of how to interact with a HTTP body.

val sexp_of_t : t -> Sexplib0.Sexp.t

Constructors

val create : is_blob:bool -> payload_module:string -> field_name:string -> is_required:bool -> t

Build from fields.

  • parameter is_blob

    Can this parameter be sent directly (or does it need to be converted through to_header).

  • parameter payload_module

    Where to_header and to_value functions will be found.

  • parameter field_name

    Where the payload can be found in the request record.

  • parameter is_required

    Is this payload required or optional?

val of_botodata : Botodata.operation -> shapes:(string, Botodata.shape) Core.List.Assoc.t -> t option

Build from a parsed Botodata.operation.

Code generation

val convert_rest_json : t -> service:Botodata.service -> op:Botodata.operation option -> endpoint_name:string -> Ppxlib.Parsetree.expression -> Ppxlib.Parsetree.expression

Generate the expression that will be used for rest_json protocols.

val convert_rest_xml : t -> endpoint_name:string -> Ppxlib.Parsetree.expression -> Ppxlib.Parsetree.expression

Generate the expression that will be used for rest_xml protocols.

OCaml

Innovation. Community. Security.