File tree 10 files changed +31
-30
lines changed
modules/openapi-generator/src/main/resources/ocaml
samples/client/petstore/ocaml
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 = {
16
16
(* { {{.} }} *)
17
17
{ {/description} }
18
18
{ {#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 } }}"]
20
20
{ {/isEnum} }
21
21
{ {^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 } }}"]
23
23
{ {/isEnum} }
24
24
{ {/vars} }
25
25
} [@@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:/
5
5
6
6
- API version: 1.0.0
7
7
- Package version: 1.0.0
8
+ - Generator version: 7.13.0-SNAPSHOT
8
9
- Build package: org.openapitools.codegen.languages.OCamlClientCodegen
9
10
10
11
## Requirements.
Original file line number Diff line number Diff line change 7
7
*)
8
8
9
9
type 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 " ]
13
13
} [@@ deriving yojson { strict = false }, show ];;
14
14
15
15
(* * Describes the result of uploading an image resource *)
Original file line number Diff line number Diff line change 7
7
*)
8
8
9
9
type 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 " ]
12
12
} [@@ deriving yojson { strict = false }, show ];;
13
13
14
14
(* * A category for a pet *)
Original file line number Diff line number Diff line change 7
7
*)
8
8
9
9
type 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 " ]
14
14
(* 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 " ]
17
17
} [@@ deriving yojson { strict = false }, show ];;
18
18
19
19
(* * An order for a pets from the pet store *)
Original file line number Diff line number Diff line change 7
7
*)
8
8
9
9
type 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 " ]
15
15
(* pet status in the store *)
16
- status : Enums .pet_status option [@ default None ];
16
+ status : Enums .pet_status option [@ default None ]; [ @ key " status " ]
17
17
} [@@ deriving yojson { strict = false }, show ];;
18
18
19
19
(* * A pet for sale in the pet store *)
Original file line number Diff line number Diff line change 7
7
*)
8
8
9
9
type 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 " ]
12
12
} [@@ deriving yojson { strict = false }, show ];;
13
13
14
14
(* * A tag for a pet *)
Original file line number Diff line number Diff line change 7
7
*)
8
8
9
9
type 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 " ]
17
17
(* User Status *)
18
- user_status : int32 option [@ default None ];
18
+ user_status : int32 option [@ default None ]; [ @ key " userStatus " ]
19
19
} [@@ deriving yojson { strict = false }, show ];;
20
20
21
21
(* * A User who is purchasing from the pet store *)
You can’t perform that action at this time.
0 commit comments