File tree Expand file tree Collapse file tree 9 files changed +10
-10
lines changed
modules/openapi-generator/src/main/resources/ocaml
samples/client/petstore/ocaml/src Expand file tree Collapse file tree 9 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ type {{name}} = [
1313| { {{camlEnumValueName} }} [@printer fun fmt _ -> Format.pp_print_string fmt "{ {{name} }}"] [@name "{ {{name} }}"]
1414{ {/values} }
1515{ {/allowableValues} }
16- ] [@@deriving yojson, show { with_path = false } ];;
16+ ] [@@deriving yojson, show { with_path = false } , eq ];;
1717
1818let { {name} }_of_yojson json = { {name} }_of_yojson (`List [json])
1919let { {name} }_to_yojson e =
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ type t = {
4343 ; [@key "{ {{baseName} }}"]
4444 { {/isEnum} }
4545{ {/vars} }
46- } [@@deriving yojson { strict = false } , show ];;
46+ } [@@deriving yojson { strict = false } , show, eq ];;
4747
4848{ {#description} }
4949(** { {{.} }} *)
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ type t = {
2222 option [@ default None ]
2323
2424 ; [@ key " message" ]
25- } [@@ deriving yojson { strict = false }, show ];;
25+ } [@@ deriving yojson { strict = false }, show , eq ];;
2626
2727(* * Describes the result of uploading an image resource *)
2828let create () : t = {
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ type t = {
1717 option [@ default None ]
1818
1919 ; [@ key " name" ]
20- } [@@ deriving yojson { strict = false }, show ];;
20+ } [@@ deriving yojson { strict = false }, show , eq ];;
2121
2222(* * A category for a pet *)
2323let create () : t = {
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ type t = {
3939 option [@ default None ]
4040
4141 ; [@ key " complete" ]
42- } [@@ deriving yojson { strict = false }, show ];;
42+ } [@@ deriving yojson { strict = false }, show , eq ];;
4343
4444(* * An order for a pets from the pet store *)
4545let create () : t = {
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ type t = {
3535 None
3636 ]
3737 ; [@ key " status" ]
38- } [@@ deriving yojson { strict = false }, show ];;
38+ } [@@ deriving yojson { strict = false }, show , eq ];;
3939
4040(* * A pet for sale in the pet store *)
4141let create (name : string ) (photo_urls : string list ) : t = {
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ type t = {
1717 option [@ default None ]
1818
1919 ; [@ key " name" ]
20- } [@@ deriving yojson { strict = false }, show ];;
20+ } [@@ deriving yojson { strict = false }, show , eq ];;
2121
2222(* * A tag for a pet *)
2323let create () : t = {
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ type t = {
4848 option [@ default None ]
4949
5050 ; [@ key " userStatus" ]
51- } [@@ deriving yojson { strict = false }, show ];;
51+ } [@@ deriving yojson { strict = false }, show , eq ];;
5252
5353(* * A User who is purchasing from the pet store *)
5454let create () : t = {
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ type status = [
99| `Placed [@ printer fun fmt _ -> Format. pp_print_string fmt " placed" ] [@ name " placed" ]
1010| `Approved [@ printer fun fmt _ -> Format. pp_print_string fmt " approved" ] [@ name " approved" ]
1111| `Delivered [@ printer fun fmt _ -> Format. pp_print_string fmt " delivered" ] [@ name " delivered" ]
12- ] [@@ deriving yojson, show { with_path = false }];;
12+ ] [@@ deriving yojson, show { with_path = false }, eq ];;
1313
1414let status_of_yojson json = status_of_yojson (`List [json])
1515let status_to_yojson e =
@@ -21,7 +21,7 @@ type pet_status = [
2121| `Available [@ printer fun fmt _ -> Format. pp_print_string fmt " available" ] [@ name " available" ]
2222| `Pending [@ printer fun fmt _ -> Format. pp_print_string fmt " pending" ] [@ name " pending" ]
2323| `Sold [@ printer fun fmt _ -> Format. pp_print_string fmt " sold" ] [@ name " sold" ]
24- ] [@@ deriving yojson, show { with_path = false }];;
24+ ] [@@ deriving yojson, show { with_path = false }, eq ];;
2525
2626let pet_status_of_yojson json = pet_status_of_yojson (`List [json])
2727let pet_status_to_yojson e =
You can’t perform that action at this time.
0 commit comments