3 Commits

Author SHA1 Message Date
cgensoul
411199bc99 [OCaml] Added optional params support in API operations (#3568)
* Added handling of api keys in headers.

* Added handling of optional arguments in api functions.

* Optional header params.

* Fixed a bug in path param replacement.

* Relaxed deserializing of model records with @@deriving yojson { strict = false }. It allows receiving more fields in the JSon payload than declared in the OCaml record, fields not matching any record field are ignored.

* Reformatted api-impl.mustache.

* Generate shorter enum value names by allowing underscore character.

* Cleanup of optional params generation.

* Updated the OCaml samples with the latest version of the generator.

* Corrected a bug encountered when generating default value for optional enum fields.

* Added v3 version of the samples for the OCaml generator.
2019-08-07 11:25:32 +08:00
cgensoul
1c36fa9fe3 Fixed #3521. Response headers were not processed for enums collection. (#3526)
* Fixed #3521. Response headers were not processed for enums collection.

* Replace " by '' in text fields to allow these to be used in OCaml comments.

* Added support of ByteArray (i.e. base64 encoded data) body and free form object as request body. Added support of free form object in response body as well.

* Added result as a reserved word to prevent generating model files with this name (having a result.ml model file confuses dune into thinking some other model modules depend on Result when they don't).

* Updated samples to reflect the latest changes in the OCaml generator.
2019-08-02 19:04:53 +08:00
William Cheng
6e3176557c
[OCaml] various enhancements (#3483)
* add ocaml template creator

* various enhancement to ocaml generator

* update instruction

* update doc

* remove readme

* add back readme
2019-07-29 10:07:32 +08:00