Skip to content

Commit 7682e16

Browse files
committed
Updated API from documentation release
1 parent 4524260 commit 7682e16

File tree

9 files changed

+45
-1
lines changed

9 files changed

+45
-1
lines changed

api-specs/connect/api.raml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ resourceTypes: !include types/resource-types.raml
114114
- [DeploymentUnsupportedRegion](ctp:connect:type:DeploymentUnsupportedRegionError)
115115
- [DeploymentUnknownApplicationConfiguration](ctp:connect:type:DeploymentUnknownApplicationConfigurationError)
116116
- [DeploymentUnknownApplicationConfigurationKey](ctp:connect:type:DeploymentUnknownApplicationConfigurationKeyError)
117+
- [DeploymentInvalidType](ctp:connect:type:DeploymentInvalidTypeError)
118+
- [DeploymentProductionDeactivated](ctp:connect:type:DeploymentProductionDeactivatedError)
117119
responses:
118120
201:
119121
body:

api-specs/connect/examples/deployment/minimal.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"id": "13c72c44-7a8e-44f2-a570-b5e991f7021a",
33
"key": "deployment-key",
44
"version": 1,
5+
"type": "preview",
56
"connector": {
67
"id": "a49aa2c5-15b6-41c4-88af-4b7afdcc07a5",
78
"key": "connector-key",

api-specs/connect/examples/deployment/paged.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"id": "13c72c44-7a8e-44f2-a570-b5e991f7021a",
99
"key": "deployment-key",
1010
"version": 1,
11+
"type": "preview",
1112
"connector": {
1213
"id": "a49aa2c5-15b6-41c4-88af-4b7afdcc07a5",
1314
"key": "connector-key",

api-specs/connect/types/common.raml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,10 +486,12 @@ types:
486486
Deployment type of the Connector.
487487
enum:
488488
- preview
489+
- sandbox
489490
- production
490491
(annotations.enumDescriptions):
491492
preview: The deployed Connector is the previewable [ConnectorStaged](ctp:connect:type:ConnectorStaged).
492-
production: The deployed Connector is the production [Connector](ctp:connect:type:Connector).
493+
sandbox: The [Connector](ctp:connect:type:Connector) is deployed in the sandbox environment.
494+
production: The [Connector](ctp:connect:type:Connector) is deployed in the production environment.
493495
Repository:
494496
example: !include ../examples/connector/Repository.json
495497
description: |

api-specs/connect/types/deployment/deployment-draft.raml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ properties:
99
pattern: ^[A-Za-z0-9_-]+$
1010
minLength: 2
1111
maxLength: 256
12+
type?:
13+
type: common.DeploymentType
14+
description: Deployment type. If a [ConnectorStaged](ctp:connect:type:ConnectorStaged) is referenced in the `connector` field, you can send only `preview`. If a [Connector](ctp:connect:type:Connector) is referenced in the `connector` field, the value defaults to `sandbox`. However, you can send `production` when you are ready to deploy the Connector to your production environment.
1215
connector:
1316
type: common.ConnectorReference
1417
description: Reference to the [Connector](ctp:connect:type:Connector) or [ConnectorStaged](ctp:connect:type:ConnectorStaged) being deployed.

api-specs/connect/types/deployment/deployment.raml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ properties:
1515
version:
1616
type: integer
1717
description: Current version of the Deployment.
18+
type:
19+
type: common.DeploymentType
20+
description: Deployment type. If a [ConnectorStaged](ctp:connect:type:ConnectorStaged) is referenced in the `connector` field, then the field can only be `preview`. If a [Connector](ctp:connect:type:Connector) is referenced in the `connector` field, then the field can either be `sandbox` or `production`.
1821
connector:
1922
type: common.DeploymentConnector
2023
description: Details of the [Connector](ctp:connect:type:Connector) being deployed.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#%RAML 1.0 DataType
2+
(annotations.package): error
3+
type: ErrorObject
4+
displayName: DeploymentInvalidTypeError
5+
discriminatorValue: DeploymentInvalidType
6+
description: |
7+
Returned when the provided [deployment type](ctp:connect:type:DeploymentType) is not valid for the referenced [Connector](ctp:connect:type:Connector).
8+
9+
The error is returned as a failed response to the [Create a Deployment](ctp:connect:endpoint:/{projectKey}/deployments:POST) request.
10+
properties:
11+
code:
12+
type: string
13+
message:
14+
type: string
15+
description: |
16+
`"The Connector id=$resourceId or key=$resourceKey cannot be deployed as a '(preview|sandbox|production)' type. Only '(preview|sandbox|production)' types are allowed."`
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#%RAML 1.0 DataType
2+
(annotations.package): error
3+
type: ErrorObject
4+
displayName: DeploymentProductionDeactivatedError
5+
discriminatorValue: DeploymentProductionDeactivated
6+
description: |
7+
Returned as a failed response to the [Create a Deployment](ctp:connect:endpoint:/{projectKey}/deployments:POST) request when deployments to production are disabled for the Project.
8+
properties:
9+
code:
10+
type: string
11+
message:
12+
type: string
13+
description: |
14+
`"Deployments to production are disabled for this Project. Please contact support to enable production deployments."`

api-specs/connect/types/types.raml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,5 @@ DeploymentApplicationRequiredError: !include error/DeploymentApplicationRequired
7171
DeploymentUnknownGlobalConfigurationKeyError: !include error/DeploymentUnknownGlobalConfigurationKeyError.raml
7272
DeploymentMissingGlobalConfigurationKeyError: !include error/DeploymentMissingGlobalConfigurationKeyError.raml
7373
DeploymentEmptyRequiredGlobalConfigurationKeyError: !include error/DeploymentEmptyRequiredGlobalConfigurationKeyError.raml
74+
DeploymentInvalidTypeError: !include error/DeploymentInvalidTypeError.raml
75+
DeploymentProductionDeactivatedError: !include error/DeploymentProductionDeactivatedError.raml

0 commit comments

Comments
 (0)