Book a demo

← Documentation

ol create project

You can create projects on the OL Hub by executing the ol create project command. Projects are usually directly created in the OL Hub. Still, the command alternative is handy in certain situations, for example, when multiple projects have to be created automatically, in bulk, by a script. You can implement a script that automates the entire flow from module creation and testing to project creation and service generation.

The command accepts as an argument the project name and the names of the modules that the project will contain (--modules). The command will check that no project with the same name already exists in the OL Hub and that the modules with the specified names do exist in the OL Hub.

By default the project contract is auto generated from the project's modules and assets. Alternatively, pass --source-path to build the contract from a specification instead; the contract's methods are then wired to the same-named assets in the project's modules.

You can execute the ol list projects command to ensure that your new project does not have a name already taken by existing projects. Run the ol list modules command to refer to the list of modules existing on the OL Hub.

Rules

  • The project name cannot be identical to one of the project names listed by the ol list projects command.
  • The modules exist in the OL Hub under the names you specify.
  • --source-path cannot be combined with --outputs-json-path or --base-path, which apply to auto generated contracts only.

Syntax

ol create project PROJECT_NAME [OPTIONS]

Arguments

PROJECT_NAME

The name of the created project

Options

--modules, -m (required)

A module or a list of modules associated with the project, separated by spaces.

--description, -d

A project description

--type, -t

The type of contract. The possible values are:

  • REST: REST - JSON request/response (default)
  • REVERSE-API: BINARY request/response
  • WSDL: SOAP request/response
  • VSAM: VSAM file consumer

When --source-path points at a WSDL, the type defaults to WSDL.

--source-path

A specification to build the contract from: an OpenAPI json/yaml file, or a .wsdl or .zip (a WSDL together with its xsd files). The project is created with a contract first contract wired to the same-named modules assets, instead of an auto generated one. The file must exist and carry one of the supported extensions.

--publish

Publish the created methods. Applies to contract first projects only - the methods of an auto generated contract are already published.

--outputs-json-path, -o

The output configuration json file path. Auto generated contracts only.

--base-path, -b

The base path of the project contract. Auto generated contracts only.

Example

Example screenshot Create a project with multiple modules

> ol create project mf-api --modules credit-cards items --description "mainframe credit cards businesses"
$ ol create project mf-api --modules credit-cards items --description "mainframe credit cards businesses"

Create a project whose contract comes from a WSDL

> ol create project mf-api --modules credit-cards --type WSDL --source-path service.wsdl --publish
$ ol create project mf-api --modules credit-cards --type WSDL --source-path service.wsdl --publish

Read more

Tell us about yourself

You've been browsing the catalog. Leave your details to keep exploring.

Privacy policy