val create_state :
file_arity:[ `OneFile | `ManyFiles of string ] ->
OaSummary.t ->
OaSummary.datatype list ->
extended OaState.tval standard : (module OaDocument.STANDARD)val vendor : (module OaDocument.VENDOR)The query_selector says which schema objects should be evaluated.
`Parameters is the optional schema field of the Parameters Objects.
val resolve_casename : path:Json_query.path -> stringWhen using OaSummary.datatypes ~query_selector:`FlattenedAll flattened data types, the generated Id_ref will be split into optional and non-optional parts. And all compound data types will go through pp_rec_eqn since all the compound data types are lifted to the top-level (the recursive equations).
However Schema_ref and primitive types will still need to be aware of optional fields. Setting this to true will add pp_option to Schema_ref and primitive types fields when the field is optional.
val pp_envelope_all :
'b OaState.t ->
VBoxer.t ->
'a list ->
(Restapis_o.Open__.Format.formatter -> 'a -> unit) ->
unitpp_envelope_all state vboxer vs fmt_item prints the values vs on the vertical boxer fmt_item using the item formatter fmt_item.
pp_state_init ppf state prints the state which may include the data types at the beginning of the pp_envelope_all envelope.
pp_state_fini ppf state prints the state which may include the data types at the end of the pp_envelope_all envelope.
val pp_rec_eqn :
extended OaState.t ->
(Restapis_o.Open__.Format.formatter -> 'a -> unit) ->
Restapis_o.Open__.Format.formatter ->
(string * 'a) ->
unitpp_rec_eqn pp_kind ppf (alias, kind) prints the schema for a recursive equation.
val pp_trace_path :
Restapis_o.Open__.Format.formatter ->
Json_query.path ->
unitpp_name_root ppf root is a pretty-printer on the formatter ppf that writes the name of the root (ie. top-level) items.
pp_name_field ppf root is a pretty-printer on the formatter ppf that writes the name of a field.
val pp_nonrec_field_defines :
(Restapis_o.Open__.Format.formatter -> 'a -> unit) ->
(Restapis_o.Open__.Format.formatter -> 'b -> unit) ->
(Restapis_o.Open__.Format.formatter -> 'c -> unit) ->
Restapis_o.Open__.Format.formatter ->
('a list * 'b list * 'c list) ->
unitpp_nonrec_field_defines pp_left pp_right pp_doc ppf (lefts, rights, doc).
pp_doc is the documentation printer. No documentation will be printed by pp_doc if include_doc is false, and no documentation will be printed if the field does not have documentation.
Padding will already be provided by pp_doc based on doc_field_padding.
All of that is to say: always call pp_doc your_formatter doc if any of your fields should have documentation. Or never call pp_doc if none of your fields should have documentation.
val pp_primitive :
datatype_ref:[ `PrimitiveType of string | `TypeAlias of string ] ->
format:string option ->
enum:Json_repr.any list option ->
OaTypes.schema_kind ->
(Restapis_o.Open__.Format.formatter -> unit -> unit) optionpp_primitive creates a Some printer when the data type is primitive (as determined by the PRINTER) and None when the data type is a reference or compound data type.
OaPp must give back a Some printer when datatype_ref = `PrimitiveType _.
OaPp may give back a Some printer in any situation. For example, many PRINTERs may choose to define a primitive type when it sees an object with no properties (ie. kind = Object {properties=[]; additional_properties=None}).
OaPp should give back a None when the data type is a reference data type (ie. kind = Id_ref _ or kind = Schema_ref _). The caller of pp_primitive (typically OaPp) should ignore the result when the data type is a reference data type.
val pp_enumeration :
sumpath:Json_query.path ->
sumtype_nonopt:[ `PrimitiveType of string | `TypeAlias of string ] ->
caseize:(string -> string) ->
casepath:(int -> Json_query.path) ->
[< `Boolean | `Integer | `String ] ->
Restapis_o.Open__.Format.formatter ->
Json_repr.any list ->
unitval pp_string :
format:string option ->
enum:Json_repr.any list option ->
Json_schema.string_specs ->
Restapis_o.Open__.Format.formatter ->
unit ->
unitval pp_integer :
format:string option ->
enum:Json_repr.any list option ->
Json_schema.numeric_specs ->
Restapis_o.Open__.Format.formatter ->
unit ->
unitval pp_number :
format:string option ->
Json_schema.numeric_specs ->
Restapis_o.Open__.Format.formatter ->
unit ->
unitval pp_boolean :
format:string option ->
enum:Json_repr.any list option ->
Restapis_o.Open__.Format.formatter ->
unit ->
unitval pp_union :
casename:(path:Json_query.path -> string) ->
sumtype_nonopt:[< `PrimitiveType of string | `TypeAlias of string ] ->
(Restapis_o.Open__.Format.formatter -> (int * OaTypes.schema) -> unit) ->
Restapis_o.Open__.Format.formatter ->
OaTypes.schema list ->
unitval pp_array :
format:string option ->
OaTypes.array_specs ->
(Restapis_o.Open__.Format.formatter -> 'a -> unit) ->
Restapis_o.Open__.Format.formatter ->
'a ->
unitval pp_to_modelobject :
datatype_ref:[< `PrimitiveType of 'a | `TypeAlias of string ] ->
Restapis_o.Open__.Format.formatter ->
OaTypes.object_props list ->
unitval pp_from_modelobject :
Restapis_o.Open__.Format.formatter ->
OaTypes.object_props list ->
unitval pp_reference :
extended OaState.t ->
Restapis_o.Open__.Format.formatter ->
Json_query.path ->
unit
