You can extend the OpenAPI specification by adding either a JSON or YAML extension schema
to an API. An extension is imported into a Catalog, or a Space in a Catalog, then added to the API
schema.
Before you begin
You must possess Catalog edit permissions to complete this task.
About this task
This task describes how to import an OpenAPI extension into a Catalog by using the browser based
API
Manager user interface.
Alternatively, you can use the developer toolkit CLI; see Working with OpenAPI
extensions.
For an example of an extension schema file, see Referring to an
extension in an API definition.
Procedure
-
In the navigation pane of the API
Manager UI, click
Manage, then select the catalog that you want to work with.
- If spaces are enabled in the catalog, select the space that you want
to work with by completing the following steps:
- Click the
Spaces tab.
- Select the space that
you want to work with.
- Click the Catalog settings tab if you are working in a Catalog, or
the Space settings tab if you are working in a Space.
- Click Gateway services.
- Alongside the Gateway service that you want to work with, click the options icon and then click View extensions.
- Click Upload then upload the extension file as indicated, either
by dragging and dropping the file, or by browsing and selecting it. The extension schema file will
be either a JSON or YAML file.
- Click Upload when done.
Results
The user-defined extension is now imported into a Catalog or Space, and can be used when
developing an API by using the API editor in either the API Designer or the API
Manager user interface.
What to do next
Add the OpenAPI extension to your APIs as required; see Adding an OpenAPI
extension to an API.