Skip to content

Commit

Permalink
fix dummy implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
maxtori committed Oct 3, 2024
1 parent c8e94ef commit fbd1ac3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/server/default/ezServer.dummy.ml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
(* *)
(**************************************************************************)

let server ?catch:_ _ =
let server ?catch:_ ?allow_origin:_ ?allow_headers:_ ?allow_methods:_ ?allow_credentials:_ _ =
Format.eprintf
"Cohttp or Httpaf server implementation not availble\n\
Try: `opam install cohttp-lwt-unix`\n\
Expand Down
3 changes: 1 addition & 2 deletions src/server/ezOpenAPI.ml
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ module Encoding = struct
(function
| `O l -> List.map (fun (n, v) -> (n, Json_encoding.destruct enc v)) l
| _ -> failwith "asssociative object")
~schema:(Json_encoding.schema Json_encoding.any_ezjson_object)
~schema:(Json_encoding.schema ~definitions_path:EzAPI.Doc.definitions_path Json_encoding.any_ezjson_object)


let contact_object = conv
Expand Down Expand Up @@ -672,7 +672,6 @@ let make ?descr ?terms ?contact ?license ?(version="0.1") ?servers ?(docs=[])
else
filename ^ ".json", EzEncoding.Ezjsonm.to_string ~minify:(not pretty) openapi_json


let write ?descr ?terms ?contact ?license ?version ?servers ?docs ?(yaml=false)
?pretty ?definitions ~sections ~title filename =
let filename, s = make ?descr ?terms ?contact ?license ?version ?servers ?docs ?definitions ~yaml ?pretty ~sections ~title filename in
Expand Down

0 comments on commit fbd1ac3

Please sign in to comment.