Add the dependencies in the generated Opam file (#20805)

This commit is contained in:
Julien Debon 2025-03-05 12:38:41 +01:00 committed by GitHub
parent 890c758fd8
commit 123119c076
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 40 additions and 13 deletions

View File

@ -26,9 +26,6 @@ jobs:
- name: Install - name: Install
run: opam install . --deps-only --with-test run: opam install . --deps-only --with-test
working-directory: ${{ matrix.sample }} working-directory: ${{ matrix.sample }}
- name: Install Misc
run: opam install dune ppx_deriving_yojson conf-libev lwt cohttp-lwt-unix.5.3.0 cohttp-async.5.3.0
working-directory: ${{ matrix.sample }}
- name: Build - name: Build
run: opam exec -- dune build run: opam exec -- dune build
working-directory: ${{ matrix.sample }} working-directory: ${{ matrix.sample }}

View File

@ -11,5 +11,14 @@ license: ""
homepage: "" homepage: ""
bug-reports: "" bug-reports: ""
dev-repo: "" dev-repo: ""
depends: [ "ocaml" "ocamlfind" ] depends: [
"ocaml"
"ocamlfind"
"dune"
"ppx_deriving_yojson"
"conf-libev"
"lwt"
"cohttp-lwt-unix" {< "6.0.0"}
"cohttp-async" {< "6.0.0"}
]
build: ["dune" "build" "-p" name] build: ["dune" "build" "-p" name]

View File

@ -18,18 +18,24 @@ For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}})
## Requirements. ## Requirements.
OCaml 4.x OCaml 5.x
## Installation ## Installation
Please run the following commands to build the package `{{{packageName}}}`: Please run the following commands to build the package `{{{packageName}}}`:
```sh ```sh
opam install ppx_deriving_yojson cohttp ppx_deriving cohttp-lwt-unix ocaml-migrate-parsetree opam install . --deps-only --with-test
eval $(opam env) eval $(opam env)
dune build dune build
``` ```
## Getting Started ## Getting Started
TODO The generated directory structure is:
- `src/apis`: contains several modules, each with several functions. Each function is an API endpoint.
- `src/models`: contains several modules. Each module contains:
- a type `t` representing an input and/or output schema of the OpenAPI spec
- a smart constructor `create` for this type
- `src/support`: various modules used by the generated APIs and Models

View File

@ -10,18 +10,24 @@ This OCaml package is automatically generated by the [OpenAPI Generator](https:/
## Requirements. ## Requirements.
OCaml 4.x OCaml 5.x
## Installation ## Installation
Please run the following commands to build the package `petstore_client`: Please run the following commands to build the package `petstore_client`:
```sh ```sh
opam install ppx_deriving_yojson cohttp ppx_deriving cohttp-lwt-unix ocaml-migrate-parsetree opam install . --deps-only --with-test
eval $(opam env) eval $(opam env)
dune build dune build
``` ```
## Getting Started ## Getting Started
TODO The generated directory structure is:
- `src/apis`: contains several modules, each with several functions. Each function is an API endpoint.
- `src/models`: contains several modules. Each module contains:
- a type `t` representing an input and/or output schema of the OpenAPI spec
- a smart constructor `create` for this type
- `src/support`: various modules used by the generated APIs and Models

View File

@ -11,5 +11,14 @@ license: ""
homepage: "" homepage: ""
bug-reports: "" bug-reports: ""
dev-repo: "" dev-repo: ""
depends: [ "ocaml" "ocamlfind" ] depends: [
"ocaml"
"ocamlfind"
"dune"
"ppx_deriving_yojson"
"conf-libev"
"lwt"
"cohttp-lwt-unix" {< "6.0.0"}
"cohttp-async" {< "6.0.0"}
]
build: ["dune" "build" "-p" name] build: ["dune" "build" "-p" name]