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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
openapi: 3.0.3

Check warning on line 1 in code/API_definitions/connectivity-insights-subscriptions.yaml

View workflow job for this annotation

GitHub Actions / validation / Validate

CloudEvent should be $ref

[P-020] CloudEvent is defined inline in code/API_definitions/connectivity-insights-subscriptions.yaml. Consume the shared schema from CAMARA_event_common.yaml via $ref instead of maintaining a local copy. | Suggestion%3A Replace the local CloudEvent schema with `$ref%3A './CAMARA_event_common.yaml#/components/schemas/CloudEvent'`, or an allOf combining the $ref with an API-specific ApiEventType schema. See implicit-events API template in Commonalities artifacts/api-templates/.
info:
title: Connectivity Insights Subscriptions
version: wip
Expand Down Expand Up @@ -196,7 +196,7 @@
- $ref: "#/components/parameters/x-correlator"
requestBody:
required: true
content:

Check warning on line 199 in code/API_definitions/connectivity-insights-subscriptions.yaml

View workflow job for this annotation

GitHub Actions / validation / Validate

Notification must use application/cloudevents+json

[S-035] Notification callback content type must include 'application/cloudevents+json', found%3A application/cloudevents+json%3A
application/cloudevents+json::
schema:
$ref: "#/components/schemas/CloudEvent"
Expand Down Expand Up @@ -275,7 +275,7 @@
$ref: "#/components/headers/x-correlator"
content:
application/json:
schema:

Check warning on line 278 in code/API_definitions/connectivity-insights-subscriptions.yaml

View workflow job for this annotation

GitHub Actions / validation / Validate

Array must declare maxItems

[S-309] Schema of type array must specify maxItems. | Suggestion%3A Add maxItems to constrain array size (CAMARA Design Guide section 2.2).
type: array
minItems: 0
items:
Expand Down Expand Up @@ -390,7 +390,7 @@
schema:
$ref: "#/components/schemas/XCorrelator"
schemas:
XCorrelator:

Check warning on line 393 in code/API_definitions/connectivity-insights-subscriptions.yaml

View workflow job for this annotation

GitHub Actions / validation / Validate

String must declare maxLength

[S-312] Schema of type string must specify maxLength, enum, or const. | Suggestion%3A Add maxLength, enum, or const to string properties (CAMARA Design Guide section 2.2).

Check warning on line 393 in code/API_definitions/connectivity-insights-subscriptions.yaml

View workflow job for this annotation

GitHub Actions / validation / Validate

Schema property must have a description

[S-011] Property description is missing or empty%3A "XCorrelator.description" property must be truthy
type: string
pattern: ^[a-zA-Z0-9-_:;.\/<>{}]{0,256}$
example: "b4333c46-49c0-4f62-80d7-f0ef930f1c46"
Expand Down Expand Up @@ -422,7 +422,7 @@
Subscription:
description: Represents a event-type subscription.
type: object
required:

Check warning on line 425 in code/API_definitions/connectivity-insights-subscriptions.yaml

View workflow job for this annotation

GitHub Actions / validation / Validate

Required property not defined in properties

[S-030] Required property 'id' is not defined in 'properties'
- sink
- protocol
- config
Expand All @@ -432,7 +432,7 @@
properties:
protocol:
$ref: "#/components/schemas/Protocol"
sink:

Check warning on line 435 in code/API_definitions/connectivity-insights-subscriptions.yaml

View workflow job for this annotation

GitHub Actions / validation / Validate

String must declare maxLength

[S-312] Schema of type string must specify maxLength, enum, or const. | Suggestion%3A Add maxLength, enum, or const to string properties (CAMARA Design Guide section 2.2).
type: string
format: uri
pattern: ^https:\/\/.+$
Expand All @@ -450,18 +450,18 @@
$ref: "#/components/schemas/SubscriptionEventType"
config:
$ref: "#/components/schemas/Config"
subscriptionId:

Check warning on line 453 in code/API_definitions/connectivity-insights-subscriptions.yaml

View workflow job for this annotation

GitHub Actions / validation / Validate

String must declare maxLength

[S-312] Schema of type string must specify maxLength, enum, or const. | Suggestion%3A Add maxLength, enum, or const to string properties (CAMARA Design Guide section 2.2).
type: string
description: |
When this information is contained within an event notification, it SHALL be referred to as `subscriptionId` as per the Commonalities Event Notification Model.
example: qs15-h556-rt89-1298
startsAt:

Check warning on line 458 in code/API_definitions/connectivity-insights-subscriptions.yaml

View workflow job for this annotation

GitHub Actions / validation / Validate

String must declare maxLength

[S-312] Schema of type string must specify maxLength, enum, or const. | Suggestion%3A Add maxLength, enum, or const to string properties (CAMARA Design Guide section 2.2).
type: string
format: date-time
description: Date when the event subscription will begin/began
It must follow [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) and must have time zone.
example: "2023-07-03T12:27:08.312Z"
expiresAt:

Check warning on line 464 in code/API_definitions/connectivity-insights-subscriptions.yaml

View workflow job for this annotation

GitHub Actions / validation / Validate

String must declare maxLength

[S-312] Schema of type string must specify maxLength, enum, or const. | Suggestion%3A Add maxLength, enum, or const to string properties (CAMARA Design Guide section 2.2).
type: string
format: date-time
description: |
Expand Down Expand Up @@ -872,6 +872,7 @@
example: "https://notificationSendServer12.supertelco.com"
CloudEvent:
description: The Cloud-Event used for the callback.
type: object
required:
- id
- source
Expand Down
1 change: 1 addition & 0 deletions code/API_definitions/connectivity-insights.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,7 @@ components:
DeviceResponseBody:
description: |
The optional device identifier to include in the response
type: object
properties:
device:
description: |
Expand Down