Creating a Product definition file
You define a Product by creating a Product definition file.
About this task
- Create the file in an editor of your choice.
- Create a Product definition file by using the
apic create --type product
command and then modify it. You can base your Product definition file on the default Product template or on your own custom template.
You can create a Product in the CLI by running apic create --type product
and adding additional arguments on the command line.. Another option is to create a Product interactively in the command line by running apic create --type product
and following the prompts.
apic create --type product
command by entering the command: apic create --type product --help
apic create --type product --template template_filename --title product_title
where
template_filename is the name of the Handlebars template to use, and
product_title is the title of your Product. A Product template file must have a
.hbs file name extension. You can create a template from scratch, or start
with the example (default) Product template provided in API and Product definition template examples.--template
option, you can set the
following configuration variables: template-default-product
- specifies the base file name of the .hbs template file.template-path
- specifies the directory containing the template file.
A Product definition file contains the following sections:
- A specification version
- An information section
- A visibility section
- An APIs section
- A Plans section
In this topic, YAML is used, but the instructions can be adapted to use JSON. Both .yaml and .yml file extensions are supported, but the use of the .yaml file extension is recommended by yaml.org.
Procedure
Structure your Product definition file by completing the following steps:
Results
You have completed a YAML representation of your Product. A complete example with full indentation can be found in An example YAML representation of a Product.
From IBM API
Connect Version 5.0.7.2, you
can create multilingual API and Product documentation by using an x-ibm-languages
extension directly in the OpenAPI (Swagger 2.0) definition. For more
information, see Using x-ibm-languages to create multilingual API and Product documentation.