Create a metadata 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.
The created project will contain contracts and methods corresponding to the project modules and assets.
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.
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
--outputs-json-path, -o
The output configuration json file path
Example
Create a project with multiple items
> 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