Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion code/API_definitions/device-data-volume-subscriptions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,7 @@ components:
sink:
type: string
format: uri
pattern: ^https:\/\/.+$
description: The address to which events shall be delivered using the selected protocol.
example: "https://endpoint.example.com/sink"
sinkCredential:
Expand Down Expand Up @@ -547,6 +548,7 @@ components:
sink:
type: string
format: uri
pattern: ^https:\/\/.+$
description: The address where events will be delivered using the selected protocol.
example: "https://endpoint.example.com/sink"
sinkCredential:
Expand Down Expand Up @@ -717,10 +719,11 @@ components:
- org.camaraproject.device-data-volume-subscriptions.v0.data-90-percent
- org.camaraproject.device-data-volume-subscriptions.v0.data-exceeded


SubscriptionAsync:
description: Response for a event-type subscription request managed asynchronously (Creation or Deletion)
type: object
required:
- id
properties:
id:
$ref: "#/components/schemas/SubscriptionId"
Expand Down Expand Up @@ -1086,6 +1089,7 @@ components:
- INVALID_PROTOCOL
- INVALID_CREDENTIAL
- INVALID_TOKEN
- INVALID_SINK
examples:
GENERIC_400_INVALID_ARGUMENT:
description: Invalid Argument. Generic Syntax Exception
Expand Down Expand Up @@ -1117,6 +1121,12 @@ components:
status: 400
code: INVALID_TOKEN
message: Only bearer token is supported
GENERIC_400_INVALID_SINK:
description: Invalid sink value
value:
status: 400
code: INVALID_SINK
message: sink not valid for the specified protocol

Generic400:
description: Problem with the client request
Expand Down
10 changes: 10 additions & 0 deletions code/Test_definitions/device-data-volume-subscriptions.feature
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,16 @@ Feature: Device Data Volume Subscriptions API, vwip - Operation createDeviceData
And the response property "$.code" is "INVALID_TOKEN"
And the response property "$.message" contains a user friendly text

@device_data_volume_subscriptions_400.7_create_subscription_with_invalid_sink
Scenario: subscription creation with invalid sink
Given the request body is compliant with the schema "#/components/schemas/SubscriptionRequest"
And the request property "$.sink" is not matching the defined pattern
When the request "createDeviceDataVolumeSubscription" is sent
Then the response status code is 400
And the response property "$.status" is 400
And the response property "$.code" is "INVALID_SINK"
And the response property "$.message" contains a user friendly text

##################
# Error code 401
##################
Expand Down