File tree Expand file tree Collapse file tree 10 files changed +31
-30
lines changed
modules/openapi-generator/src/main/resources/ocaml
samples/client/petstore/ocaml Expand file tree Collapse file tree 10 files changed +31
-30
lines changed File renamed without changes.
Original file line number Diff line number Diff line change @@ -16,10 +16,10 @@ type t = {
1616 (* { {{.} }} *)
1717 { {/description} }
1818 { {#isEnum} }
19- { {{name} }}: { {^isMap} }Enums.{ {/isMap} }{ {{datatypeWithEnum} }}{ {^isContainer} }{ {#required} }{ {#defaultValue} }[@default { {{.} }}]{ {/defaultValue} }{ {/required} }{ {/isContainer} }{ {^isContainer} }{ {#required} }{ {#isNullable} } option [@default { {#defaultValue} }Some({ {{.} }}){ {/defaultValue} }{ {^defaultValue} }None{ {/defaultValue} }]{ {/isNullable} }{ {/required} }{ {/isContainer} }{ {^isContainer} }{ {^required} } option [@default { {#defaultValue} }Some({ {{.} }}){ {/defaultValue} }{ {^defaultValue} }None{ {/defaultValue} }]{ {/required} }{ {/isContainer} };
19+ { {{name} }}: { {^isMap} }Enums.{ {/isMap} }{ {{datatypeWithEnum} }}{ {^isContainer} }{ {#required} }{ {#defaultValue} }[@default { {{.} }}]{ {/defaultValue} }{ {/required} }{ {/isContainer} }{ {^isContainer} }{ {#required} }{ {#isNullable} } option [@default { {#defaultValue} }Some({ {{.} }}){ {/defaultValue} }{ {^defaultValue} }None{ {/defaultValue} }]{ {/isNullable} }{ {/required} }{ {/isContainer} }{ {^isContainer} }{ {^required} } option [@default { {#defaultValue} }Some({ {{.} }}){ {/defaultValue} }{ {^defaultValue} }None{ {/defaultValue} }]{ {/required} }{ {/isContainer} }; [@key " { {{baseName } }}"]
2020 { {/isEnum} }
2121 { {^isEnum} }
22- { {{name} }}: { {{datatypeWithEnum} }}{ {^isContainer} }{ {#required} }{ {#isNullable} } option{ {/isNullable} }{ {/required} }{ {/isContainer} }{ {^isContainer} }{ {^required} } option [@default None]{ {/required} }{ {/isContainer} };
22+ { {{name} }}: { {{datatypeWithEnum} }}{ {^isContainer} }{ {#required} }{ {#isNullable} } option{ {/isNullable} }{ {/required} }{ {/isContainer} }{ {^isContainer} }{ {^required} } option [@default None]{ {/required} }{ {/isContainer} }; [@key " { {{baseName } }}"]
2323 { {/isEnum} }
2424{ {/vars} }
2525} [@@deriving yojson { strict = false } , show ];;
Original file line number Diff line number Diff line change 1- 6.0.1 -SNAPSHOT
1+ 7.13.0 -SNAPSHOT
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ This OCaml package is automatically generated by the [OpenAPI Generator](https:/
55
66- API version: 1.0.0
77- Package version: 1.0.0
8+ - Generator version: 7.13.0-SNAPSHOT
89- Build package: org.openapitools.codegen.languages.OCamlClientCodegen
910
1011## Requirements.
Original file line number Diff line number Diff line change 77 *)
88
99type t = {
10- code : int32 option [@ default None ];
11- _type : string option [@ default None ];
12- message : string option [@ default None ];
10+ code : int32 option [@ default None ]; [ @ key " code " ]
11+ _type : string option [@ default None ]; [ @ key " type " ]
12+ message : string option [@ default None ]; [ @ key " message " ]
1313} [@@ deriving yojson { strict = false }, show ];;
1414
1515(* * Describes the result of uploading an image resource *)
Original file line number Diff line number Diff line change 77 *)
88
99type t = {
10- id : int64 option [@ default None ];
11- name : string option [@ default None ];
10+ id : int64 option [@ default None ]; [ @ key " id " ]
11+ name : string option [@ default None ]; [ @ key " name " ]
1212} [@@ deriving yojson { strict = false }, show ];;
1313
1414(* * A category for a pet *)
Original file line number Diff line number Diff line change 77 *)
88
99type t = {
10- id : int64 option [@ default None ];
11- pet_id : int64 option [@ default None ];
12- quantity : int32 option [@ default None ];
13- ship_date : string option [@ default None ];
10+ id : int64 option [@ default None ]; [ @ key " id " ]
11+ pet_id : int64 option [@ default None ]; [ @ key " petId " ]
12+ quantity : int32 option [@ default None ]; [ @ key " quantity " ]
13+ ship_date : string option [@ default None ]; [ @ key " shipDate " ]
1414 (* Order Status *)
15- status : Enums .status option [@ default None ];
16- complete : bool option [@ default None ];
15+ status : Enums .status option [@ default None ]; [ @ key " status " ]
16+ complete : bool option [@ default None ]; [ @ key " complete " ]
1717} [@@ deriving yojson { strict = false }, show ];;
1818
1919(* * An order for a pets from the pet store *)
Original file line number Diff line number Diff line change 77 *)
88
99type t = {
10- id : int64 option [@ default None ];
11- category : Category .t option [@ default None ];
12- name : string ;
13- photo_urls : string list ;
14- tags : Tag .t list ;
10+ id : int64 option [@ default None ]; [ @ key " id " ]
11+ category : Category .t option [@ default None ]; [ @ key " category " ]
12+ name : string ; [ @ key " name " ]
13+ photo_urls : string list ; [ @ key " photoUrls " ]
14+ tags : Tag .t list ; [ @ key " tags " ]
1515 (* pet status in the store *)
16- status : Enums .pet_status option [@ default None ];
16+ status : Enums .pet_status option [@ default None ]; [ @ key " status " ]
1717} [@@ deriving yojson { strict = false }, show ];;
1818
1919(* * A pet for sale in the pet store *)
Original file line number Diff line number Diff line change 77 *)
88
99type t = {
10- id : int64 option [@ default None ];
11- name : string option [@ default None ];
10+ id : int64 option [@ default None ]; [ @ key " id " ]
11+ name : string option [@ default None ]; [ @ key " name " ]
1212} [@@ deriving yojson { strict = false }, show ];;
1313
1414(* * A tag for a pet *)
Original file line number Diff line number Diff line change 77 *)
88
99type t = {
10- id : int64 option [@ default None ];
11- username : string option [@ default None ];
12- first_name : string option [@ default None ];
13- last_name : string option [@ default None ];
14- email : string option [@ default None ];
15- password : string option [@ default None ];
16- phone : string option [@ default None ];
10+ id : int64 option [@ default None ]; [ @ key " id " ]
11+ username : string option [@ default None ]; [ @ key " username " ]
12+ first_name : string option [@ default None ]; [ @ key " firstName " ]
13+ last_name : string option [@ default None ]; [ @ key " lastName " ]
14+ email : string option [@ default None ]; [ @ key " email " ]
15+ password : string option [@ default None ]; [ @ key " password " ]
16+ phone : string option [@ default None ]; [ @ key " phone " ]
1717 (* User Status *)
18- user_status : int32 option [@ default None ];
18+ user_status : int32 option [@ default None ]; [ @ key " userStatus " ]
1919} [@@ deriving yojson { strict = false }, show ];;
2020
2121(* * A User who is purchasing from the pet store *)
You can’t perform that action at this time.
0 commit comments