Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ type t = {
(* {{{.}}} *)
{{/description}}
{{#isEnum}}
{{{name}}}: {{^isMap}}Enums.{{/isMap}}{{{datatypeWithEnum}}}{{^isContainer}}{{#required}}{{#defaultValue}}[@default {{{.}}}]{{/defaultValue}}{{/required}}{{/isContainer}}{{^isContainer}}{{#required}}{{#isNullable}} option [@default {{#defaultValue}}Some({{{.}}}){{/defaultValue}}{{^defaultValue}}None{{/defaultValue}}]{{/isNullable}}{{/required}}{{/isContainer}}{{^isContainer}}{{^required}} option [@default {{#defaultValue}}Some({{{.}}}){{/defaultValue}}{{^defaultValue}}None{{/defaultValue}}]{{/required}}{{/isContainer}};
{{{name}}}: {{^isMap}}Enums.{{/isMap}}{{{datatypeWithEnum}}}{{^isContainer}}{{#required}}{{#defaultValue}}[@default {{{.}}}]{{/defaultValue}}{{/required}}{{/isContainer}}{{^isContainer}}{{#required}}{{#isNullable}} option [@default {{#defaultValue}}Some({{{.}}}){{/defaultValue}}{{^defaultValue}}None{{/defaultValue}}]{{/isNullable}}{{/required}}{{/isContainer}}{{^isContainer}}{{^required}} option [@default {{#defaultValue}}Some({{{.}}}){{/defaultValue}}{{^defaultValue}}None{{/defaultValue}}]{{/required}}{{/isContainer}}; [@key "{{{baseName}}}"]
{{/isEnum}}
{{^isEnum}}
{{{name}}}: {{{datatypeWithEnum}}}{{^isContainer}}{{#required}}{{#isNullable}} option{{/isNullable}}{{/required}}{{/isContainer}}{{^isContainer}}{{^required}} option [@default None]{{/required}}{{/isContainer}};
{{{name}}}: {{{datatypeWithEnum}}}{{^isContainer}}{{#required}}{{#isNullable}} option{{/isNullable}}{{/required}}{{/isContainer}}{{^isContainer}}{{^required}} option [@default None]{{/required}}{{/isContainer}}; [@key "{{{baseName}}}"]
{{/isEnum}}
{{/vars}}
} [@@deriving yojson { strict = false }, show ];;
Expand Down
2 changes: 1 addition & 1 deletion samples/client/petstore/ocaml/.openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.0.1-SNAPSHOT
7.13.0-SNAPSHOT
1 change: 1 addition & 0 deletions samples/client/petstore/ocaml/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This OCaml package is automatically generated by the [OpenAPI Generator](https:/

- API version: 1.0.0
- Package version: 1.0.0
- Generator version: 7.13.0-SNAPSHOT
- Build package: org.openapitools.codegen.languages.OCamlClientCodegen

## Requirements.
Expand Down
6 changes: 3 additions & 3 deletions samples/client/petstore/ocaml/src/models/api_response.ml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
*)

type t = {
code: int32 option [@default None];
_type: string option [@default None];
message: string option [@default None];
code: int32 option [@default None]; [@key "code"]
_type: string option [@default None]; [@key "type"]
message: string option [@default None]; [@key "message"]
} [@@deriving yojson { strict = false }, show ];;

(** Describes the result of uploading an image resource *)
Expand Down
4 changes: 2 additions & 2 deletions samples/client/petstore/ocaml/src/models/category.ml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
*)

type t = {
id: int64 option [@default None];
name: string option [@default None];
id: int64 option [@default None]; [@key "id"]
name: string option [@default None]; [@key "name"]
} [@@deriving yojson { strict = false }, show ];;

(** A category for a pet *)
Expand Down
12 changes: 6 additions & 6 deletions samples/client/petstore/ocaml/src/models/order.ml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
*)

type t = {
id: int64 option [@default None];
pet_id: int64 option [@default None];
quantity: int32 option [@default None];
ship_date: string option [@default None];
id: int64 option [@default None]; [@key "id"]
pet_id: int64 option [@default None]; [@key "petId"]
quantity: int32 option [@default None]; [@key "quantity"]
ship_date: string option [@default None]; [@key "shipDate"]
(* Order Status *)
status: Enums.status option [@default None];
complete: bool option [@default None];
status: Enums.status option [@default None]; [@key "status"]
complete: bool option [@default None]; [@key "complete"]
} [@@deriving yojson { strict = false }, show ];;

(** An order for a pets from the pet store *)
Expand Down
12 changes: 6 additions & 6 deletions samples/client/petstore/ocaml/src/models/pet.ml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
*)

type t = {
id: int64 option [@default None];
category: Category.t option [@default None];
name: string;
photo_urls: string list;
tags: Tag.t list;
id: int64 option [@default None]; [@key "id"]
category: Category.t option [@default None]; [@key "category"]
name: string; [@key "name"]
photo_urls: string list; [@key "photoUrls"]
tags: Tag.t list; [@key "tags"]
(* pet status in the store *)
status: Enums.pet_status option [@default None];
status: Enums.pet_status option [@default None]; [@key "status"]
} [@@deriving yojson { strict = false }, show ];;

(** A pet for sale in the pet store *)
Expand Down
4 changes: 2 additions & 2 deletions samples/client/petstore/ocaml/src/models/tag.ml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
*)

type t = {
id: int64 option [@default None];
name: string option [@default None];
id: int64 option [@default None]; [@key "id"]
name: string option [@default None]; [@key "name"]
} [@@deriving yojson { strict = false }, show ];;

(** A tag for a pet *)
Expand Down
16 changes: 8 additions & 8 deletions samples/client/petstore/ocaml/src/models/user.ml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
*)

type t = {
id: int64 option [@default None];
username: string option [@default None];
first_name: string option [@default None];
last_name: string option [@default None];
email: string option [@default None];
password: string option [@default None];
phone: string option [@default None];
id: int64 option [@default None]; [@key "id"]
username: string option [@default None]; [@key "username"]
first_name: string option [@default None]; [@key "firstName"]
last_name: string option [@default None]; [@key "lastName"]
email: string option [@default None]; [@key "email"]
password: string option [@default None]; [@key "password"]
phone: string option [@default None]; [@key "phone"]
(* User Status *)
user_status: int32 option [@default None];
user_status: int32 option [@default None]; [@key "userStatus"]
} [@@deriving yojson { strict = false }, show ];;

(** A User who is purchasing from the pet store *)
Expand Down
Loading