Pet Store Management Sample
The PetStore Management Sample is a ready to use Sample App developed through OpenAPI Specification(OAS). Swagger is the world’s largest framework of API developer tools for the OpenAPI Specification(OAS), enabling development across the entire API lifecycle, from design and documentation, to test and deployment. The OpenAPI specification creates the RESTful contract for your API, detailing resources and operations in a better readable format for easy development and integration.
The PetStore Management Sample helps a customer to search and view details about pets, stores, and users. The app helps create new orders for pets, select stores and update orders as required. To learn more about PetStore OpenAPI Specification, see Swagger UI.
The app is built with predefined functionality. You can set the required properties and events, map the app with your back end service, and build the app. Now, the PetStore Management Sample is ready to use.
This following sections explains the functionality of the PetStore Management Sample.
- Prerequisites
- Importing the PetStore Management Sample
- Configuring the PetStore Management Sample
- Setting The Environment
- Console Access Control
- Configuring Integration Service
- Publishing the App
Prerequisites
Before you start using the PetStore Management Sample, ensure you have the following:
Importing the PetStore Management Sample
The PetStore Management Sample is a readily available app for all new Trial and Starter accounts of the voltmx Foundry.
Before you start importing the PetStore Management Sample to Volt MX Foundry, you must download the app to your local folder.
- Log on to your VoltMX account. The Dashboard page appears by default.
- In the left pane, click the Apps menu. The Custom Apps page appears.
-
Click Import. A Import App dialogue appears.
-
Drag and Drop the zip folder into the Import App window to import the PetStore Management Sample.
-
Alternatively, Click Browse. The Open dialog appears.
-
Navigate to the location where you downloaded the component (zip file) on your computer, select the component, and click Open. The PetStore Management Sample is imported into your Volt MX Foundry Account.
After importing the app, you can access the pre-configured services of the Sample app and view the response output as needed.
Configuring the PetStore Management Sample
When you import the PetStore Management Sample into Volt MX Iris, a Volt MX Foundry app, PetStore Management Sample, is uploaded to your Volt MX account.
Note: The PetStore Management Sample fails to upload if already any Volt MX Foundry app exists with the same name (PetStore Management Sample). If you do not want to use the existing PetStore Volt MX Foundry app, rename or delete the existing Volt MX Foundry app, delete the PetStore project from Iris, and import it again.
The PetStore Management Sample contains a set of identity, integration, orchestration, and objects services by default. Using the Volt MX Foundry console, you can configure the services as you require and then publish the app.
The following sections help you configure the PetStore Management Sample.
Setting the Environment
The PetStore Management Sample is a readily published App.
To select the environment, do the following:
- Log on to your VoltMX account. The Dashboard page appears by default.
- In the left pane, click the Apps menu. The Custom Apps page appears.
- Find and click PetStore Management Sample.
- In the left pane, click the Environments menu. If the user has no environment available, choose from the environment section a Clouds or On-premises environment.
- Find the appropriate contact from Owners or Administrators list available and click on the contact to request the On-premises license.
- In case of already deployed samples, this App is already published. If the user has made any changes in the environment or to the access permissions, the App need to be published again with the choice of environment.
The PetStore Management Sample is public and has no user authentication required. However, if the user wants to associate a Login component he needs Volt MX User Repository service available in the Volt MX Foundry app. The repository service helps you authenticate customers when they try to log on to the PetStore Management Sample using the user credentials.
Console Access Control
Note: By default all the users have FULL ACCESS.
You can provide Specific Access to new users or selected users. To provide access to new users select Add provide access through Console Access Control. After selecting access to the selected users click SAVE.
Configuring Integration Service
The integration services help you define the type of integration and the connection parameters. In the service definition, you can view the Service Type, Version, and Connection Parameters related to the App. The service definition also specifies the Authenticity provider, if any. To learn more about object services and mapping, see Integration Services.
By default, the PetStore Management Sample is mapped with the Volt MX Foundry Services.
The PetStore Management Sample contains the following :
- Service type contains the Open API (Swagger). This cannot be modified.
- Connection Parameters has petswagger.json by default. If needed, the user can delete the available .json and upload his own .json object or zip file.
To view the integrated services and its operations, do the following:
- After logging on to your Volt MX account, open the PetStore Management Sample.
- Click the Integration sub-tab. The Integration sub-tab opens with a list of services and corresponding operations.
-
From the list of integration services, you can see a service type as PetStoreServices which is predefined. The Service Definition tab of the selected integration service opens by default.
-
Click the plus icon to expand the PetStoreServices section in the left navigation. The list of preconfigured operations appears.
-
Click any one of the preconfigured operation. For example, getPetsByID.
-
In the Name box, the name of the operation is displayed by default.
-
On the Request Input tab, in the Body section, for the following parameters, specify the values in the respective boxes under the Test Value column and Default Value column.
Mandatory Parameters
- petID: It takes number values. Enter the TEST VALUE 100.
-
Click SAVE AND FETCH RESPONSE. The Output Result dialog appears with the response. Otherwise, the Output Result shows an error if the value entered is invalid.
Note: All the operations are predefined and preconfigured. Provide the corresponding values for the Test Value and Default Value to fetch the appropriate output responses.
Publishing the App
The PetStore Management Sample is readily published as a sample app (scenario). After configuring the necessary configurations, or making new edits you must republish the app to Volt MX Foundry.