Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subscription & events for Commonalities 0.5.0 #313

Open
wants to merge 33 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
c29aecc
Update event-subscription-template.yaml
bigludo7 Oct 10, 2024
1a24c53
Update API-design-guidelines.md
bigludo7 Oct 10, 2024
fc41bbe
Update API-design-guidelines.md
bigludo7 Oct 10, 2024
8bd8ef5
Update event-subscription-template.yaml
bigludo7 Oct 10, 2024
6030436
Update API-design-guidelines.md
bigludo7 Oct 10, 2024
fef315b
Update API-design-guidelines.md
bigludo7 Oct 10, 2024
f05f4d3
Update event-subscription-template.yaml
bigludo7 Oct 10, 2024
5156577
Update event-subscription-template.yaml
bigludo7 Oct 17, 2024
aa621fd
Update API-design-guidelines.md
bigludo7 Oct 17, 2024
8b8dab8
Update API-design-guidelines.md
bigludo7 Oct 17, 2024
e1c6ca8
Update artifacts/camara-cloudevents/event-subscription-template.yaml
bigludo7 Oct 18, 2024
2826855
Update artifacts/camara-cloudevents/event-subscription-template.yaml
bigludo7 Oct 18, 2024
f488c6d
Update documentation/API-design-guidelines.md
bigludo7 Oct 18, 2024
b00788b
Update documentation/API-design-guidelines.md
bigludo7 Oct 18, 2024
20343b3
Update documentation/API-design-guidelines.md
bigludo7 Oct 18, 2024
cd24b80
Update documentation/API-design-guidelines.md
bigludo7 Oct 18, 2024
53c052b
Update documentation/API-design-guidelines.md
bigludo7 Oct 18, 2024
9a61691
Update documentation/API-design-guidelines.md
bigludo7 Oct 18, 2024
cdc1ecd
Update documentation/API-design-guidelines.md
bigludo7 Oct 18, 2024
d0b4fc3
Update API-design-guidelines.md
bigludo7 Oct 18, 2024
e7d5444
Update API-design-guidelines.md
bigludo7 Oct 18, 2024
5d00751
Update API-design-guidelines.md
bigludo7 Oct 18, 2024
ee2a79f
Update documentation/API-design-guidelines.md
bigludo7 Oct 22, 2024
7db3e2c
Update documentation/API-design-guidelines.md
bigludo7 Oct 22, 2024
0acd0af
Update documentation/API-design-guidelines.md
bigludo7 Oct 22, 2024
93ee9ae
Update API-design-guidelines.md
bigludo7 Oct 22, 2024
754f3fd
Update event-subscription-template.yaml
bigludo7 Oct 29, 2024
c9c187e
Update event-subscription-template.yaml
bigludo7 Oct 29, 2024
cc80891
Update event-subscription-template.yaml
bigludo7 Oct 29, 2024
e61feaf
Update artifacts/camara-cloudevents/event-subscription-template.yaml
bigludo7 Oct 29, 2024
abf4e75
Update event-subscription-template.yaml
bigludo7 Oct 30, 2024
c9c344e
Update event-subscription-template.yaml
bigludo7 Nov 6, 2024
b435e82
Update event-subscription-template.yaml
bigludo7 Nov 12, 2024
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
61 changes: 29 additions & 32 deletions artifacts/camara-cloudevents/event-subscription-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ info:
description: |
This file is a template for CAMARA API explicit subscription endpoint and for Notification model. Additional information are provided in API Design Guidelines document.

Note on combined usage of `initialEvent` and `subscriptionMaxEvents`:
If an event is triggered following `initialEvent` set to `true`, this event will be counted towards `subscriptionMaxEvents` (if provided).

Note on ``security`` - ``openId`` scope: The value in this yaml `api-name:event-type:grant-level` must be replaced accordingly to the format defined in the guideline document.

license:
Expand All @@ -16,14 +19,13 @@ externalDocs:
description: Product documentation at CAMARA
url: https://github.com/camaraproject/
servers:
- url: "{apiRoot}/{apiName}/v0.1"
- url: "{apiRoot}/api-name/vx.y"
# api-name and version should valued accordingly to the API
variables:
apiRoot:
default: http://localhost:9091
description: API root
apiName:
default: camaraAPI
description: apiName will be replaced in WG by its value and not modelled as a variable
description: API root, defined by the service provider, e.g. `api.example.com` or `api.example.com/somepath`

tags:
- name: <apiName> Subscription
description: Operations to manage event subscriptions on event-type event
Expand Down Expand Up @@ -98,7 +100,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/Subscription"
$ref: "#/components/schemas/SubscriptionCreationResponse"
"202":
description: Request accepted to be processed. It applies for async creation process.
headers:
Expand All @@ -116,8 +118,6 @@ paths:
$ref: "#/components/responses/SubscriptionPermissionDenied403"
"409":
$ref: "#/components/responses/Generic409"
"415":
$ref: "#/components/responses/Generic415"
"422":
$ref: "#/components/responses/CreateSubscriptionUnprocessableEntity422"
"429":
Expand Down Expand Up @@ -460,6 +460,15 @@ components:
- org.camaraproject.api-name.v0.event-type
- org.camaraproject.api-name.v0.subscription-ends

SubscriptionCreationResponse:
description: Response for the POST request
type: object
required:
- id
properties:
id:
$ref: '#/components/schemas/SubscriptionId'

Subscription:
description: Represents a event-type subscription.
type: object
Expand All @@ -477,8 +486,6 @@ components:
format: url
description: The address to which events shall be delivered using the selected protocol.
example: "https://endpoint.example.com/sink"
sinkCredential:
$ref: '#/components/schemas/SinkCredential'
types:
description: |
Camara Event types eligible to be delivered by this subscription.
Expand Down Expand Up @@ -900,12 +907,6 @@ components:
status: 403
code: PERMISSION_DENIED
message: Client does not have sufficient permissions to perform this action.
GENERIC_403_INVALID_TOKEN_CONTEXT:
description: Reflect some inconsistency between information in some field of the API and the related OAuth2 Token
value:
status: 403
code: INVALID_TOKEN_CONTEXT
message: "{{field}} is not consistent with access token."
GENERIC_403_SUBSCRIPTION_MISMATCH:
value:
status: 403
Expand Down Expand Up @@ -965,22 +966,6 @@ components:
status: 410
code: GONE
message: Access to the target resource is no longer available.
Generic415:
description: Unsupported Media Type
headers:
X-Correlator:
$ref: "#/components/headers/x-correlator"
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorInfo"
examples:
GENERIC_415_UNSUPPORTED_MEDIA_TYPE:
description: Payload format of the request is in an unsupported format by the Server. Should not happen
value:
status: 415
code: UNSUPPORTED_MEDIA_TYPE
message: The server refuses to accept the request because the payload format is in an unsupported format
CreateSubscriptionUnprocessableEntity422:
description: Unprocessable Entity
headers:
Expand Down Expand Up @@ -1008,6 +993,18 @@ components:
status: 422
code: DEVICE_NOT_APPLICABLE
message: The service is not available for the provided device.
GENERIC_422_UNNECESSARY_IDENTIFIER:
description: An explicit identifier is provided when an API subject has already been identified from the access token
value:
status: 422
code: UNNECESSARY_IDENTIFIER
message: The device is already identified by the access
bigludo7 marked this conversation as resolved.
Show resolved Hide resolved
GENERIC_422_MISSING_IDENTIFIER:
description: An identifier is not included in the request and the API subject cannot be derived from the 3-legged access token
value:
status: 422
code: MISSING_IDENTIFIER
message: The device cannot be identified
Generic429:
description: Too Many Requests
headers:
Expand Down
Loading