apiBuild
This operation builds api specification file(s) from a SCM repository and validates the file contents. The apiBuild operation can only be used with a FlexDeploy package-based deployment project of type Oracle Api Gateway.
Artifact is a single zip file containing api specification files (JSON or YAML). The specifications contain information about the back-end resources and the methods (for example, GET, PUT, etc..) that can be performed on the each back-end resource.
Target Properties
Property Name | Property Code | Required | Description |
---|---|---|---|
Oracle API Gateway Account |
| No | OCI account with all the required properties like Tenancy Id, User OCID, and Private Key, etc. Oracle API Gateway Account will be required on either the plugin input or Target. If a value is set on both then, the plugin input will take precedence. See Special Considerations below for instructions on how to create an OCI account for Oracle API Gateway. |
Compartment Name |
| No | The OCI compartment used to validate the api specification. Useful if you build from a different compartment per environment. Compartment Name is required if Compartment Name on a file level attribute contains property replacement syntax - Property Replacement Support |
Project Properties
Property Name | Property Code | Required | Description |
---|---|---|---|
Root Compartment Id |
| Yes | Root or parent compartment Id used to find sub-compartments. i.e. ocid1.tenancy.oc1..<OCID> This can be sub-compartment as well, but root is suggested. |
Inputs
Input Name | Input Code | Required | Description |
---|---|---|---|
Oracle API Gateway Account |
| No | OCI account with all the required properties like Tenancy Id, User OCID, and Private Key, etc. |
Add Tags |
| No | Add defined tags when an API is created or updated. This is used to linked SCM commits and FlexDeploy build events to API creation or updates. Default is true. The following defined tags will be added on build:
If Add Tags is enabled, and these tags do not exist, FlexDeploy will automatically create the tag namespace (FlexDeploy) and the tags within it. |
Artifacts
This operation produces artifacts that will be stored in the artifacts repository.
Endpoint Selection
This operation will select all available endpoints associated to the Target.
Endpoint Execution
This operation will execute on any one of the selected endpoints and will be random in the determination of which one.
Special Considerations
Artifact file(s) can be .yaml or .json and in 2 formats:
Openapi 3.x - In this case, the file(s) are validated by OCI SDK. This means for each api specification an api on OCI is created or updated with the contents of the api specification artifact file. The display name of the api on OCI is set to display name attribute on the file. If that is not set, then FlexDeploy will auto generate an api display name for you in the format
fd-apigateway-<FILE_NAME>
Native API Specification - In this case the file(s) are validated by parsing the json or yaml file for invalid tokens.
Documentation related to creating an API Specification → https://docs.oracle.com/en-us/iaas/Content/APIGateway/Tasks/apigatewaycreatingspecification.htm
Â
openapi example:
openapi: 3.0.1
info:
title: ECHO
version: v03
servers:
- url: https://dev-oic-vbcs-poc-idzor6zhmigm-ia.integration.ocp.oraclecloud.com:443/ic/api/integration/v1/flows/rest/ECHO/1.0
paths:
"/{message}":
get:
parameters:
- name: message
in: path
required: true
schema:
type: string
responses:
"500":
description: Faults
content: {}
default:
description: A sample description of the Response
content:
application/json:
schema:
$ref: "#/components/schemas/response-wrapper"
security:
- oauth2Authentication: []
- basicAuthentication: []
native example
{
"requestPolicies": {},
"routes": [
{
"path": "<api-route-path>",
"methods": ["<method-list>"],
"backend": {
"type": "<backend-type>",
"<backend-target>": "<identifier>"
},
"requestPolicies": {}
}
]
}
Â
- style