package openapi_router

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type contact_object = {
  1. name : string option;
  2. url : string option;
  3. email : string option;
}
val make_contact_object : ?name:string -> ?url:string -> ?email:string -> unit -> contact_object
val show_contact_object : contact_object -> Ppx_deriving_runtime.string
val contact_object_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> contact_object
val yojson_of_contact_object : contact_object -> Ppx_yojson_conv_lib.Yojson.Safe.t
type license_object = {
  1. name : string;
  2. url : string option;
}
val make_license_object : name:string -> ?url:string -> unit -> license_object
val show_license_object : license_object -> Ppx_deriving_runtime.string
val license_object_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> license_object
val yojson_of_license_object : license_object -> Ppx_yojson_conv_lib.Yojson.Safe.t
type server_variable_object = {
  1. enum : string list option;
  2. default : string;
  3. description : string option;
}
val make_server_variable_object : ?enum:string list -> default:string -> ?description:string -> unit -> server_variable_object
val show_server_variable_object : server_variable_object -> Ppx_deriving_runtime.string
val server_variable_object_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> server_variable_object
val yojson_of_server_variable_object : server_variable_object -> Ppx_yojson_conv_lib.Yojson.Safe.t
type external_documentation_object = {
  1. description : string option;
  2. url : string;
}
val make_external_documentation_object : ?description:string -> url:string -> unit -> external_documentation_object
val show_external_documentation_object : external_documentation_object -> Ppx_deriving_runtime.string
val external_documentation_object_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> external_documentation_object
val yojson_of_external_documentation_object : external_documentation_object -> Ppx_yojson_conv_lib.Yojson.Safe.t
type server_object = {
  1. url : string;
  2. description : string option;
  3. variables : (string * server_variable_object) list option;
}
val make_server_object : url:string -> ?description:string -> ?variables:(string * server_variable_object) list -> unit -> server_object
val show_server_object : server_object -> Ppx_deriving_runtime.string
val server_object_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> server_object
val yojson_of_server_object : server_object -> Ppx_yojson_conv_lib.Yojson.Safe.t
type header_object = {
  1. description : string option;
  2. required : bool option;
  3. deprecated : bool option;
  4. allow_empty_value : bool option;
}
val make_header_object : ?description:string -> ?required:bool -> ?deprecated:bool -> ?allow_empty_value:bool -> unit -> header_object
val show_header_object : header_object -> Ppx_deriving_runtime.string
val header_object_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> header_object
val yojson_of_header_object : header_object -> Ppx_yojson_conv_lib.Yojson.Safe.t
type example_object = {
  1. summary : string option;
  2. description : string option;
  3. value : Yojson.Safe.t option;
  4. externalValue : string option;
}
val make_example_object : ?summary:string -> ?description:string -> ?value:Yojson.Safe.t -> ?externalValue:string -> unit -> example_object
val show_example_object : example_object -> Ppx_deriving_runtime.string
val example_object_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> example_object
val yojson_of_example_object : example_object -> Ppx_yojson_conv_lib.Yojson.Safe.t
type media_type_object = {
  1. schema : Openapi_router__.Json_schema.schema Openapi_router__.Json_schema.or_ref option;
  2. example : Yojson.Safe.t option;
  3. examples : (string * example_object Openapi_router__.Json_schema.or_ref) list option;
  4. encoding : (string * Yojson.Safe.t) list option;
}
val make_media_type_object : ?schema: Openapi_router__.Json_schema.schema Openapi_router__.Json_schema.or_ref -> ?example:Yojson.Safe.t -> ?examples:(string * example_object Openapi_router__.Json_schema.or_ref) list -> ?encoding:(string * Yojson.Safe.t) list -> unit -> media_type_object
val show_media_type_object : media_type_object -> Ppx_deriving_runtime.string
val media_type_object_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> media_type_object
val yojson_of_media_type_object : media_type_object -> Ppx_yojson_conv_lib.Yojson.Safe.t
type response_object = {
  1. description : string;
  2. headers : (string * header_object Openapi_router__.Json_schema.or_ref) list option;
  3. content : (string * media_type_object) list option;
}
val make_response_object : description:string -> ?headers:(string * header_object Openapi_router__.Json_schema.or_ref) list -> ?content:(string * media_type_object) list -> ?links:(string * link_object Openapi_router__.Json_schema.or_ref) list -> unit -> response_object
val show_response_object : response_object -> Ppx_deriving_runtime.string
val response_object_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> response_object
val yojson_of_response_object : response_object -> Ppx_yojson_conv_lib.Yojson.Safe.t
type responses_object = (string * response_object Openapi_router__.Json_schema.or_ref) list
val show_responses_object : responses_object -> Ppx_deriving_runtime.string
val responses_object_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> responses_object
val yojson_of_responses_object : responses_object -> Ppx_yojson_conv_lib.Yojson.Safe.t
type parameter_location =
  1. | Query
  2. | Header
  3. | Path
  4. | Cookie
val show_parameter_location : parameter_location -> Ppx_deriving_runtime.string
val parameter_location_of_yojson : Yojson.Safe.t -> parameter_location
val yojson_of_parameter_location : parameter_location -> [> `String of string ]
type parameter_style =
  1. | Simple
  2. | Form
val show_parameter_style : parameter_style -> Ppx_deriving_runtime.string
val parameter_style_of_yojson : Yojson.Safe.t -> parameter_style
val yojson_of_parameter_style : parameter_style -> [> `String of string ]
type parameter_object = {
  1. name : string;
  2. in_ : parameter_location;
  3. description : string option;
  4. required : bool option;
  5. deprecated : bool option;
  6. allow_empty_value : bool option;
  7. style : parameter_style option;
  8. schema : Openapi_router__.Json_schema.schema Openapi_router__.Json_schema.or_ref option;
  9. example : Yojson.Safe.t option;
}
val make_parameter_object : name:string -> in_:parameter_location -> ?description:string -> ?required:bool -> ?deprecated:bool -> ?allow_empty_value:bool -> ?style:parameter_style -> ?schema: Openapi_router__.Json_schema.schema Openapi_router__.Json_schema.or_ref -> ?example:Yojson.Safe.t -> unit -> parameter_object
val show_parameter_object : parameter_object -> Ppx_deriving_runtime.string
val parameter_object_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> parameter_object
val yojson_of_parameter_object : parameter_object -> Ppx_yojson_conv_lib.Yojson.Safe.t
type request_body_object = {
  1. description : string option;
  2. content : (string * media_type_object) list;
  3. required : bool option;
}
val make_request_body_object : ?description:string -> content:(string * media_type_object) list -> ?required:bool -> unit -> request_body_object
val show_request_body_object : request_body_object -> Ppx_deriving_runtime.string
val request_body_object_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> request_body_object
val yojson_of_request_body_object : request_body_object -> Ppx_yojson_conv_lib.Yojson.Safe.t
type security_scheme_object = {
  1. type_ : string;
  2. description : string option;
  3. name : string option;
  4. in_ : string option;
  5. scheme : string option;
  6. bearer_format : string option;
  7. flows : Yojson.Safe.t option;
  8. openid_connect_url : string option;
}
val make_security_scheme_object : type_:string -> ?description:string -> ?name:string -> ?in_:string -> ?scheme:string -> ?bearer_format:string -> ?flows:Yojson.Safe.t -> ?openid_connect_url:string -> unit -> security_scheme_object
val show_security_scheme_object : security_scheme_object -> Ppx_deriving_runtime.string
val security_scheme_object_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> security_scheme_object
val yojson_of_security_scheme_object : security_scheme_object -> Ppx_yojson_conv_lib.Yojson.Safe.t
type callback_object = Yojson.Safe.t
val show_callback_object : callback_object -> Ppx_deriving_runtime.string
val callback_object_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> callback_object
val yojson_of_callback_object : callback_object -> Ppx_yojson_conv_lib.Yojson.Safe.t
type components_object = {
  1. schemas : (string * Openapi_router__.Json_schema.schema Openapi_router__.Json_schema.or_ref) list option;
  2. responses : (string * response_object Openapi_router__.Json_schema.or_ref) list option;
  3. parameters : (string * parameter_object Openapi_router__.Json_schema.or_ref) list option;
  4. examples : (string * example_object Openapi_router__.Json_schema.or_ref) list option;
  5. request_bodies : (string * request_body_object Openapi_router__.Json_schema.or_ref) list option;
  6. headers : (string * header_object Openapi_router__.Json_schema.or_ref) list option;
  7. security_schemes : (string * security_scheme_object Openapi_router__.Json_schema.or_ref) list option;
  8. callbacks : (string * callback_object Openapi_router__.Json_schema.or_ref) list option;
}
val make_components_object : ?schemas: (string * Openapi_router__.Json_schema.schema Openapi_router__.Json_schema.or_ref) list -> ?responses: (string * response_object Openapi_router__.Json_schema.or_ref) list -> ?parameters: (string * parameter_object Openapi_router__.Json_schema.or_ref) list -> ?examples:(string * example_object Openapi_router__.Json_schema.or_ref) list -> ?request_bodies: (string * request_body_object Openapi_router__.Json_schema.or_ref) list -> ?headers:(string * header_object Openapi_router__.Json_schema.or_ref) list -> ?security_schemes: (string * security_scheme_object Openapi_router__.Json_schema.or_ref) list -> ?links:(string * link_object Openapi_router__.Json_schema.or_ref) list -> ?callbacks: (string * callback_object Openapi_router__.Json_schema.or_ref) list -> unit -> components_object
val show_components_object : components_object -> Ppx_deriving_runtime.string
val components_object_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> components_object
val yojson_of_components_object : components_object -> Ppx_yojson_conv_lib.Yojson.Safe.t
type info_object = {
  1. title : string;
  2. description : string option;
  3. terms_of_service : string option;
  4. contact : contact_object option;
  5. license : license_object option;
  6. version : string;
}
val make_info_object : title:string -> ?description:string -> ?terms_of_service:string -> ?contact:contact_object -> ?license:license_object -> version:string -> unit -> info_object
val show_info_object : info_object -> Ppx_deriving_runtime.string
val info_object_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> info_object
val yojson_of_info_object : info_object -> Ppx_yojson_conv_lib.Yojson.Safe.t
type operation_object = {
  1. tags : string list option;
  2. summary : string option;
  3. description : string option;
  4. external_docs : external_documentation_object option;
  5. operation_id : string option;
  6. parameters : parameter_object Openapi_router__.Json_schema.or_ref list option;
  7. request_body : request_body_object Openapi_router__.Json_schema.or_ref option;
  8. responses : responses_object;
  9. callbacks : (string * callback_object Openapi_router__.Json_schema.or_ref) list option;
  10. deprecated : bool option;
  11. security : Yojson.Safe.t option;
  12. servers : server_object list option;
}
val make_operation_object : ?tags:string list -> ?summary:string -> ?description:string -> ?external_docs:external_documentation_object -> ?operation_id:string -> ?parameters:parameter_object Openapi_router__.Json_schema.or_ref list -> ?request_body:request_body_object Openapi_router__.Json_schema.or_ref -> responses:responses_object -> ?callbacks: (string * callback_object Openapi_router__.Json_schema.or_ref) list -> ?deprecated:bool -> ?security:Yojson.Safe.t -> ?servers:server_object list -> unit -> operation_object
val show_operation_object : operation_object -> Ppx_deriving_runtime.string
val operation_object_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> operation_object
val yojson_of_operation_object : operation_object -> Ppx_yojson_conv_lib.Yojson.Safe.t
type path_object = {
  1. summary : string option;
  2. description : string option;
  3. get : operation_object option;
  4. put : operation_object option;
  5. post : operation_object option;
  6. delete : operation_object option;
  7. options : operation_object option;
  8. head : operation_object option;
  9. patch : operation_object option;
  10. trace : operation_object option;
  11. servers : server_object list option;
  12. parameters : parameter_object Openapi_router__.Json_schema.or_ref list option;
}
val make_path_object : ?summary:string -> ?description:string -> ?get:operation_object -> ?put:operation_object -> ?post:operation_object -> ?delete:operation_object -> ?options:operation_object -> ?head:operation_object -> ?patch:operation_object -> ?trace:operation_object -> ?servers:server_object list -> ?parameters:parameter_object Openapi_router__.Json_schema.or_ref list -> unit -> path_object
val show_path_object : path_object -> Ppx_deriving_runtime.string
val path_object_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> path_object
val yojson_of_path_object : path_object -> Ppx_yojson_conv_lib.Yojson.Safe.t
type paths_object = (string * path_object) list
val paths_object_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> paths_object
val yojson_of_paths_object : paths_object -> Ppx_yojson_conv_lib.Yojson.Safe.t
val show_paths_object : paths_object -> Ppx_deriving_runtime.string
type tag_object = {
  1. name : string;
  2. description : string option;
  3. external_docs : external_documentation_object option;
}
val make_tag_object : name:string -> ?description:string -> ?external_docs:external_documentation_object -> unit -> tag_object
val show_tag_object : tag_object -> Ppx_deriving_runtime.string
val tag_object_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> tag_object
val yojson_of_tag_object : tag_object -> Ppx_yojson_conv_lib.Yojson.Safe.t
type t = {
  1. openapi : string;
  2. info : info_object;
  3. servers : server_object list option;
  4. paths : paths_object;
  5. components : components_object option;
  6. security : Yojson.Safe.t option;
  7. tags : tag_object list option;
  8. external_docs : external_documentation_object option;
}
val make : openapi:string -> info:info_object -> ?servers:server_object list -> paths:paths_object -> ?components:components_object -> ?security:Yojson.Safe.t -> ?tags:tag_object list -> ?external_docs:external_documentation_object -> unit -> t
OCaml

Innovation. Community. Security.