package openapi
Module Openapi.SpecSource
Source
val make_contact_object :
?name:string ->
?url:string ->
?email:string ->
unit ->
contact_objectSource
val pp_contact_object :
Ppx_deriving_runtime.Format.formatter ->
contact_object ->
Ppx_deriving_runtime.unitSource
val pp_license_object :
Ppx_deriving_runtime.Format.formatter ->
license_object ->
Ppx_deriving_runtime.unitSource
val make_server_variable_object :
?enum:string list ->
default:string ->
?description:string ->
unit ->
server_variable_objectSource
val pp_server_variable_object :
Ppx_deriving_runtime.Format.formatter ->
server_variable_object ->
Ppx_deriving_runtime.unitSource
val server_variable_object_of_yojson :
Ppx_yojson_conv_lib.Yojson.Safe.t ->
server_variable_objectSource
val yojson_of_server_variable_object :
server_variable_object ->
Ppx_yojson_conv_lib.Yojson.Safe.tSource
val make_external_documentation_object :
?description:string ->
url:string ->
unit ->
external_documentation_objectSource
val pp_external_documentation_object :
Ppx_deriving_runtime.Format.formatter ->
external_documentation_object ->
Ppx_deriving_runtime.unitSource
val show_external_documentation_object :
external_documentation_object ->
Ppx_deriving_runtime.stringSource
val external_documentation_object_of_yojson :
Ppx_yojson_conv_lib.Yojson.Safe.t ->
external_documentation_objectSource
val yojson_of_external_documentation_object :
external_documentation_object ->
Ppx_yojson_conv_lib.Yojson.Safe.tSource
type server_object = {url : string;description : string option;variables : server_variable_object Json_schema.map option;
}Source
val make_server_object :
url:string ->
?description:string ->
?variables:server_variable_object Json_schema.map ->
unit ->
server_objectSource
val pp_server_object :
Ppx_deriving_runtime.Format.formatter ->
server_object ->
Ppx_deriving_runtime.unitSource
type link_object = {operation_ref : string option;operation_id : string option;parameters : Json_schema.any Json_schema.map option;request_body : Json_schema.any option;description : string option;server : server_object option;
}Source
val make_link_object :
?operation_ref:string ->
?operation_id:string ->
?parameters:Json_schema.any Json_schema.map ->
?request_body:Json_schema.any ->
?description:string ->
?server:server_object ->
unit ->
link_objectSource
val pp_link_object :
Ppx_deriving_runtime.Format.formatter ->
link_object ->
Ppx_deriving_runtime.unitSource
type header_object = {description : string option;required : bool option;deprecated : bool option;allow_empty_value : bool option;
}Source
val make_header_object :
?description:string ->
?required:bool ->
?deprecated:bool ->
?allow_empty_value:bool ->
unit ->
header_objectSource
val pp_header_object :
Ppx_deriving_runtime.Format.formatter ->
header_object ->
Ppx_deriving_runtime.unitSource
type example_object = {summary : string option;description : string option;value : Json_schema.any option;externalValue : string option;
}Source
val make_example_object :
?summary:string ->
?description:string ->
?value:Json_schema.any ->
?externalValue:string ->
unit ->
example_objectSource
val pp_example_object :
Ppx_deriving_runtime.Format.formatter ->
example_object ->
Ppx_deriving_runtime.unitSource
type media_type_object = {schema : Json_schema.schema Json_schema.or_ref option;example : Json_schema.any option;examples : example_object Json_schema.or_ref Json_schema.map option;encoding : Json_schema.any Json_schema.map option;
}Source
val make_media_type_object :
?schema:Json_schema.schema Json_schema.or_ref ->
?example:Json_schema.any ->
?examples:example_object Json_schema.or_ref Json_schema.map ->
?encoding:Json_schema.any Json_schema.map ->
unit ->
media_type_objectSource
val pp_media_type_object :
Ppx_deriving_runtime.Format.formatter ->
media_type_object ->
Ppx_deriving_runtime.unitSource
type response_object = {description : string;headers : header_object Json_schema.or_ref Json_schema.map option;content : media_type_object Json_schema.map option;links : link_object Json_schema.or_ref Json_schema.map option;
}Source
val make_response_object :
description:string ->
?headers:header_object Json_schema.or_ref Json_schema.map ->
?content:media_type_object Json_schema.map ->
?links:link_object Json_schema.or_ref Json_schema.map ->
unit ->
response_objectSource
val pp_response_object :
Ppx_deriving_runtime.Format.formatter ->
response_object ->
Ppx_deriving_runtime.unitSource
val pp_responses_object :
Ppx_deriving_runtime.Format.formatter ->
responses_object ->
Ppx_deriving_runtime.unitSource
val pp_parameter_location :
Ppx_deriving_runtime.Format.formatter ->
parameter_location ->
Ppx_deriving_runtime.unitSource
val pp_parameter_style :
Ppx_deriving_runtime.Format.formatter ->
parameter_style ->
Ppx_deriving_runtime.unitSource
type parameter_object = {name : string;in_ : parameter_location;description : string option;required : bool option;deprecated : bool option;allow_empty_value : bool option;style : parameter_style option;schema : Json_schema.schema Json_schema.or_ref option;example : Json_schema.any option;
}Source
val make_parameter_object :
name:string ->
in_:parameter_location ->
?description:string ->
?required:bool ->
?deprecated:bool ->
?allow_empty_value:bool ->
?style:parameter_style ->
?schema:Json_schema.schema Json_schema.or_ref ->
?example:Json_schema.any ->
unit ->
parameter_objectSource
val pp_parameter_object :
Ppx_deriving_runtime.Format.formatter ->
parameter_object ->
Ppx_deriving_runtime.unitSource
type request_body_object = {description : string option;content : media_type_object Json_schema.map;required : bool option;
}Source
val make_request_body_object :
?description:string ->
content:media_type_object Json_schema.map ->
?required:bool ->
unit ->
request_body_objectSource
val pp_request_body_object :
Ppx_deriving_runtime.Format.formatter ->
request_body_object ->
Ppx_deriving_runtime.unitSource
type security_scheme_object = {type_ : string;description : string option;name : string option;in_ : string option;scheme : string option;bearer_format : string option;flows : Json_schema.any option;openid_connect_url : string option;
}Source
val make_security_scheme_object :
type_:string ->
?description:string ->
?name:string ->
?in_:string ->
?scheme:string ->
?bearer_format:string ->
?flows:Json_schema.any ->
?openid_connect_url:string ->
unit ->
security_scheme_objectSource
val pp_security_scheme_object :
Ppx_deriving_runtime.Format.formatter ->
security_scheme_object ->
Ppx_deriving_runtime.unitSource
val security_scheme_object_of_yojson :
Ppx_yojson_conv_lib.Yojson.Safe.t ->
security_scheme_objectSource
val yojson_of_security_scheme_object :
security_scheme_object ->
Ppx_yojson_conv_lib.Yojson.Safe.tSource
val pp_callback_object :
Ppx_deriving_runtime.Format.formatter ->
callback_object ->
Ppx_deriving_runtime.unitSource
type components_object = {schemas : Json_schema.schema Json_schema.or_ref Json_schema.map option;responses : response_object Json_schema.or_ref Json_schema.map option;parameters : parameter_object Json_schema.or_ref Json_schema.map option;examples : example_object Json_schema.or_ref Json_schema.map option;request_bodies : request_body_object Json_schema.or_ref Json_schema.map option;headers : header_object Json_schema.or_ref Json_schema.map option;security_schemes : security_scheme_object Json_schema.or_ref Json_schema.map option;links : link_object Json_schema.or_ref Json_schema.map option;callbacks : callback_object Json_schema.or_ref Json_schema.map option;
}Source
val make_components_object :
?schemas:Json_schema.schema Json_schema.or_ref Json_schema.map ->
?responses:response_object Json_schema.or_ref Json_schema.map ->
?parameters:parameter_object Json_schema.or_ref Json_schema.map ->
?examples:example_object Json_schema.or_ref Json_schema.map ->
?request_bodies:request_body_object Json_schema.or_ref Json_schema.map ->
?headers:header_object Json_schema.or_ref Json_schema.map ->
?security_schemes:security_scheme_object Json_schema.or_ref Json_schema.map ->
?links:link_object Json_schema.or_ref Json_schema.map ->
?callbacks:callback_object Json_schema.or_ref Json_schema.map ->
unit ->
components_objectSource
val pp_components_object :
Ppx_deriving_runtime.Format.formatter ->
components_object ->
Ppx_deriving_runtime.unitSource
type info_object = {title : string;description : string option;terms_of_service : string option;contact : contact_object option;license : license_object option;version : string;
}Source
val make_info_object :
title:string ->
?description:string ->
?terms_of_service:string ->
?contact:contact_object ->
?license:license_object ->
version:string ->
unit ->
info_objectSource
val pp_info_object :
Ppx_deriving_runtime.Format.formatter ->
info_object ->
Ppx_deriving_runtime.unitSource
type operation_object = {summary : string option;description : string option;external_docs : external_documentation_object option;operation_id : string option;parameters : parameter_object Json_schema.or_ref list option;request_body : request_body_object Json_schema.or_ref option;responses : responses_object;callbacks : callback_object Json_schema.or_ref Json_schema.map option;deprecated : bool option;security : Json_schema.any option;servers : server_object list option;
}Source
val make_operation_object :
?tags:string list ->
?summary:string ->
?description:string ->
?external_docs:external_documentation_object ->
?operation_id:string ->
?parameters:parameter_object Json_schema.or_ref list ->
?request_body:request_body_object Json_schema.or_ref ->
responses:responses_object ->
?callbacks:callback_object Json_schema.or_ref Json_schema.map ->
?deprecated:bool ->
?security:Json_schema.any ->
?servers:server_object list ->
unit ->
operation_objectSource
val pp_operation_object :
Ppx_deriving_runtime.Format.formatter ->
operation_object ->
Ppx_deriving_runtime.unitSource
type path_object = {summary : string option;description : string option;get : operation_object option;put : operation_object option;post : operation_object option;delete : operation_object option;options : operation_object option;head : operation_object option;patch : operation_object option;trace : operation_object option;servers : server_object list option;parameters : parameter_object Json_schema.or_ref list option;
}Source
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 Json_schema.or_ref list ->
unit ->
path_objectSource
val pp_path_object :
Ppx_deriving_runtime.Format.formatter ->
path_object ->
Ppx_deriving_runtime.unitSource
val pp_paths_object :
Ppx_deriving_runtime.Format.formatter ->
paths_object ->
Ppx_deriving_runtime.unitSource
type tag_object = {name : string;description : string option;external_docs : external_documentation_object option;
}Source
val make_tag_object :
name:string ->
?description:string ->
?external_docs:external_documentation_object ->
unit ->
tag_objectSource
val pp_tag_object :
Ppx_deriving_runtime.Format.formatter ->
tag_object ->
Ppx_deriving_runtime.unitSource
type t = {openapi : string;info : info_object;servers : server_object list option;paths : paths_object;components : components_object option;security : Json_schema.any option;external_docs : external_documentation_object option;
}Source
val make :
openapi:string ->
info:info_object ->
?servers:server_object list ->
paths:paths_object ->
?components:components_object ->
?security:Json_schema.any ->
?tags:tag_object list ->
?external_docs:external_documentation_object ->
unit ->
t