Skip to content

Commit f0d82dc

Browse files
committed
[OCaml] Run dune fmt on all OCaml folders
1 parent 20c86dc commit f0d82dc

79 files changed

Lines changed: 1765 additions & 4015 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
(include_subdirs unqualified)
2+
23
(library
3-
(name petstore_client)
4-
(public_name petstore_client)
5-
(flags (:standard -w -27))
6-
(libraries str cohttp-lwt-unix lwt yojson ppx_deriving_yojson.runtime)
7-
(preprocess (pps ppx_deriving_yojson ppx_deriving.std))
8-
(wrapped true)
9-
)
4+
(name petstore_client)
5+
(public_name petstore_client)
6+
(flags
7+
(:standard -w -27))
8+
(libraries str cohttp-lwt-unix lwt yojson ppx_deriving_yojson.runtime)
9+
(preprocess
10+
(pps ppx_deriving_yojson ppx_deriving.std))
11+
(wrapped true))

samples/client/petstore/ocaml-fake-petstore/src/apis/another_fake_api.ml

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,9 @@
66
*)
77

88
let call_123_test_special_tags ~client_t =
9-
let open Lwt.Infix in
10-
let uri = Request.build_uri "/another-fake/dummy" in
11-
let headers = Request.default_headers in
12-
let body = Request.
13-
14-
write_as_json_body
15-
16-
17-
18-
19-
20-
21-
Client.to_yojson
22-
23-
24-
25-
client_t
26-
in
27-
Cohttp_lwt_unix.Client.call `PATCH uri ~headers ~body >>= fun (resp, body) ->
28-
Request.read_json_body_as (JsonSupport.unwrap Client.of_yojson) resp body
29-
9+
let open Lwt.Infix in
10+
let uri = Request.build_uri "/another-fake/dummy" in
11+
let headers = Request.default_headers in
12+
let body = Request.write_as_json_body Client.to_yojson client_t in
13+
Cohttp_lwt_unix.Client.call `PATCH uri ~headers ~body >>= fun (resp, body) ->
14+
Request.read_json_body_as (JsonSupport.unwrap Client.of_yojson) resp body

samples/client/petstore/ocaml-fake-petstore/src/apis/default_api.ml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
*)
77

88
let foo_get () =
9-
let open Lwt.Infix in
10-
let uri = Request.build_uri "/foo" in
11-
let headers = Request.default_headers in
12-
Cohttp_lwt_unix.Client.call `GET uri ~headers >>= fun (resp, body) ->
13-
Request.read_json_body_as (JsonSupport.unwrap Model__foo_get_default_response.of_yojson) resp body
14-
9+
let open Lwt.Infix in
10+
let uri = Request.build_uri "/foo" in
11+
let headers = Request.default_headers in
12+
Cohttp_lwt_unix.Client.call `GET uri ~headers >>= fun (resp, body) ->
13+
Request.read_json_body_as
14+
(JsonSupport.unwrap Model__foo_get_default_response.of_yojson)
15+
resp body

0 commit comments

Comments
 (0)