diff --git a/src/server/default/ezServer.dummy.ml b/src/server/default/ezServer.dummy.ml index cea54ad..4cfe649 100644 --- a/src/server/default/ezServer.dummy.ml +++ b/src/server/default/ezServer.dummy.ml @@ -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\ diff --git a/src/server/ezOpenAPI.ml b/src/server/ezOpenAPI.ml index b808356..6b536c0 100644 --- a/src/server/ezOpenAPI.ml +++ b/src/server/ezOpenAPI.ml @@ -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 @@ -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