Skip to content
Merged
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
34 changes: 27 additions & 7 deletions code/API_definitions/energy-footprint-notification.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ components:
Note: the maximum number of event types per subscription will be decided at API project level
type: array
minItems: 1
maxItems: 1
maxItems: 2
items:
$ref: "#/components/schemas/SubscriptionEventType"
config:
Expand All @@ -427,14 +427,32 @@ components:
propertyName: protocol
mapping:
HTTP: "#/components/schemas/HTTPSubscriptionRequest"
MQTT3: "#/components/schemas/MQTTSubscriptionRequest"
MQTT5: "#/components/schemas/MQTTSubscriptionRequest"
AMQP: "#/components/schemas/AMQPSubscriptionRequest"
NATS: "#/components/schemas/NATSSubscriptionRequest"
KAFKA: "#/components/schemas/ApacheKafkaSubscriptionRequest"
HTTPSubscriptionRequest:
allOf:
- $ref: "#/components/schemas/SubscriptionRequest"
- type: object
properties:
protocolSettings:
$ref: "#/components/schemas/HTTPSettings"
HTTPSettings:
type: object
properties:
headers:
type: object
description: |-
A set of key/value pairs that is copied into the HTTP request as custom headers.

NOTE: Use/Applicability of this concept has not been discussed in Commonalities under the scope of Meta Release v0.4. When required by an API project as an option to meet a UC/Requirement, please generate an issue for Commonalities discussion about it.
additionalProperties:
type: string
method:
type: string
description: The HTTP method to use for sending the message.
enum:
- POST
Protocol:
type: string
enum: ["HTTP", "MQTT3", "MQTT5", "AMQP", "NATS", "KAFKA"]
enum: ["HTTP"]
description: Identifier of a delivery protocol. Only HTTP is allowed for now
example: "HTTP"
Config:
Expand Down Expand Up @@ -695,7 +713,9 @@ components:
propertyName: "type"
mapping:
org.camaraproject.energy-footprint-notification.v1.energy: "#/components/schemas/CloudEventEnergy"
org.camaraproject.energy-footprint-notification.v1.energy.error: "#/components/schemas/CloudEventError"
org.camaraproject.energy-footprint-notification.v1.carbon-footprint: "#/components/schemas/CloudEventCarbonFootprint"
org.camaraproject.energy-footprint-notification.v1.carbon-footprint.error: "#/components/schemas/CloudEventError"
CloudEventEnergy:
description: provides back the energy consumption for the service. The
result of the analysis is a floating point number. The unit of measure
Expand Down