Skip to content

Commit f5eaf8f

Browse files
committed
Re-generate all OCaml samples
1 parent f42ba61 commit f5eaf8f

51 files changed

Lines changed: 1341 additions & 1142 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

samples/client/petstore/ocaml-fake-petstore/src/models/additional_properties_class.ml

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,21 @@
55
*
66
*)
77

8-
type t = {
9-
map_property: (string * string) list
10-
11-
; [@key "map_property"]
12-
map_of_map_property: (string * (string * string) list) list
13-
14-
; [@key "map_of_map_property"]
15-
} [@@deriving yojson { strict = false }, show, eq ];;
168

17-
let create () : t = {
18-
map_property = [];
19-
map_of_map_property = [];
20-
}
9+
10+
11+
type t = {
12+
map_property: (string * string) list
13+
14+
; [@key "map_property"]
15+
map_of_map_property: (string * (string * string) list) list
16+
17+
; [@key "map_of_map_property"]
18+
} [@@deriving yojson { strict = false }, show, eq ];;
19+
20+
let create () : t = {
21+
map_property = [];
22+
map_of_map_property = [];
23+
}
24+
2125

samples/client/petstore/ocaml-fake-petstore/src/models/all_of_with_single_ref.ml

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,25 @@
55
*
66
*)
77

8-
type t = {
9-
username: string
10-
11-
option [@default None]
12-
13-
; [@key "username"]
14-
single_ref_type: Enums.singlereftype
15-
16-
option [@default None]
17-
18-
; [@key "SingleRefType"]
19-
} [@@deriving yojson { strict = false }, show, eq ];;
208

21-
let create () : t = {
22-
username = None;
23-
single_ref_type = None;
24-
}
9+
10+
11+
type t = {
12+
username: string
13+
14+
option [@default None]
15+
16+
; [@key "username"]
17+
single_ref_type: Enums.singlereftype
18+
19+
option [@default None]
20+
21+
; [@key "SingleRefType"]
22+
} [@@deriving yojson { strict = false }, show, eq ];;
23+
24+
let create () : t = {
25+
username = None;
26+
single_ref_type = None;
27+
}
28+
2529

samples/client/petstore/ocaml-fake-petstore/src/models/animal.ml

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,25 @@
55
*
66
*)
77

8-
type t = {
9-
class_name: string
10-
11-
12-
13-
; [@key "className"]
14-
color: string
15-
16-
option [@default None]
17-
18-
; [@key "color"]
19-
} [@@deriving yojson { strict = false }, show, eq ];;
208

21-
let create (class_name : string) : t = {
22-
class_name = class_name;
23-
color = None;
24-
}
9+
10+
11+
type t = {
12+
class_name: string
13+
14+
15+
16+
; [@key "className"]
17+
color: string
18+
19+
option [@default None]
20+
21+
; [@key "color"]
22+
} [@@deriving yojson { strict = false }, show, eq ];;
23+
24+
let create (class_name : string) : t = {
25+
class_name = class_name;
26+
color = None;
27+
}
28+
2529

samples/client/petstore/ocaml-fake-petstore/src/models/api_response.ml

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,31 @@
55
*
66
*)
77

8-
type t = {
9-
code: int32
10-
11-
option [@default None]
12-
13-
; [@key "code"]
14-
_type: string
15-
16-
option [@default None]
17-
18-
; [@key "type"]
19-
message: string
20-
21-
option [@default None]
22-
23-
; [@key "message"]
24-
} [@@deriving yojson { strict = false }, show, eq ];;
258

26-
let create () : t = {
27-
code = None;
28-
_type = None;
29-
message = None;
30-
}
9+
10+
11+
type t = {
12+
code: int32
13+
14+
option [@default None]
15+
16+
; [@key "code"]
17+
_type: string
18+
19+
option [@default None]
20+
21+
; [@key "type"]
22+
message: string
23+
24+
option [@default None]
25+
26+
; [@key "message"]
27+
} [@@deriving yojson { strict = false }, show, eq ];;
28+
29+
let create () : t = {
30+
code = None;
31+
_type = None;
32+
message = None;
33+
}
34+
3135

samples/client/petstore/ocaml-fake-petstore/src/models/array_of_array_of_number_only.ml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,17 @@
55
*
66
*)
77

8-
type t = {
9-
array_array_number: float list list
10-
[@default []]
11-
; [@key "ArrayArrayNumber"]
12-
} [@@deriving yojson { strict = false }, show, eq ];;
138

14-
let create () : t = {
15-
array_array_number = [];
16-
}
9+
10+
11+
type t = {
12+
array_array_number: float list list
13+
[@default []]
14+
; [@key "ArrayArrayNumber"]
15+
} [@@deriving yojson { strict = false }, show, eq ];;
16+
17+
let create () : t = {
18+
array_array_number = [];
19+
}
20+
1721

samples/client/petstore/ocaml-fake-petstore/src/models/array_of_number_only.ml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,17 @@
55
*
66
*)
77

8-
type t = {
9-
array_number: float list
10-
[@default []]
11-
; [@key "ArrayNumber"]
12-
} [@@deriving yojson { strict = false }, show, eq ];;
138

14-
let create () : t = {
15-
array_number = [];
16-
}
9+
10+
11+
type t = {
12+
array_number: float list
13+
[@default []]
14+
; [@key "ArrayNumber"]
15+
} [@@deriving yojson { strict = false }, show, eq ];;
16+
17+
let create () : t = {
18+
array_number = [];
19+
}
20+
1721

samples/client/petstore/ocaml-fake-petstore/src/models/array_test.ml

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,25 @@
55
*
66
*)
77

8-
type t = {
9-
array_of_string: string list
10-
[@default []]
11-
; [@key "array_of_string"]
12-
array_array_of_integer: int64 list list
13-
[@default []]
14-
; [@key "array_array_of_integer"]
15-
array_array_of_model: Read_only_first.t list list
16-
[@default []]
17-
; [@key "array_array_of_model"]
18-
} [@@deriving yojson { strict = false }, show, eq ];;
198

20-
let create () : t = {
21-
array_of_string = [];
22-
array_array_of_integer = [];
23-
array_array_of_model = [];
24-
}
9+
10+
11+
type t = {
12+
array_of_string: string list
13+
[@default []]
14+
; [@key "array_of_string"]
15+
array_array_of_integer: int64 list list
16+
[@default []]
17+
; [@key "array_array_of_integer"]
18+
array_array_of_model: Read_only_first.t list list
19+
[@default []]
20+
; [@key "array_array_of_model"]
21+
} [@@deriving yojson { strict = false }, show, eq ];;
22+
23+
let create () : t = {
24+
array_of_string = [];
25+
array_array_of_integer = [];
26+
array_array_of_model = [];
27+
}
28+
2529

samples/client/petstore/ocaml-fake-petstore/src/models/capitalization.ml

Lines changed: 45 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -5,46 +5,50 @@
55
*
66
*)
77

8-
type t = {
9-
small_camel: string
10-
11-
option [@default None]
12-
13-
; [@key "smallCamel"]
14-
capital_camel: string
15-
16-
option [@default None]
17-
18-
; [@key "CapitalCamel"]
19-
small_snake: string
20-
21-
option [@default None]
22-
23-
; [@key "small_Snake"]
24-
capital_snake: string
25-
26-
option [@default None]
27-
28-
; [@key "Capital_Snake"]
29-
sca_eth_flow_points: string
30-
31-
option [@default None]
32-
33-
; [@key "SCA_ETH_Flow_Points"]
34-
(* Name of the pet *)
35-
att_name: string
36-
37-
option [@default None]
38-
39-
; [@key "ATT_NAME"]
40-
} [@@deriving yojson { strict = false }, show, eq ];;
418

42-
let create () : t = {
43-
small_camel = None;
44-
capital_camel = None;
45-
small_snake = None;
46-
capital_snake = None;
47-
sca_eth_flow_points = None;
48-
att_name = None;
49-
}
9+
10+
11+
type t = {
12+
small_camel: string
13+
14+
option [@default None]
15+
16+
; [@key "smallCamel"]
17+
capital_camel: string
18+
19+
option [@default None]
20+
21+
; [@key "CapitalCamel"]
22+
small_snake: string
23+
24+
option [@default None]
25+
26+
; [@key "small_Snake"]
27+
capital_snake: string
28+
29+
option [@default None]
30+
31+
; [@key "Capital_Snake"]
32+
sca_eth_flow_points: string
33+
34+
option [@default None]
35+
36+
; [@key "SCA_ETH_Flow_Points"]
37+
(* Name of the pet *)
38+
att_name: string
39+
40+
option [@default None]
41+
42+
; [@key "ATT_NAME"]
43+
} [@@deriving yojson { strict = false }, show, eq ];;
44+
45+
let create () : t = {
46+
small_camel = None;
47+
capital_camel = None;
48+
small_snake = None;
49+
capital_snake = None;
50+
sca_eth_flow_points = None;
51+
att_name = None;
52+
}
53+
5054

0 commit comments

Comments
 (0)