diff --git a/CHANGELOG/CHANGELOG-r2.md b/CHANGELOG/CHANGELOG-r2.md index 95243bd..2063419 100644 --- a/CHANGELOG/CHANGELOG-r2.md +++ b/CHANGELOG/CHANGELOG-r2.md @@ -2,6 +2,7 @@ ## Table of Contents +- **[r2.3](#r23)** - [r2.2](#r22) @@ -14,6 +15,103 @@ The below sections record the changes for each API version in each release as fo * for subsequent release-candidate(s), only the delta to the previous release-candidate * for a public release, the consolidated changes since the previous public release +# r2.3 + +## Release Notes + +This public release contains the definition and documentation of +* network-slice-booking 0.2.0 +* network-slice-assignment 0.1.0 + +The API definition(s) are based on +* Commonalities 0.8.0 +* Identity and Consent Management 0.5.0 + + +> **Working area — candidate changes (auto-removed on merge)** +> Copy relevant entries into the Added/Changed/Fixed/Removed sections below. +> You may edit this list while triaging; it will be removed on merge. +> This working-area section is removed automatically when the PR is merged. + +
+Candidate changes (auto-generated from merged PRs) + +## What's Changed +* Network slice assignment v2 by @XunliYang in https://github.com/camaraproject/NetworkSliceBooking/pull/87 +* Add the network-slice-assignment API user story by @XunliYang in https://github.com/camaraproject/NetworkSliceBooking/pull/88 +* Reset API version in main branch to wip by @XunliYang in https://github.com/camaraproject/NetworkSliceBooking/pull/90 +* [bulk] Sync Release Information section (2025-12-12-001) by @hdamker-bot in https://github.com/camaraproject/NetworkSliceBooking/pull/91 +* Split NetworkSliceBooking422-SERVICE_NOT_APPLICABLE into SERVICE_AREA_NOT_SUPPORTED and RESOURCES_INSUFFICIENT by @XunliYang in https://github.com/camaraproject/NetworkSliceBooking/pull/92 +* Modify network-slice-assignment API Path and Feature Files by @XunliYang in https://github.com/camaraproject/NetworkSliceBooking/pull/96 +* Update and align with CAMARA Commonalities 0.7 by @XunliYang in https://github.com/camaraproject/NetworkSliceBooking/pull/98 +* [bulk] Add release-plan.yaml (2026-02-23-001) by @hdamker-bot in https://github.com/camaraproject/NetworkSliceBooking/pull/99 +* Release r2.1 with NSB v0.2.0-rc.1 and NSA v0.1.0-rc.1 by @XunliYang in https://github.com/camaraproject/NetworkSliceBooking/pull/93 +* update release-plan by @XunliYang in https://github.com/camaraproject/NetworkSliceBooking/pull/100 +* Reset API and test code version information in main branch to wip by @hdamker in https://github.com/camaraproject/NetworkSliceBooking/pull/103 +* [bulk] Enable release automation process (2026-03-12-001) by @camara-release-automation[bot] in https://github.com/camaraproject/NetworkSliceBooking/pull/104 +* [bulk] Enable release automation and validation (2026-04-10-001) by @camara-release-automation[bot] in https://github.com/camaraproject/NetworkSliceBooking/pull/105 +* [bulk] Update release-automation + validation callers by @camara-release-automation[bot] in https://github.com/camaraproject/NetworkSliceBooking/pull/106 +* Fix questions in commonalities r4.2 by @XunliYang in https://github.com/camaraproject/NetworkSliceBooking/pull/108 +* Update Spring26 M4 release plan to public-release by @XunliYang in https://github.com/camaraproject/NetworkSliceBooking/pull/110 +* Sync common files from Commonalities r4.2 by @camara-release-automation[bot] in https://github.com/camaraproject/NetworkSliceBooking/pull/111 +* Modify r2.2 release plan from public back to release-candidate by @XunliYang in https://github.com/camaraproject/NetworkSliceBooking/pull/114 +* Update API definitions with corrected defaults and schema constraints-align with commonalities r4.2 by @XunliYang in https://github.com/camaraproject/NetworkSliceBooking/pull/116 +* [bulk] Update release-automation + validation callers by @camara-release-automation[bot] in https://github.com/camaraproject/NetworkSliceBooking/pull/118 +* Fix validation issues: Adopt Commonalities r4.2 $refs for common event schemas by @XunliYang in https://github.com/camaraproject/NetworkSliceBooking/pull/120 +* Release Automation: Post-release sync (r2.2) by @camara-release-automation[bot] in https://github.com/camaraproject/NetworkSliceBooking/pull/125 +* Update release-plan to public release by @XunliYang in https://github.com/camaraproject/NetworkSliceBooking/pull/127 +* Align with Commonalities r4.3 - Add mandatory templates and fix schemas by @XunliYang in https://github.com/camaraproject/NetworkSliceBooking/pull/130 +* Sync common files from Commonalities r4.3 by @camara-release-automation[bot] in https://github.com/camaraproject/NetworkSliceBooking/pull/132 + +
+ + +## network-slice-booking 0.2.0 + +**network-slice-booking 0.2.0 is the second public version of the Network Slice Booking API.** + +- API definition **with inline documentation**: + - [View it on ReDoc](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/camaraproject/NetworkSliceBooking/r2.3/code/API_definitions/network-slice-booking.yaml&nocors) + - [View it on Swagger Editor](https://camaraproject.github.io/swagger-ui/?url=https://raw.githubusercontent.com/camaraproject/NetworkSliceBooking/r2.3/code/API_definitions/network-slice-booking.yaml) + - OpenAPI [YAML spec file](https://github.com/camaraproject/NetworkSliceBooking/blob/r2.3/code/API_definitions/network-slice-booking.yaml) + +### Added + +* Align with Commonalities r4.3 - Add mandatory templates and fix schemas in [#130](https://github.com/camaraproject/NetworkSliceBooking/pull/130) + +### Changed + +* Update API definitions with corrected defaults and schema constraints aligning with Commonalities r4.2 in [#116](https://github.com/camaraproject/NetworkSliceBooking/pull/116) +* Replace inline CloudEvent + sink-credential schemas and inline area / geometry schemas with $refs into CAMARA_event_common.yaml in [#120](https://github.com/camaraproject/NetworkSliceBooking/pull/120) + +### Removed + +* Remove the local schema definitions for CloudEvent, sink-credential, area and geometry in favor of $refs into CAMARA_event_common.yaml in [#120](https://github.com/camaraproject/NetworkSliceBooking/pull/120) + +## network-slice-assignment 0.1.0 + +**network-slice-assignment 0.1.0 is the initial public version of the Network Slice Assignment API.** + +- API definition **with inline documentation**: + - [View it on ReDoc](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/camaraproject/NetworkSliceBooking/r2.3/code/API_definitions/network-slice-assignment.yaml&nocors) + - [View it on Swagger Editor](https://camaraproject.github.io/swagger-ui/?url=https://raw.githubusercontent.com/camaraproject/NetworkSliceBooking/r2.3/code/API_definitions/network-slice-assignment.yaml) + - OpenAPI [YAML spec file](https://github.com/camaraproject/NetworkSliceBooking/blob/r2.3/code/API_definitions/network-slice-assignment.yaml) + +### Added + +* Align with Commonalities r4.3 - Add mandatory templates and fix schemas in [#130](https://github.com/camaraproject/NetworkSliceBooking/pull/130) + +### Changed + +* Update API definitions with corrected defaults and schema constraints aligning with Commonalities r4.2 in [#116](https://github.com/camaraproject/NetworkSliceBooking/pull/116) +* Replace inline CloudEvent + sink-credential schemas and inline area / geometry schemas with $refs into CAMARA_event_common.yaml in [#120](https://github.com/camaraproject/NetworkSliceBooking/pull/120) + +### Removed + +* Remove the local schema definitions for CloudEvent, sink-credential, area and geometry in favor of $refs into CAMARA_event_common.yaml in [#120](https://github.com/camaraproject/NetworkSliceBooking/pull/120) + +**Full Changelog**: https://github.com/camaraproject/NetworkSliceBooking/compare/r1.2...r2.3 + # r2.2 ## Release Notes diff --git a/README.md b/README.md index 2e34e3e..ffe4233 100644 --- a/README.md +++ b/README.md @@ -29,23 +29,16 @@ Sandbox API Repository to describe, develop, document, and test the NetworkSlice > [!NOTE] > Please be aware that the project will have frequent updates to the main branch. There are no compatibility guarantees associated with code in any branch, including main, until a new release is created. For example, changes may be reverted before a release is created. **For best results, use the latest available release**. -* The latest public release is [r1.2](https://github.com/camaraproject/NetworkSliceBooking/releases/tag/r1.2), with the following API versions: - * **network-slice-booking 0.1.0** - [[YAML]](https://github.com/camaraproject/NetworkSliceBooking/blob/r1.2/code/API_definitions/network-slice-booking.yaml) [[ReDoc]](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/camaraproject/NetworkSliceBooking/r1.2/code/API_definitions/network-slice-booking.yaml&nocors) [[Swagger]](https://camaraproject.github.io/swagger-ui/?url=https://raw.githubusercontent.com/camaraproject/NetworkSliceBooking/r1.2/code/API_definitions/network-slice-booking.yaml) +* The latest public release is [r2.3](https://github.com/camaraproject/NetworkSliceBooking/releases/tag/r2.3) (Spring26), with the following API versions: + * **network-slice-booking 0.2.0** + [[YAML]](https://github.com/camaraproject/NetworkSliceBooking/blob/r2.3/code/API_definitions/network-slice-booking.yaml) [[ReDoc]](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/camaraproject/NetworkSliceBooking/r2.3/code/API_definitions/network-slice-booking.yaml&nocors) [[Swagger]](https://camaraproject.github.io/swagger-ui/?url=https://raw.githubusercontent.com/camaraproject/NetworkSliceBooking/r2.3/code/API_definitions/network-slice-booking.yaml) + * **network-slice-assignment 0.1.0** + [[YAML]](https://github.com/camaraproject/NetworkSliceBooking/blob/r2.3/code/API_definitions/network-slice-assignment.yaml) [[ReDoc]](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/camaraproject/NetworkSliceBooking/r2.3/code/API_definitions/network-slice-assignment.yaml&nocors) [[Swagger]](https://camaraproject.github.io/swagger-ui/?url=https://raw.githubusercontent.com/camaraproject/NetworkSliceBooking/r2.3/code/API_definitions/network-slice-assignment.yaml) * The latest public release is always available here: https://github.com/camaraproject/NetworkSliceBooking/releases/latest * Other releases of this repository are available in https://github.com/camaraproject/NetworkSliceBooking/releases * For changes see [CHANGELOG](https://github.com/camaraproject/NetworkSliceBooking/tree/main/CHANGELOG) -### Upcoming Release Preview - -* Pre-release: [r2.2](https://github.com/camaraproject/NetworkSliceBooking/releases/tag/r2.2) (release candidate) - * **network-slice-booking 0.2.0-rc.2** - [[YAML]](https://github.com/camaraproject/NetworkSliceBooking/blob/r2.2/code/API_definitions/network-slice-booking.yaml) [[ReDoc]](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/camaraproject/NetworkSliceBooking/r2.2/code/API_definitions/network-slice-booking.yaml&nocors) [[Swagger]](https://camaraproject.github.io/swagger-ui/?url=https://raw.githubusercontent.com/camaraproject/NetworkSliceBooking/r2.2/code/API_definitions/network-slice-booking.yaml) - * **network-slice-assignment 0.1.0-rc.2** - [[YAML]](https://github.com/camaraproject/NetworkSliceBooking/blob/r2.2/code/API_definitions/network-slice-assignment.yaml) [[ReDoc]](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/camaraproject/NetworkSliceBooking/r2.2/code/API_definitions/network-slice-assignment.yaml&nocors) [[Swagger]](https://camaraproject.github.io/swagger-ui/?url=https://raw.githubusercontent.com/camaraproject/NetworkSliceBooking/r2.2/code/API_definitions/network-slice-assignment.yaml) - - _The above section is automatically synchronized by CAMARA project-administration._ diff --git a/code/API_definitions/network-slice-assignment.yaml b/code/API_definitions/network-slice-assignment.yaml index 3d166a1..4c5ee1a 100644 --- a/code/API_definitions/network-slice-assignment.yaml +++ b/code/API_definitions/network-slice-assignment.yaml @@ -64,17 +64,13 @@ info: This API rejects requests with JSON request bodies that contain properties not declared in this specification, at any nesting level. Unknown properties result in a `400 INVALID_ARGUMENT` response. - - version: wip + version: 0.1.0 x-camara-commonalities: 0.8.0 license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html -externalDocs: - description: Project documentation at CAMARA - url: https://github.com/camaraproject/NetworkSliceBooking servers: - - url: "{apiRoot}/network-slice-assignment/vwip" + - url: '{apiRoot}/network-slice-assignment/v0.1' variables: apiRoot: default: http://localhost:9091 @@ -82,6 +78,9 @@ servers: tags: - name: Network Slice Assignment description: Manage Network Slice Assignment +externalDocs: + description: Project documentation at CAMARA + url: https://github.com/camaraproject/NetworkSliceBooking paths: /slices/{sliceId}/devices: post: @@ -104,23 +103,23 @@ paths: - openId: - network-slice-assignment:devices:assign parameters: - - $ref: "#/components/parameters/sliceId" - - $ref: "#/components/parameters/x-correlator" + - $ref: '#/components/parameters/sliceId' + - $ref: '#/components/parameters/x-correlator' requestBody: description: Parameters to assign a device to a network slice content: application/json: schema: - $ref: "#/components/schemas/DeviceInput" + $ref: '#/components/schemas/DeviceInput' examples: ASSIGN_DEVICE_INPUT_ALL: - $ref: "#/components/examples/ASSIGN_DEVICE_INPUT_ALL" + $ref: '#/components/examples/ASSIGN_DEVICE_INPUT_ALL' ASSIGN_DEVICE_INPUT_NUMBER: - $ref: "#/components/examples/ASSIGN_DEVICE_INPUT_NUMBER" + $ref: '#/components/examples/ASSIGN_DEVICE_INPUT_NUMBER' required: true callbacks: networkSliceAssignmentSinkCallback: - "{request.body#/sink}": + '{request.body#/sink}': post: tags: - Network Slice Assignment Callback @@ -131,68 +130,67 @@ paths: content: application/cloudevents+json: schema: - $ref: "#/components/schemas/ApiNotificationEvent" + $ref: '#/components/schemas/ApiNotificationEvent' examples: ASSIGNMENT_COMPLETED_EVENT: - $ref: "#/components/examples/ASSIGNMENT_COMPLETED_EVENT" + $ref: '#/components/examples/ASSIGNMENT_COMPLETED_EVENT' ASSIGNMENT_DEVICE_EXCEED_EVENT: - $ref: "#/components/examples/ASSIGNMENT_DEVICE_EXCEED_EVENT" + $ref: '#/components/examples/ASSIGNMENT_DEVICE_EXCEED_EVENT' required: true responses: - "204": + '204': description: Successful notification headers: x-correlator: - $ref: "#/components/headers/x-correlator" - "400": - $ref: "#/components/responses/Generic400" - "401": - $ref: "#/components/responses/Generic401" - "403": - $ref: "#/components/responses/Generic403" - "410": - $ref: "#/components/responses/Generic410" - "429": - $ref: "#/components/responses/Generic429" + $ref: '#/components/headers/x-correlator' + '400': + $ref: '#/components/responses/Generic400' + '401': + $ref: '#/components/responses/Generic401' + '403': + $ref: '#/components/responses/Generic403' + '410': + $ref: '#/components/responses/Generic410' + '429': + $ref: '#/components/responses/Generic429' security: - {} - notificationsBearerAuth: [] responses: - "201": + '201': description: The result of the device assignment operation headers: x-correlator: - $ref: "#/components/headers/x-correlator" + $ref: '#/components/headers/x-correlator' content: application/json: schema: - $ref: "#/components/schemas/DeviceAssignmentInfo" + $ref: '#/components/schemas/DeviceAssignmentInfo' examples: ASSIGN_DEVICE_SUCCESSFUL: - $ref: "#/components/examples/ASSIGN_DEVICE_SUCCESSFUL" + $ref: '#/components/examples/ASSIGN_DEVICE_SUCCESSFUL' ASSIGN_DEVICE_FAILURE_EXCEEDED: - $ref: "#/components/examples/ASSIGN_DEVICE_FAILURE_EXCEEDED" + $ref: '#/components/examples/ASSIGN_DEVICE_FAILURE_EXCEEDED' ASSIGN_DEVICE_ALREADY_ASSIGNED: - $ref: "#/components/examples/ASSIGN_DEVICE_ALREADY_ASSIGNED" + $ref: '#/components/examples/ASSIGN_DEVICE_ALREADY_ASSIGNED' ASSIGN_DEVICE_SLICE_NOT_FOUND: - $ref: "#/components/examples/ASSIGN_DEVICE_SLICE_NOT_FOUND" + $ref: '#/components/examples/ASSIGN_DEVICE_SLICE_NOT_FOUND' ASSIGN_DEVICE_UNKNOWN_ERROR: - $ref: "#/components/examples/ASSIGN_DEVICE_UNKNOWN_ERROR" + $ref: '#/components/examples/ASSIGN_DEVICE_UNKNOWN_ERROR' ASSIGN_DEVICE_PENDING: - $ref: "#/components/examples/ASSIGN_DEVICE_PENDING" - "400": - $ref: "#/components/responses/Generic400" - "401": - $ref: "#/components/responses/Generic401" - "403": - $ref: "#/components/responses/Generic403" - "404": - $ref: "#/components/responses/Generic404" - "422": - $ref: "#/components/responses/Generic422" - "429": - $ref: "#/components/responses/Generic429" - + $ref: '#/components/examples/ASSIGN_DEVICE_PENDING' + '400': + $ref: '#/components/responses/Generic400' + '401': + $ref: '#/components/responses/Generic401' + '403': + $ref: '#/components/responses/Generic403' + '404': + $ref: '#/components/responses/Generic404' + '422': + $ref: '#/components/responses/Generic422' + '429': + $ref: '#/components/responses/Generic429' get: tags: - Network Slice Assignment @@ -204,32 +202,31 @@ paths: - openId: - network-slice-assignment:devices:get parameters: - - $ref: "#/components/parameters/sliceId" - - $ref: "#/components/parameters/x-correlator" + - $ref: '#/components/parameters/sliceId' + - $ref: '#/components/parameters/x-correlator' responses: - "200": + '200': description: Contains information about active slice headers: x-correlator: - $ref: "#/components/headers/x-correlator" + $ref: '#/components/headers/x-correlator' content: application/json: schema: - $ref: "#/components/schemas/SliceDevices" + $ref: '#/components/schemas/SliceDevices' examples: GET_DEVICES_SUCCESSFUL: - $ref: "#/components/examples/GET_DEVICES_SUCCESSFUL" - "400": - $ref: "#/components/responses/Generic400" - "401": - $ref: "#/components/responses/Generic401" - "403": - $ref: "#/components/responses/Generic403" - "404": - $ref: "#/components/responses/Generic404" - "429": - $ref: "#/components/responses/Generic429" - + $ref: '#/components/examples/GET_DEVICES_SUCCESSFUL' + '400': + $ref: '#/components/responses/Generic400' + '401': + $ref: '#/components/responses/Generic401' + '403': + $ref: '#/components/responses/Generic403' + '404': + $ref: '#/components/responses/Generic404' + '429': + $ref: '#/components/responses/Generic429' /slices/{sliceId}/release: post: tags: @@ -249,52 +246,51 @@ paths: - openId: - network-slice-assignment:devices:delete parameters: - - $ref: "#/components/parameters/sliceId" - - $ref: "#/components/parameters/x-correlator" + - $ref: '#/components/parameters/sliceId' + - $ref: '#/components/parameters/x-correlator' requestBody: description: Parameters to release a device from a network slice content: application/json: schema: - $ref: "#/components/schemas/ReleaseDeviceInput" + $ref: '#/components/schemas/ReleaseDeviceInput' examples: RELEASE_DEVICE_INPUT_ALL: - $ref: "#/components/examples/RELEASE_DEVICE_INPUT_ALL" + $ref: '#/components/examples/RELEASE_DEVICE_INPUT_ALL' RELEASE_DEVICE_INPUT_NUMBER: - $ref: "#/components/examples/RELEASE_DEVICE_INPUT_NUMBER" + $ref: '#/components/examples/RELEASE_DEVICE_INPUT_NUMBER' required: true responses: - "200": + '200': description: The result of the device release operation headers: x-correlator: - $ref: "#/components/headers/x-correlator" + $ref: '#/components/headers/x-correlator' content: application/json: schema: - $ref: "#/components/schemas/DeviceReleaseInfo" + $ref: '#/components/schemas/DeviceReleaseInfo' examples: RELEASE_DEVICE_SUCCESSFUL: - $ref: "#/components/examples/RELEASE_DEVICE_SUCCESSFUL" + $ref: '#/components/examples/RELEASE_DEVICE_SUCCESSFUL' RELEASE_DEVICE_ALREADY_RELEASED: - $ref: "#/components/examples/RELEASE_DEVICE_ALREADY_RELEASED" + $ref: '#/components/examples/RELEASE_DEVICE_ALREADY_RELEASED' RELEASE_DEVICE_SLICE_NOT_FOUND: - $ref: "#/components/examples/RELEASE_DEVICE_SLICE_NOT_FOUND" + $ref: '#/components/examples/RELEASE_DEVICE_SLICE_NOT_FOUND' RELEASE_DEVICE_UNKNOWN_ERROR: - $ref: "#/components/examples/RELEASE_DEVICE_UNKNOWN_ERROR" - "400": - $ref: "#/components/responses/Generic400" - "401": - $ref: "#/components/responses/Generic401" - "403": - $ref: "#/components/responses/Generic403" - "404": - $ref: "#/components/responses/Generic404" - "422": - $ref: "#/components/responses/Generic422" - "429": - $ref: "#/components/responses/Generic429" - + $ref: '#/components/examples/RELEASE_DEVICE_UNKNOWN_ERROR' + '400': + $ref: '#/components/responses/Generic400' + '401': + $ref: '#/components/responses/Generic401' + '403': + $ref: '#/components/responses/Generic403' + '404': + $ref: '#/components/responses/Generic404' + '422': + $ref: '#/components/responses/Generic422' + '429': + $ref: '#/components/responses/Generic429' /retrieve-slices: post: tags: @@ -307,40 +303,40 @@ paths: - openId: - network-slice-assignment:devices:retrieve parameters: - - $ref: "#/components/parameters/x-correlator" + - $ref: '#/components/parameters/x-correlator' requestBody: description: Parameters to retrieve slices by device content: application/json: schema: - $ref: "#/components/schemas/Device" + $ref: '#/components/schemas/Device' examples: RETRIEVE_INPUT_PHONENUMBER: - $ref: "#/components/examples/RETRIEVE_INPUT_PHONENUMBER" + $ref: '#/components/examples/RETRIEVE_INPUT_PHONENUMBER' required: true responses: - "200": + '200': description: List of slices the device is assigned headers: x-correlator: - $ref: "#/components/headers/x-correlator" + $ref: '#/components/headers/x-correlator' content: application/json: schema: - $ref: "#/components/schemas/RetrievedSlicesOutput" + $ref: '#/components/schemas/RetrievedSlicesOutput' examples: RETRIEVE_SUCCESSFUL: - $ref: "#/components/examples/RETRIEVE_SUCCESSFUL" - "400": - $ref: "#/components/responses/Generic400" - "401": - $ref: "#/components/responses/Generic401" - "403": - $ref: "#/components/responses/Generic403" - "404": - $ref: "#/components/responses/Generic404" - "429": - $ref: "#/components/responses/Generic429" + $ref: '#/components/examples/RETRIEVE_SUCCESSFUL' + '400': + $ref: '#/components/responses/Generic400' + '401': + $ref: '#/components/responses/Generic401' + '403': + $ref: '#/components/responses/Generic403' + '404': + $ref: '#/components/responses/Generic404' + '429': + $ref: '#/components/responses/Generic429' components: securitySchemes: openId: @@ -351,36 +347,33 @@ components: description: Bearer authentication for notifications type: http scheme: bearer - bearerFormat: "{$request.body#sinkCredential.credentialType}" - + bearerFormat: '{$request.body#sinkCredential.credentialType}' parameters: x-correlator: name: x-correlator in: header description: Correlation id for the different services schema: - $ref: "#/components/schemas/XCorrelator" + $ref: '#/components/schemas/XCorrelator' sliceId: name: sliceId in: path description: Slice ID that was obtained from the createSlice operation required: true schema: - $ref: "#/components/schemas/SliceId" - + $ref: '#/components/schemas/SliceId' headers: x-correlator: description: Correlation id for the different services schema: - $ref: "#/components/schemas/XCorrelator" - + $ref: '#/components/schemas/XCorrelator' schemas: XCorrelator: description: Value for the x-correlator type: string pattern: ^[a-zA-Z0-9-_:;.\/<>{}]{0,256}$ maxLength: 256 - example: "b4333c46-49c0-4f62-80d7-f0ef930f1c46" + example: b4333c46-49c0-4f62-80d7-f0ef930f1c46 SliceId: description: Slice ID in UUID format type: string @@ -394,17 +387,17 @@ components: type: object properties: device: - $ref: "#/components/schemas/Device" + $ref: '#/components/schemas/Device' sink: type: string format: uri maxLength: 2048 description: The URL where the API response will be asynchronously delivered, using the HTTP protocol. - example: "https://endpoint.example.com/sink" + example: https://endpoint.example.com/sink sinkCredential: description: A sink credential provides authentication or authorization information necessary to enable delivery of events to a target. allOf: - - $ref: "../common/CAMARA_event_common.yaml#/components/schemas/SinkCredential" + - $ref: '#/components/schemas/SinkCredential' Device: description: | End-user equipment able to connect to a mobile network. Examples of devices include smartphones or IoT sensors/actuators. @@ -418,36 +411,33 @@ components: type: object properties: phoneNumber: - $ref: "#/components/schemas/PhoneNumber" + $ref: '#/components/schemas/PhoneNumber' networkAccessIdentifier: - $ref: "#/components/schemas/NetworkAccessIdentifier" + $ref: '#/components/schemas/NetworkAccessIdentifier' ipv4Address: - $ref: "#/components/schemas/DeviceIpv4Address" + $ref: '#/components/schemas/DeviceIpv4Address' ipv6Address: - $ref: "#/components/schemas/DeviceIpv6Address" + $ref: '#/components/schemas/DeviceIpv6Address' minProperties: 1 DeviceResponse: description: | An identifier for the end-user equipment able to connect to the network that the response refers to. This parameter is only returned when the API consumer includes the `device` parameter in their request (i.e. they are using a two-legged access token), and is relevant when more than one device identifier is specified, as only one of those device identifiers is allowed in the response. If the API consumer provides more than one device identifier in their request, and this schema is included in the response definition, the API provider MUST use it to return a single identifier which is the one they are using to fulfil the request, even if the identifiers do not match the same device. API provider does not perform any logic to validate/correlate that the indicated device identifiers match the same device. No error should be returned if the identifiers are otherwise valid to prevent API consumers correlating different identifiers with a given end user. - allOf: - - $ref: "#/components/schemas/Device" + - $ref: '#/components/schemas/Device' - maxProperties: 1 PhoneNumber: description: A public identifier addressing a telephone subscription. In mobile networks it corresponds to the MSISDN (Mobile Station International Subscriber Directory Number). In order to be globally unique it has to be formatted in international format, according to E.164 standard, prefixed with '+'. type: string - pattern: '^\+[1-9][0-9]{4,14}$' + pattern: ^\+[1-9][0-9]{4,14}$ maxLength: 16 - example: "+123456789" - + example: '+123456789' NetworkAccessIdentifier: description: A public identifier addressing a subscription in a mobile network. In 3GPP terminology, it corresponds to the GPSI formatted with the External Identifier ({Local Identifier}@{Domain Identifier}). Unlike the telephone number, the network access identifier is not subjected to portability ruling in force, and is individually managed by each operator. type: string maxLength: 2048 - example: "123456789@example.com" - + example: 123456789@example.com DeviceIpv4Address: type: object description: | @@ -460,31 +450,33 @@ components: In all cases, publicAddress must be specified, along with at least one of either privateAddress or publicPort, dependent upon which is known. In general, mobile devices cannot be identified by their public IPv4 address alone. properties: publicAddress: - $ref: "#/components/schemas/SingleIpv4Address" + $ref: '#/components/schemas/SingleIpv4Address' privateAddress: - $ref: "#/components/schemas/SingleIpv4Address" + $ref: '#/components/schemas/SingleIpv4Address' publicPort: - $ref: "#/components/schemas/Port" + $ref: '#/components/schemas/Port' anyOf: - - required: [publicAddress, privateAddress] - - required: [publicAddress, publicPort] + - required: + - publicAddress + - privateAddress + - required: + - publicAddress + - publicPort example: - publicAddress: "84.125.93.10" + publicAddress: 84.125.93.10 publicPort: 59765 SingleIpv4Address: description: A single IPv4 address with no subnet mask type: string format: ipv4 maxLength: 15 - example: "84.125.93.10" - + example: 84.125.93.10 Port: description: TCP or UDP port number type: integer format: int32 minimum: 1 maximum: 65535 - DeviceIpv6Address: description: | The device should be identified by the observed IPv6 address, or by any single IPv6 address from within the subnet allocated to the device (e.g. adding ::0 to the /64 prefix). @@ -492,13 +484,12 @@ components: format: ipv6 maxLength: 45 example: 2001:db8:85a3:8d3:1319:8a2e:370:7344 - ReleaseDeviceInput: description: Request to release a device from a slice type: object properties: device: - $ref: "#/components/schemas/Device" + $ref: '#/components/schemas/Device' required: - device DeviceAssignmentInfo: @@ -509,13 +500,13 @@ components: type: object properties: device: - $ref: "#/components/schemas/DeviceResponse" + $ref: '#/components/schemas/DeviceResponse' sliceId: - $ref: "#/components/schemas/SliceId" + $ref: '#/components/schemas/SliceId' status: - $ref: "#/components/schemas/AssignmentStatus" + $ref: '#/components/schemas/AssignmentStatus' statusInfo: - $ref: "#/components/schemas/AssignmentStatusInfo" + $ref: '#/components/schemas/AssignmentStatusInfo' required: - sliceId - status @@ -555,13 +546,13 @@ components: type: object properties: device: - $ref: "#/components/schemas/DeviceResponse" + $ref: '#/components/schemas/DeviceResponse' sliceId: - $ref: "#/components/schemas/SliceId" + $ref: '#/components/schemas/SliceId' status: - $ref: "#/components/schemas/ReleaseStatus" + $ref: '#/components/schemas/ReleaseStatus' statusInfo: - $ref: "#/components/schemas/ReleaseStatusInfo" + $ref: '#/components/schemas/ReleaseStatusInfo' required: - sliceId - status @@ -595,10 +586,9 @@ components: description: List of slices assigned to the device type: array items: - $ref: "#/components/schemas/SliceInfo" + $ref: '#/components/schemas/SliceInfo' minItems: 0 maxItems: 16 - SliceDevices: description: Information about devices assigned to a slice type: object @@ -607,22 +597,22 @@ components: description: List of devices assigned to the slice type: array items: - $ref: "#/components/schemas/Device" + $ref: '#/components/schemas/Device' minItems: 0 maxItems: 2147483647 sliceInfo: - $ref: "#/components/schemas/SliceInfo" + $ref: '#/components/schemas/SliceInfo' required: - deviceList - sliceInfo SliceInfo: description: Slice related information. allOf: - - $ref: "#/components/schemas/SliceAttributes" + - $ref: '#/components/schemas/SliceAttributes' - type: object properties: sliceId: - $ref: "#/components/schemas/SliceId" + $ref: '#/components/schemas/SliceId' required: - sliceId SliceAttributes: @@ -634,34 +624,33 @@ components: serviceTime is a period during which the network slice will be reserved. It is defined by a start time and an end time. allOf: - - $ref: "#/components/schemas/TimePeriod" + - $ref: '#/components/schemas/TimePeriod' serviceArea: description: | serviceArea is a geographical area where the network slice will be reserved. It can be defined as a circle or a polygon. allOf: - - $ref: "../common/CAMARA_common.yaml#/components/schemas/Area" + - $ref: '#/components/schemas/Area' sliceQosProfile: description: | sliceQosProfile is a set of quality of service parameters that define the requirements for the network slice. It includes parameters such as maximum number of devices, downlink and uplink throughput per device, and latency requirements. allOf: - - $ref: "#/components/schemas/SliceQosProfile" + - $ref: '#/components/schemas/SliceQosProfile' sink: type: string format: uri maxLength: 2048 description: The URL where the API response will be asynchronously delivered, using the HTTP protocol. - example: "https://endpoint.example.com/sink" + example: https://endpoint.example.com/sink sinkCredential: description: A sink credential provides authentication or authorization information necessary to enable delivery of events to a target. allOf: - - $ref: "../common/CAMARA_event_common.yaml#/components/schemas/SinkCredential" + - $ref: '#/components/schemas/SinkCredential' required: - serviceTime - serviceArea - sliceQosProfile - SliceQosProfile: description: | Quality of service for the network slice. @@ -672,33 +661,31 @@ components: description: | maxNumOfDevices is a maximum number of devices that can be connected to the slice allOf: - - $ref: "#/components/schemas/NumberOfDevices" + - $ref: '#/components/schemas/NumberOfDevices' downStreamRatePerDevice: description: | downStreamRatePerDevice is the maximum downstream rate allowed for each device connected to the slice. It indicates the individual device capability required for the slice. allOf: - - $ref: "#/components/schemas/Rate" + - $ref: '#/components/schemas/Rate' upStreamRatePerDevice: description: | upStreamRatePerDevice is the maximum upstream rate allowed for each device connected to the slice. It indicates the individual device capability required for the slice. allOf: - - $ref: "#/components/schemas/Rate" + - $ref: '#/components/schemas/Rate' downStreamDelayBudget: description: | downStreamDelayBudget is the maximum allowable downlink packet transmission latency (millisecond). By limiting the delay, the network can provide an acceptable level of performance for various services, such as voice calls, video streaming, and data. allOf: - - $ref: "#/components/schemas/Duration" + - $ref: '#/components/schemas/Duration' upStreamDelayBudget: description: | upStreamDelayBudget is the maximum allowable uplink packet transmission latency (millisecond). By limiting the delay, the network can provide an acceptable level of performance for various services, such as voice calls, video streaming, and data. allOf: - - $ref: "#/components/schemas/Duration" - - + - $ref: '#/components/schemas/Duration' Duration: description: Specification of duration. It must follow [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#appendix-A) for duration. type: object @@ -711,9 +698,7 @@ components: minimum: 1 maximum: 2147483647 unit: - $ref: "#/components/schemas/TimeUnitEnum" - - + $ref: '#/components/schemas/TimeUnitEnum' TimeUnitEnum: description: Units of time type: string @@ -725,8 +710,6 @@ components: - Milliseconds - Microseconds - Nanoseconds - - Rate: description: Specification of rate type: object @@ -739,8 +722,7 @@ components: minimum: 0 maximum: 1024 unit: - $ref: "#/components/schemas/RateUnitEnum" - + $ref: '#/components/schemas/RateUnitEnum' RateUnitEnum: description: Units of rate type: string @@ -750,27 +732,23 @@ components: - Mbps - Gbps - Tbps - NumberOfDevices: type: integer example: 5 description: Maximum number of devices that is allowed to be connected to the network at any point in time. - format: int32 minimum: 1 maximum: 20 - TimePeriod: type: object description: A period of time defined by a start date and an optional end date. If `endDate` is not included, then the period has no ending date. properties: startDate: - $ref: "../common/CAMARA_common.yaml#/components/schemas/DateTime" + $ref: '#/components/schemas/DateTime' endDate: - $ref: "../common/CAMARA_common.yaml#/components/schemas/DateTime" + $ref: '#/components/schemas/DateTime' required: - startDate - ApiEventType: type: string description: | @@ -788,40 +766,281 @@ components: Adding a new event type only requires updating ApiEventType and the discriminator mapping below — the CloudEvent base never changes. allOf: - - $ref: "../common/CAMARA_event_common.yaml#/components/schemas/CloudEvent" + - $ref: '#/components/schemas/CloudEvent' - type: object properties: type: - $ref: "#/components/schemas/ApiEventType" + $ref: '#/components/schemas/ApiEventType' discriminator: propertyName: type mapping: - org.camaraproject.network-slice-assignment.v0.status-changed: "#/components/schemas/AssignmentDeviceEvent" + org.camaraproject.network-slice-assignment.v0.status-changed: '#/components/schemas/AssignmentDeviceEvent' AssignmentDeviceEvent: description: Event to notify about device assignment status change allOf: - - $ref: "#/components/schemas/ApiNotificationEvent" + - $ref: '#/components/schemas/ApiNotificationEvent' - type: object properties: data: type: object description: Event details depending on the event type allOf: - - $ref: "#/components/schemas/DeviceAssignmentInfo" + - $ref: '#/components/schemas/DeviceAssignmentInfo' required: - data - + DateTime: + type: string + format: date-time + maxLength: 64 + description: Timestamp. It must follow [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) and must have time zone. + example: '2018-04-05T17:31:00Z' + Area: + description: Base schema for all areas + type: object + properties: + areaType: + $ref: '#/components/schemas/AreaType' + required: + - areaType + discriminator: + propertyName: areaType + mapping: + CIRCLE: '#/components/schemas/Circle' + POLYGON: '#/components/schemas/Polygon' + Latitude: + description: Latitude component of a location + type: number + format: double + minimum: -90 + maximum: 90 + Longitude: + description: Longitude component of location + type: number + format: double + minimum: -180 + maximum: 180 + Point: + type: object + description: Coordinates (latitude, longitude) defining a location in a map + required: + - latitude + - longitude + properties: + latitude: + $ref: '#/components/schemas/Latitude' + longitude: + $ref: '#/components/schemas/Longitude' + example: + latitude: 50.735851 + longitude: 7.10066 + Circle: + description: Circular area + allOf: + - $ref: '#/components/schemas/Area' + - type: object + required: + - center + - radius + properties: + center: + $ref: '#/components/schemas/Point' + radius: + type: number + description: Distance from the center in meters + minimum: 1 + PointList: + description: List of points defining a polygon + type: array + items: + $ref: '#/components/schemas/Point' + minItems: 3 + maxItems: 15 + Polygon: + description: Polygonal area. The Polygon should be a simple polygon, i.e. should not intersect itself. + allOf: + - $ref: '#/components/schemas/Area' + - type: object + required: + - boundary + properties: + boundary: + $ref: '#/components/schemas/PointList' + AreaType: + type: string + description: | + Type of this area. + CIRCLE - The area is defined as a circle. + POLYGON - The area is defined as a polygon. + enum: + - CIRCLE + - POLYGON + SinkCredential: + description: A sink credential provides authentication or authorization information necessary to enable delivery of events to a target. + type: object + properties: + credentialType: + type: string + enum: + - ACCESSTOKEN + - PRIVATE_KEY_JWT + description: | + The type of the credential - MUST be set to ACCESSTOKEN or PRIVATE_KEY_JWT for now + discriminator: + propertyName: credentialType + mapping: + ACCESSTOKEN: '#/components/schemas/AccessTokenCredential' + PRIVATE_KEY_JWT: '#/components/schemas/PrivateKeyJWTCredential' + required: + - credentialType + AccessTokenCredential: + type: object + description: An access token credential. This type of credential is meant to be used by API Consumers that have limited capabilities to handle authorization requests. + allOf: + - $ref: '#/components/schemas/SinkCredential' + - type: object + properties: + accessToken: + description: REQUIRED. An access token is a token granting access to the target resource. + type: string + maxLength: 4096 + writeOnly: true + accessTokenExpiresUtc: + type: string + format: date-time + maxLength: 64 + description: | + REQUIRED. An absolute (UTC) timestamp at which the token shall be considered expired. + In the case of an ACCESS_TOKEN_EXPIRED termination reason, implementation should notify the client before the expiration date. + If the access token is a JWT and registered "exp" (Expiration Time) claim is present, the two expiry times should match. + 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' + accessTokenType: + description: REQUIRED. Type of the access token (See [OAuth 2.0](https://tools.ietf.org/html/rfc6749#section-7.1)). + type: string + writeOnly: true + enum: + - bearer + required: + - accessToken + - accessTokenExpiresUtc + - accessTokenType + PrivateKeyJWTCredential: + type: object + description: Use PRIVATE_KEY_JWT to get an access token. This type of credential is to be used by clients that have an authorization server. + allOf: + - $ref: '#/components/schemas/SinkCredential' + - type: object + properties: + clientId: + description: The client ID used to authenticate when requesting an access token using PRIVATE_KEY_JWT. + type: string + maxLength: 128 + writeOnly: true + tokenUri: + description: The URI where to request an access token using PRIVATE_KEY_JWT. + type: string + format: uri + maxLength: 2048 + pattern: ^https:\/\/.+$ + writeOnly: true + jwksUri: + description: The URI used to request the public key to verify that the JWT assertion was signed by PRIVATE_KEY_JWT. + type: string + format: uri + maxLength: 2048 + pattern: ^https:\/\/.+$ + readOnly: true + ErrorInfo: + type: object + description: A structured error response providing details about a failed request, including the HTTP status code, an error code, and a human-readable message + required: + - status + - code + - message + properties: + status: + type: integer + format: int32 + minimum: 100 + maximum: 599 + description: HTTP response status code + code: + type: string + maxLength: 96 + description: A human-readable code to describe the error + message: + type: string + maxLength: 512 + description: A human-readable description of what the event represents + Source: + type: string + format: uri-reference + minLength: 1 + maxLength: 2048 + description: | + Identifies the context in which an event happened - be a non-empty `URI-reference` like: + - URI with a DNS authority: + * https://github.com/cloudevents + * mailto:cncf-wg-serverless@lists.cncf.io + - Universally-unique URN with a UUID: + * urn:uuid:6e8bc430-9c3a-11d9-9669-0800200c9a66 + - Application-specific identifier: + * /cloudevents/spec/pull/123 + * 1-555-123-4567 + example: https://notificationSendServer12.example.com + CloudEvent: + type: object + description: | + CloudEvents 1.0 specification envelope. + This schema is the stable base for all CAMARA event notifications. + It imposes no constraints on `type` values or `data` structure — + those concerns belong to the API-specific and lifecycle group schemas. + required: + - id + - source + - specversion + - type + - time + properties: + id: + type: string + maxLength: 256 + description: Identifier of this event, unique within the source context. + source: + $ref: '#/components/schemas/Source' + type: + type: string + maxLength: 512 + description: | + Identifies the event type. CAMARA APIs use reverse-DNS notation: + `org.camaraproject...` + The api-name segment makes each type globally unique across API groups. + specversion: + type: string + description: Version of the specification to which this event conforms (must be 1.0 if it conforms to cloudevents 1.0.2 version) + enum: + - '1.0' + datacontenttype: + type: string + description: media-type that describes the event payload encoding, must be "application/json" for CAMARA APIs + enum: + - application/json + data: + type: object + description: Event details payload. Structure is defined by each concrete event schema. + time: + $ref: '#/components/schemas/DateTime' responses: Generic400: description: Bad Request headers: x-correlator: - $ref: "#/components/headers/x-correlator" + $ref: '#/components/headers/x-correlator' content: application/json: schema: allOf: - - $ref: "../common/CAMARA_common.yaml#/components/schemas/ErrorInfo" + - $ref: '#/components/schemas/ErrorInfo' - type: object properties: status: @@ -853,7 +1072,7 @@ components: application/json: schema: allOf: - - $ref: "../common/CAMARA_common.yaml#/components/schemas/ErrorInfo" + - $ref: '#/components/schemas/ErrorInfo' - type: object properties: status: @@ -869,7 +1088,6 @@ components: status: 401 code: UNAUTHENTICATED message: Request not authenticated due to missing, invalid, or expired credentials. A new authentication is required. - Generic403: description: Forbidden headers: @@ -879,7 +1097,7 @@ components: application/json: schema: allOf: - - $ref: "../common/CAMARA_common.yaml#/components/schemas/ErrorInfo" + - $ref: '#/components/schemas/ErrorInfo' - type: object properties: status: @@ -899,12 +1117,12 @@ components: description: Not found headers: x-correlator: - $ref: "#/components/headers/x-correlator" + $ref: '#/components/headers/x-correlator' content: application/json: schema: allOf: - - $ref: "../common/CAMARA_common.yaml#/components/schemas/ErrorInfo" + - $ref: '#/components/schemas/ErrorInfo' - type: object properties: status: @@ -931,12 +1149,12 @@ components: description: Gone headers: x-correlator: - $ref: "#/components/headers/x-correlator" + $ref: '#/components/headers/x-correlator' content: application/json: schema: allOf: - - $ref: "../common/CAMARA_common.yaml#/components/schemas/ErrorInfo" + - $ref: '#/components/schemas/ErrorInfo' - type: object properties: status: @@ -956,12 +1174,12 @@ components: description: Unprocessable Content headers: x-correlator: - $ref: "#/components/headers/x-correlator" + $ref: '#/components/headers/x-correlator' content: application/json: schema: allOf: - - $ref: "../common/CAMARA_common.yaml#/components/schemas/ErrorInfo" + - $ref: '#/components/schemas/ErrorInfo' - type: object properties: status: @@ -1002,12 +1220,12 @@ components: description: Quota Exceed or Too Many Requests headers: x-correlator: - $ref: "#/components/headers/x-correlator" + $ref: '#/components/headers/x-correlator' content: application/json: schema: allOf: - - $ref: "../common/CAMARA_common.yaml#/components/schemas/ErrorInfo" + - $ref: '#/components/schemas/ErrorInfo' - type: object properties: status: @@ -1030,191 +1248,188 @@ components: status: 429 code: TOO_MANY_REQUESTS message: Rate limit reached. - examples: ASSIGNMENT_COMPLETED_EVENT: summary: Assignment Completed Event description: Example of notification event sent when device assignment is completed value: - id: "83a0d986-0866-4f38-b8c0-fc65bfcda452" - source: "https://notificationSendServer12.example.com" - specversion: "1.0" - type: "org.camaraproject.network-slice-assignment.v0.status-changed" - datacontenttype: "application/json" - time: "2024-06-01T12:00:00Z" + id: 83a0d986-0866-4f38-b8c0-fc65bfcda452 + source: https://notificationSendServer12.example.com + specversion: '1.0' + type: org.camaraproject.network-slice-assignment.v0.status-changed + datacontenttype: application/json + time: '2024-06-01T12:00:00Z' data: - sliceId: "3fa85f64-5717-4562-b3fc-2c963f66afa6" + sliceId: 3fa85f64-5717-4562-b3fc-2c963f66afa6 device: - phoneNumber: "+123456789" - status: "SUCCESS" - statusInfo: "ASSIGNMENT_COMPLETED" + phoneNumber: '+123456789' + status: SUCCESS + statusInfo: ASSIGNMENT_COMPLETED ASSIGNMENT_DEVICE_EXCEED_EVENT: summary: Assignment Device Exceed Event description: Example of notification event sent when device assignment fails due to maximum devices exceeded value: - id: "83a0d986-0866-4f38-b8c0-fc65bfcda452" - source: "https://notificationSendServer12.example.com" - specversion: "1.0" - type: "org.camaraproject.network-slice-assignment.v0.status-changed" - datacontenttype: "application/json" - time: "2024-06-01T12:00:00Z" + id: 83a0d986-0866-4f38-b8c0-fc65bfcda452 + source: https://notificationSendServer12.example.com + specversion: '1.0' + type: org.camaraproject.network-slice-assignment.v0.status-changed + datacontenttype: application/json + time: '2024-06-01T12:00:00Z' data: - sliceId: "3fa85f64-5717-4562-b3fc-2c963f66afa6" + sliceId: 3fa85f64-5717-4562-b3fc-2c963f66afa6 device: - phoneNumber: "+123456789" - status: "FAILURE" - statusInfo: "MAX_DEVICES_EXCEEDED" + phoneNumber: '+123456789' + status: FAILURE + statusInfo: MAX_DEVICES_EXCEEDED ASSIGN_DEVICE_INPUT_ALL: summary: Assign device - All Identifiers description: Example of request to assign a device to a network slice using all identifiers value: device: - phoneNumber: "+123456789" - networkAccessIdentifier: "123456789@domain.com" + phoneNumber: '+123456789' + networkAccessIdentifier: 123456789@domain.com ipv4Address: - publicAddress: "84.125.93.10" + publicAddress: 84.125.93.10 publicPort: 59765 - ipv6Address: "2001:db8:85a3:8d3:1319:8a2e:370:7344" - sink: - "https://endpoint.example.com/sink" + ipv6Address: 2001:db8:85a3:8d3:1319:8a2e:370:7344 + sink: https://endpoint.example.com/sink sinkCredential: credentialType: ACCESSTOKEN - accessToken: "" - accessTokenExpiresUtc: "2025-12-31T23:59:59Z" + accessToken: + accessTokenExpiresUtc: '2025-12-31T23:59:59Z' accessTokenType: bearer ASSIGN_DEVICE_INPUT_NUMBER: summary: Assign device - Phone Number Identifier description: Example of request to assign a device to a network slice using phone number identifier value: device: - phoneNumber: "+123456789" - sink: - "https://endpoint.example.com/sink" + phoneNumber: '+123456789' + sink: https://endpoint.example.com/sink sinkCredential: credentialType: ACCESSTOKEN - accessToken: "" - accessTokenExpiresUtc: "2025-12-31T23:59:59Z" + accessToken: + accessTokenExpiresUtc: '2025-12-31T23:59:59Z' accessTokenType: bearer ASSIGN_DEVICE_SUCCESSFUL: summary: Assignment Successful description: Example of successful response for assigning a device to a network slice request value: - sliceId: "3fa85f64-5717-4562-b3fc-2c963f66afa6" + sliceId: 3fa85f64-5717-4562-b3fc-2c963f66afa6 device: - phoneNumber: "+123456789" - status: "SUCCESS" - statusInfo: "ASSIGNMENT_COMPLETED" + phoneNumber: '+123456789' + status: SUCCESS + statusInfo: ASSIGNMENT_COMPLETED ASSIGN_DEVICE_FAILURE_EXCEEDED: summary: Assignment Failure for DeviceNum Exceeded description: Example of failure response for assigning a device to a network slice request due to maximum devices exceeded value: - sliceId: "3fa85f64-5717-4562-b3fc-2c963f66afa6" + sliceId: 3fa85f64-5717-4562-b3fc-2c963f66afa6 device: - phoneNumber: "+123456789" - status: "FAILURE" - statusInfo: "MAX_DEVICES_EXCEEDED" + phoneNumber: '+123456789' + status: FAILURE + statusInfo: MAX_DEVICES_EXCEEDED ASSIGN_DEVICE_ALREADY_ASSIGNED: summary: Assignment Failure for Device Already Assigned description: Example of failure response for assigning a device to a network slice request due to device already assigned value: - sliceId: "3fa85f64-5717-4562-b3fc-2c963f66afa6" + sliceId: 3fa85f64-5717-4562-b3fc-2c963f66afa6 device: - phoneNumber: "+123456789" - status: "FAILURE" - statusInfo: "DEVICE_ALREADY_ASSIGNED" + phoneNumber: '+123456789' + status: FAILURE + statusInfo: DEVICE_ALREADY_ASSIGNED ASSIGN_DEVICE_SLICE_NOT_FOUND: summary: Assignment Failure for Slice Not Found description: Example of failure response for assigning a device to a network slice request due to sliceId not found value: - sliceId: "3fa85f64-5717-4562-b3fc-2c963f66afa6" + sliceId: 3fa85f64-5717-4562-b3fc-2c963f66afa6 device: - phoneNumber: "+123456789" - status: "FAILURE" - statusInfo: "SLICE_NOT_FOUND" + phoneNumber: '+123456789' + status: FAILURE + statusInfo: SLICE_NOT_FOUND ASSIGN_DEVICE_UNKNOWN_ERROR: summary: Assignment Failure for Unknown Error description: Example of failure response for assigning a device to a network slice request due to unknown error value: - sliceId: "3fa85f64-5717-4562-b3fc-2c963f66afa6" + sliceId: 3fa85f64-5717-4562-b3fc-2c963f66afa6 device: - phoneNumber: "+123456789" - status: "FAILURE" - statusInfo: "ASSIGNMENT_UNKNOWN_ERROR" + phoneNumber: '+123456789' + status: FAILURE + statusInfo: ASSIGNMENT_UNKNOWN_ERROR ASSIGN_DEVICE_PENDING: summary: Assignment Pending description: Example of pending response for assigning a device to a network slice request value: - sliceId: "3fa85f64-5717-4562-b3fc-2c963f66afa6" + sliceId: 3fa85f64-5717-4562-b3fc-2c963f66afa6 device: - phoneNumber: "+123456789" - status: "PENDING" - statusInfo: "VALIDATION_PENDING" + phoneNumber: '+123456789' + status: PENDING + statusInfo: VALIDATION_PENDING RELEASE_DEVICE_INPUT_NUMBER: summary: Release device - Phone Number Identifier description: Example of request to assign a device to a network slice using phone number identifier value: device: - phoneNumber: "+123456789" + phoneNumber: '+123456789' RELEASE_DEVICE_INPUT_ALL: summary: Release device - All Identifiers description: Example of request to assign a device to a network slice using all identifiers value: device: - phoneNumber: "+123456789" - networkAccessIdentifier: "123456789@domain.com" + phoneNumber: '+123456789' + networkAccessIdentifier: 123456789@domain.com ipv4Address: - publicAddress: "84.125.93.10" + publicAddress: 84.125.93.10 publicPort: 59765 - ipv6Address: "2001:db8:85a3:8d3:1319:8a2e:370:7344" + ipv6Address: 2001:db8:85a3:8d3:1319:8a2e:370:7344 RELEASE_DEVICE_SUCCESSFUL: summary: Release Successful description: Example of successful response for releasing a device from a network slice request value: - sliceId: "3fa85f64-5717-4562-b3fc-2c963f66afa6" + sliceId: 3fa85f64-5717-4562-b3fc-2c963f66afa6 device: - phoneNumber: "+123456789" - status: "SUCCESS" - statusInfo: "RELEASE_COMPLETED" + phoneNumber: '+123456789' + status: SUCCESS + statusInfo: RELEASE_COMPLETED RELEASE_DEVICE_ALREADY_RELEASED: summary: Release Failure for Device Already Released description: Example of failure response for releasing a device from a network slice request due to device already not assigned to the slice value: - sliceId: "3fa85f64-5717-4562-b3fc-2c963f66afa6" + sliceId: 3fa85f64-5717-4562-b3fc-2c963f66afa6 device: - phoneNumber: "+123456789" - status: "FAILURE" - statusInfo: "DEVICE_ALREADY_RELEASED" + phoneNumber: '+123456789' + status: FAILURE + statusInfo: DEVICE_ALREADY_RELEASED RELEASE_DEVICE_SLICE_NOT_FOUND: summary: Release Failure for Slice Not Found description: Example of failure response for releasing a device from a network slice request due to sliceId not found value: - sliceId: "3fa85f64-5717-4562-b3fc-2c963f66afa6" + sliceId: 3fa85f64-5717-4562-b3fc-2c963f66afa6 device: - phoneNumber: "+123456789" - status: "FAILURE" - statusInfo: "SLICE_NOT_FOUND" + phoneNumber: '+123456789' + status: FAILURE + statusInfo: SLICE_NOT_FOUND RELEASE_DEVICE_UNKNOWN_ERROR: summary: Release Failure for Unknown Error description: Example of failure response for releasing a device from a network slice request due to unknown error value: - sliceId: "3fa85f64-5717-4562-b3fc-2c963f66afa6" + sliceId: 3fa85f64-5717-4562-b3fc-2c963f66afa6 device: - phoneNumber: "+123456789" - status: "FAILURE" - statusInfo: "RELEASE_UNKNOWN_ERROR" + phoneNumber: '+123456789' + status: FAILURE + statusInfo: RELEASE_UNKNOWN_ERROR GET_DEVICES_SUCCESSFUL: summary: Get Devices Successful description: Example of successful response for getting devices assigned to a network slice request value: deviceList: - device: - phoneNumber: "+123456789" + phoneNumber: '+123456789' - device: - phoneNumber: "+987654321" + phoneNumber: '+987654321' sliceInfo: serviceTime: - startDate: "2024-06-01T12:00:00Z" - endDate: "2024-06-02T12:00:00Z" + startDate: '2024-06-01T12:00:00Z' + endDate: '2024-06-02T12:00:00Z' serviceArea: areaType: CIRCLE center: @@ -1235,21 +1450,21 @@ components: upStreamDelayBudget: value: 12 unit: Milliseconds - sliceId: "3fa85f64-5717-4562-b3fc-2c963f66afa6" + sliceId: 3fa85f64-5717-4562-b3fc-2c963f66afa6 RETRIEVE_INPUT_PHONENUMBER: summary: Retrieve Slice Info - Phone Number Identifier description: Example of request to retrieve network slice info using phone number identifier value: device: - phoneNumber: "+123456789" + phoneNumber: '+123456789' RETRIEVE_SUCCESSFUL: summary: Retrieve Slice Info Successful description: Example of successful response for retrieving network slice info request value: sliceList: - serviceTime: - startDate: "2024-06-01T12:00:00Z" - endDate: "2024-06-02T12:00:00Z" + startDate: '2024-06-01T12:00:00Z' + endDate: '2024-06-02T12:00:00Z' serviceArea: areaType: CIRCLE center: @@ -1270,4 +1485,4 @@ components: upStreamDelayBudget: value: 12 unit: Milliseconds - sliceId: "3fa85f64-5717-4562-b3fc-2c963f66afa6" + sliceId: 3fa85f64-5717-4562-b3fc-2c963f66afa6 diff --git a/code/API_definitions/network-slice-booking.yaml b/code/API_definitions/network-slice-booking.yaml index 3285904..f71cec0 100644 --- a/code/API_definitions/network-slice-booking.yaml +++ b/code/API_definitions/network-slice-booking.yaml @@ -3,7 +3,7 @@ info: title: Network Slice Booking description: | The Network Slice Booking (NSB) API provides programmable interface for developers to reserve a slice resource of a selected area within a period, and manage device access control as needed. - For specific details, please refer to [Network Slice Booking API Design.md](https://github.com/camaraproject/NetworkSliceBooking/blob/main/documentation/API_documentation/Network_Slice_Booking_API_Design.md). + For specific details, please refer to [Network Slice Booking API Design.md](https://github.com/camaraproject/NetworkSliceBooking/blob/r2.3/documentation/API_documentation/Network_Slice_Booking_API_Design.md). # Introduction @@ -52,17 +52,13 @@ info: This API rejects requests with JSON request bodies that contain properties not declared in this specification, at any nesting level. Unknown properties result in a `400 INVALID_ARGUMENT` response. - - version: wip + version: 0.2.0 x-camara-commonalities: 0.8.0 license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html -externalDocs: - description: Project documentation at CAMARA - url: https://github.com/camaraproject/NetworkSliceBooking servers: - - url: "{apiRoot}/network-slice-booking/vwip" + - url: '{apiRoot}/network-slice-booking/v0.2' variables: apiRoot: default: http://localhost:9091 @@ -70,6 +66,9 @@ servers: tags: - name: Network Slice Booking description: Manage Network Slice Booking +externalDocs: + description: Project documentation at CAMARA + url: https://github.com/camaraproject/NetworkSliceBooking paths: /slices: post: @@ -88,22 +87,22 @@ paths: - openId: - network-slice-booking:slices:create parameters: - - $ref: "#/components/parameters/x-correlator" + - $ref: '#/components/parameters/x-correlator' requestBody: description: Parameters to create a new network slice content: application/json: schema: - $ref: "#/components/schemas/SliceAttributes" + $ref: '#/components/schemas/SliceAttributes' examples: LOCATION_CIRCLE: - $ref: "#/components/examples/CREATE_CIRCLE" + $ref: '#/components/examples/CREATE_CIRCLE' LOCATION_POLYGON: - $ref: "#/components/examples/CREATE_POLYGON" + $ref: '#/components/examples/CREATE_POLYGON' required: true callbacks: networkSliceBookingSinkCallback: - "{request.body#/sink}": + '{request.body#/sink}': post: tags: - Network Slice Booking Callback @@ -115,57 +114,56 @@ paths: content: application/cloudevents+json: schema: - $ref: "#/components/schemas/ApiNotificationEvent" + $ref: '#/components/schemas/ApiNotificationEvent' examples: SLICE_CREATED_EVENT_CIRCLE: - $ref: "#/components/examples/SLICE_CREATED_EVENT_CIRCLE" + $ref: '#/components/examples/SLICE_CREATED_EVENT_CIRCLE' SLICE_CREATED_EVENT_POLYGON: - $ref: "#/components/examples/SLICE_CREATED_EVENT_POLYGON" + $ref: '#/components/examples/SLICE_CREATED_EVENT_POLYGON' responses: - "204": + '204': description: Successful notification headers: x-correlator: - $ref: "#/components/headers/x-correlator" - "400": - $ref: "#/components/responses/Generic400" - "401": - $ref: "#/components/responses/Generic401" - "403": - $ref: "#/components/responses/Generic403" - "410": - $ref: "#/components/responses/Generic410" - "429": - $ref: "#/components/responses/Generic429" + $ref: '#/components/headers/x-correlator' + '400': + $ref: '#/components/responses/Generic400' + '401': + $ref: '#/components/responses/Generic401' + '403': + $ref: '#/components/responses/Generic403' + '410': + $ref: '#/components/responses/Generic410' + '429': + $ref: '#/components/responses/Generic429' security: - {} - notificationsBearerAuth: [] responses: - "201": + '201': description: Slice created successfully headers: x-correlator: - $ref: "#/components/headers/x-correlator" + $ref: '#/components/headers/x-correlator' content: application/json: schema: - $ref: "#/components/schemas/SliceInfo" + $ref: '#/components/schemas/SliceInfo' examples: RESPONSE_CIRCLE: - $ref: "#/components/examples/RESPONSE_CIRCLE" + $ref: '#/components/examples/RESPONSE_CIRCLE' RESPONSE_POLYGON: - $ref: "#/components/examples/RESPONSE_POLYGON" - "400": - $ref: "#/components/responses/Generic400" - "401": - $ref: "#/components/responses/Generic401" - "403": - $ref: "#/components/responses/Generic403" - "422": - $ref: "#/components/responses/NetworkSliceBooking422" - "429": - $ref: "#/components/responses/Generic429" - + $ref: '#/components/examples/RESPONSE_POLYGON' + '400': + $ref: '#/components/responses/Generic400' + '401': + $ref: '#/components/responses/Generic401' + '403': + $ref: '#/components/responses/Generic403' + '422': + $ref: '#/components/responses/NetworkSliceBooking422' + '429': + $ref: '#/components/responses/Generic429' /slices/{sliceId}: delete: tags: @@ -188,25 +186,24 @@ paths: description: Slice ID that was obtained from the createSlice operation required: true schema: - $ref: "#/components/schemas/SliceId" - - $ref: "#/components/parameters/x-correlator" + $ref: '#/components/schemas/SliceId' + - $ref: '#/components/parameters/x-correlator' responses: - "204": + '204': description: Slice deleted headers: x-correlator: - $ref: "#/components/headers/x-correlator" - "400": - $ref: "#/components/responses/Generic400" - "401": - $ref: "#/components/responses/Generic401" - "403": - $ref: "#/components/responses/Generic403" - "404": - $ref: "#/components/responses/Generic404" - "429": - $ref: "#/components/responses/Generic429" - + $ref: '#/components/headers/x-correlator' + '400': + $ref: '#/components/responses/Generic400' + '401': + $ref: '#/components/responses/Generic401' + '403': + $ref: '#/components/responses/Generic403' + '404': + $ref: '#/components/responses/Generic404' + '429': + $ref: '#/components/responses/Generic429' get: tags: - Network Slice Booking @@ -227,35 +224,33 @@ paths: description: Slice ID that was obtained from the createSlice operation required: true schema: - $ref: "#/components/schemas/SliceId" - - $ref: "#/components/parameters/x-correlator" + $ref: '#/components/schemas/SliceId' + - $ref: '#/components/parameters/x-correlator' responses: - "200": + '200': description: Contains information about network slice booking headers: x-correlator: - $ref: "#/components/headers/x-correlator" + $ref: '#/components/headers/x-correlator' content: application/json: schema: - $ref: "#/components/schemas/SliceInfo" + $ref: '#/components/schemas/SliceInfo' examples: RESPONSE_CIRCLE: - $ref: "#/components/examples/RESPONSE_CIRCLE" + $ref: '#/components/examples/RESPONSE_CIRCLE' RESPONSE_POLYGON: - $ref: "#/components/examples/RESPONSE_POLYGON" - - "400": - $ref: "#/components/responses/Generic400" - "401": - $ref: "#/components/responses/Generic401" - "403": - $ref: "#/components/responses/Generic403" - "404": - $ref: "#/components/responses/Generic404" - "429": - $ref: "#/components/responses/Generic429" - + $ref: '#/components/examples/RESPONSE_POLYGON' + '400': + $ref: '#/components/responses/Generic400' + '401': + $ref: '#/components/responses/Generic401' + '403': + $ref: '#/components/responses/Generic403' + '404': + $ref: '#/components/responses/Generic404' + '429': + $ref: '#/components/responses/Generic429' components: securitySchemes: openId: @@ -266,29 +261,26 @@ components: description: Bearer authentication for notifications type: http scheme: bearer - bearerFormat: "{$request.body#sinkCredential.credentialType}" - + bearerFormat: '{$request.body#sinkCredential.credentialType}' parameters: x-correlator: name: x-correlator in: header description: Correlation id for the different services schema: - $ref: "#/components/schemas/XCorrelator" - + $ref: '#/components/schemas/XCorrelator' headers: x-correlator: description: Correlation id for the different services schema: - $ref: "#/components/schemas/XCorrelator" - + $ref: '#/components/schemas/XCorrelator' schemas: XCorrelator: description: Value for the x-correlator type: string pattern: ^[a-zA-Z0-9-_:;.\/<>{}]{0,256}$ maxLength: 256 - example: "b4333c46-49c0-4f62-80d7-f0ef930f1c46" + example: b4333c46-49c0-4f62-80d7-f0ef930f1c46 SliceId: description: Slice ID in UUID format type: string @@ -297,14 +289,13 @@ components: SliceInfo: description: Slice related information. allOf: - - $ref: "#/components/schemas/SliceAttributes" + - $ref: '#/components/schemas/SliceAttributes' - type: object properties: sliceId: - $ref: "#/components/schemas/SliceId" + $ref: '#/components/schemas/SliceId' required: - sliceId - SliceAttributes: description: Attributes defining the characteristics of the slice type: object @@ -314,34 +305,33 @@ components: serviceTime is a period during which the network slice will be reserved. It is defined by a start time and an end time. allOf: - - $ref: "#/components/schemas/TimePeriod" + - $ref: '#/components/schemas/TimePeriod' serviceArea: description: | serviceArea is a geographical area where the network slice will be reserved. It can be defined as a circle or a polygon. allOf: - - $ref: "../common/CAMARA_common.yaml#/components/schemas/Area" + - $ref: '#/components/schemas/Area' sliceQosProfile: description: | sliceQosProfile is a set of quality of service parameters that define the requirements for the network slice. It includes parameters such as maximum number of devices, downlink and uplink throughput per device, and latency requirements. allOf: - - $ref: "#/components/schemas/SliceQosProfile" + - $ref: '#/components/schemas/SliceQosProfile' sink: type: string format: uri maxLength: 2048 description: The URL where the API response will be asynchronously delivered, using the HTTP protocol. - example: "https://endpoint.example.com/sink" + example: https://endpoint.example.com/sink sinkCredential: description: A sink credential provides authentication or authorization information necessary to enable delivery of events to a target. allOf: - - $ref: "../common/CAMARA_event_common.yaml#/components/schemas/SinkCredential" + - $ref: '#/components/schemas/SinkCredential' required: - serviceTime - serviceArea - sliceQosProfile - SliceQosProfile: description: | Quality of service for the network slice. @@ -352,33 +342,31 @@ components: description: | maxNumOfDevices is a maximum number of devices that can be connected to the slice allOf: - - $ref: "#/components/schemas/NumberOfDevices" + - $ref: '#/components/schemas/NumberOfDevices' downStreamRatePerDevice: description: | downStreamRatePerDevice is the maximum downstream rate allowed for each device connected to the slice. It indicates the individual device capability required for the slice. allOf: - - $ref: "#/components/schemas/Rate" + - $ref: '#/components/schemas/Rate' upStreamRatePerDevice: description: | upStreamRatePerDevice is the maximum upstream rate allowed for each device connected to the slice. It indicates the individual device capability required for the slice. allOf: - - $ref: "#/components/schemas/Rate" + - $ref: '#/components/schemas/Rate' downStreamDelayBudget: description: | downStreamDelayBudget is the maximum allowable downlink packet transmission latency (millisecond). By limiting the delay, the network can provide an acceptable level of performance for various services, such as voice calls, video streaming, and data. allOf: - - $ref: "#/components/schemas/Duration" + - $ref: '#/components/schemas/Duration' upStreamDelayBudget: description: | upStreamDelayBudget is the maximum allowable uplink packet transmission latency (millisecond). By limiting the delay, the network can provide an acceptable level of performance for various services, such as voice calls, video streaming, and data. allOf: - - $ref: "#/components/schemas/Duration" - - + - $ref: '#/components/schemas/Duration' Duration: description: Specification of duration. It must follow [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#appendix-A) for duration. type: object @@ -391,9 +379,7 @@ components: minimum: 1 maximum: 2147483647 unit: - $ref: "#/components/schemas/TimeUnitEnum" - - + $ref: '#/components/schemas/TimeUnitEnum' TimeUnitEnum: description: Units of time type: string @@ -405,8 +391,6 @@ components: - Milliseconds - Microseconds - Nanoseconds - - Rate: description: Specification of rate type: object @@ -419,8 +403,7 @@ components: minimum: 0 maximum: 1024 unit: - $ref: "#/components/schemas/RateUnitEnum" - + $ref: '#/components/schemas/RateUnitEnum' RateUnitEnum: description: Units of rate type: string @@ -430,27 +413,23 @@ components: - Mbps - Gbps - Tbps - NumberOfDevices: type: integer example: 5 description: Maximum number of devices that is allowed to be connected to the network at any point in time. - format: int32 minimum: 1 maximum: 20 - TimePeriod: type: object description: A period of time defined by a start date and an optional end date. If `endDate` is not included, then the period has no ending date. properties: startDate: - $ref: "../common/CAMARA_common.yaml#/components/schemas/DateTime" + $ref: '#/components/schemas/DateTime' endDate: - $ref: "../common/CAMARA_common.yaml#/components/schemas/DateTime" + $ref: '#/components/schemas/DateTime' required: - startDate - ApiEventType: type: string description: | @@ -468,40 +447,281 @@ components: Adding a new event type only requires updating ApiEventType and the discriminator mapping below — the CloudEvent base never changes. allOf: - - $ref: "../common/CAMARA_event_common.yaml#/components/schemas/CloudEvent" + - $ref: '#/components/schemas/CloudEvent' - type: object properties: type: - $ref: "#/components/schemas/ApiEventType" + $ref: '#/components/schemas/ApiEventType' discriminator: propertyName: type mapping: - org.camaraproject.network-slice-booking.v0.status-changed: "#/components/schemas/SliceCreatedEvent" + org.camaraproject.network-slice-booking.v0.status-changed: '#/components/schemas/SliceCreatedEvent' SliceCreatedEvent: description: Event to notify about device assignment status change allOf: - - $ref: "#/components/schemas/ApiNotificationEvent" + - $ref: '#/components/schemas/ApiNotificationEvent' - type: object properties: data: type: object description: Event details depending on the event type allOf: - - $ref: "#/components/schemas/SliceInfo" + - $ref: '#/components/schemas/SliceInfo' required: - data - + DateTime: + type: string + format: date-time + maxLength: 64 + description: Timestamp. It must follow [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) and must have time zone. + example: '2018-04-05T17:31:00Z' + Area: + description: Base schema for all areas + type: object + properties: + areaType: + $ref: '#/components/schemas/AreaType' + required: + - areaType + discriminator: + propertyName: areaType + mapping: + CIRCLE: '#/components/schemas/Circle' + POLYGON: '#/components/schemas/Polygon' + Latitude: + description: Latitude component of a location + type: number + format: double + minimum: -90 + maximum: 90 + Longitude: + description: Longitude component of location + type: number + format: double + minimum: -180 + maximum: 180 + Point: + type: object + description: Coordinates (latitude, longitude) defining a location in a map + required: + - latitude + - longitude + properties: + latitude: + $ref: '#/components/schemas/Latitude' + longitude: + $ref: '#/components/schemas/Longitude' + example: + latitude: 50.735851 + longitude: 7.10066 + Circle: + description: Circular area + allOf: + - $ref: '#/components/schemas/Area' + - type: object + required: + - center + - radius + properties: + center: + $ref: '#/components/schemas/Point' + radius: + type: number + description: Distance from the center in meters + minimum: 1 + PointList: + description: List of points defining a polygon + type: array + items: + $ref: '#/components/schemas/Point' + minItems: 3 + maxItems: 15 + Polygon: + description: Polygonal area. The Polygon should be a simple polygon, i.e. should not intersect itself. + allOf: + - $ref: '#/components/schemas/Area' + - type: object + required: + - boundary + properties: + boundary: + $ref: '#/components/schemas/PointList' + AreaType: + type: string + description: | + Type of this area. + CIRCLE - The area is defined as a circle. + POLYGON - The area is defined as a polygon. + enum: + - CIRCLE + - POLYGON + SinkCredential: + description: A sink credential provides authentication or authorization information necessary to enable delivery of events to a target. + type: object + properties: + credentialType: + type: string + enum: + - ACCESSTOKEN + - PRIVATE_KEY_JWT + description: | + The type of the credential - MUST be set to ACCESSTOKEN or PRIVATE_KEY_JWT for now + discriminator: + propertyName: credentialType + mapping: + ACCESSTOKEN: '#/components/schemas/AccessTokenCredential' + PRIVATE_KEY_JWT: '#/components/schemas/PrivateKeyJWTCredential' + required: + - credentialType + AccessTokenCredential: + type: object + description: An access token credential. This type of credential is meant to be used by API Consumers that have limited capabilities to handle authorization requests. + allOf: + - $ref: '#/components/schemas/SinkCredential' + - type: object + properties: + accessToken: + description: REQUIRED. An access token is a token granting access to the target resource. + type: string + maxLength: 4096 + writeOnly: true + accessTokenExpiresUtc: + type: string + format: date-time + maxLength: 64 + description: | + REQUIRED. An absolute (UTC) timestamp at which the token shall be considered expired. + In the case of an ACCESS_TOKEN_EXPIRED termination reason, implementation should notify the client before the expiration date. + If the access token is a JWT and registered "exp" (Expiration Time) claim is present, the two expiry times should match. + 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' + accessTokenType: + description: REQUIRED. Type of the access token (See [OAuth 2.0](https://tools.ietf.org/html/rfc6749#section-7.1)). + type: string + writeOnly: true + enum: + - bearer + required: + - accessToken + - accessTokenExpiresUtc + - accessTokenType + PrivateKeyJWTCredential: + type: object + description: Use PRIVATE_KEY_JWT to get an access token. This type of credential is to be used by clients that have an authorization server. + allOf: + - $ref: '#/components/schemas/SinkCredential' + - type: object + properties: + clientId: + description: The client ID used to authenticate when requesting an access token using PRIVATE_KEY_JWT. + type: string + maxLength: 128 + writeOnly: true + tokenUri: + description: The URI where to request an access token using PRIVATE_KEY_JWT. + type: string + format: uri + maxLength: 2048 + pattern: ^https:\/\/.+$ + writeOnly: true + jwksUri: + description: The URI used to request the public key to verify that the JWT assertion was signed by PRIVATE_KEY_JWT. + type: string + format: uri + maxLength: 2048 + pattern: ^https:\/\/.+$ + readOnly: true + ErrorInfo: + type: object + description: A structured error response providing details about a failed request, including the HTTP status code, an error code, and a human-readable message + required: + - status + - code + - message + properties: + status: + type: integer + format: int32 + minimum: 100 + maximum: 599 + description: HTTP response status code + code: + type: string + maxLength: 96 + description: A human-readable code to describe the error + message: + type: string + maxLength: 512 + description: A human-readable description of what the event represents + Source: + type: string + format: uri-reference + minLength: 1 + maxLength: 2048 + description: | + Identifies the context in which an event happened - be a non-empty `URI-reference` like: + - URI with a DNS authority: + * https://github.com/cloudevents + * mailto:cncf-wg-serverless@lists.cncf.io + - Universally-unique URN with a UUID: + * urn:uuid:6e8bc430-9c3a-11d9-9669-0800200c9a66 + - Application-specific identifier: + * /cloudevents/spec/pull/123 + * 1-555-123-4567 + example: https://notificationSendServer12.example.com + CloudEvent: + type: object + description: | + CloudEvents 1.0 specification envelope. + This schema is the stable base for all CAMARA event notifications. + It imposes no constraints on `type` values or `data` structure — + those concerns belong to the API-specific and lifecycle group schemas. + required: + - id + - source + - specversion + - type + - time + properties: + id: + type: string + maxLength: 256 + description: Identifier of this event, unique within the source context. + source: + $ref: '#/components/schemas/Source' + type: + type: string + maxLength: 512 + description: | + Identifies the event type. CAMARA APIs use reverse-DNS notation: + `org.camaraproject...` + The api-name segment makes each type globally unique across API groups. + specversion: + type: string + description: Version of the specification to which this event conforms (must be 1.0 if it conforms to cloudevents 1.0.2 version) + enum: + - '1.0' + datacontenttype: + type: string + description: media-type that describes the event payload encoding, must be "application/json" for CAMARA APIs + enum: + - application/json + data: + type: object + description: Event details payload. Structure is defined by each concrete event schema. + time: + $ref: '#/components/schemas/DateTime' responses: Generic400: description: Bad Request headers: x-correlator: - $ref: "#/components/headers/x-correlator" + $ref: '#/components/headers/x-correlator' content: application/json: schema: allOf: - - $ref: "../common/CAMARA_common.yaml#/components/schemas/ErrorInfo" + - $ref: '#/components/schemas/ErrorInfo' - type: object properties: status: @@ -533,7 +753,7 @@ components: application/json: schema: allOf: - - $ref: "../common/CAMARA_common.yaml#/components/schemas/ErrorInfo" + - $ref: '#/components/schemas/ErrorInfo' - type: object properties: status: @@ -549,7 +769,6 @@ components: status: 401 code: UNAUTHENTICATED message: Request not authenticated due to missing, invalid, or expired credentials. A new authentication is required. - Generic403: description: Forbidden headers: @@ -559,7 +778,7 @@ components: application/json: schema: allOf: - - $ref: "../common/CAMARA_common.yaml#/components/schemas/ErrorInfo" + - $ref: '#/components/schemas/ErrorInfo' - type: object properties: status: @@ -579,12 +798,12 @@ components: description: Not found headers: x-correlator: - $ref: "#/components/headers/x-correlator" + $ref: '#/components/headers/x-correlator' content: application/json: schema: allOf: - - $ref: "../common/CAMARA_common.yaml#/components/schemas/ErrorInfo" + - $ref: '#/components/schemas/ErrorInfo' - type: object properties: status: @@ -604,12 +823,12 @@ components: description: Gone headers: x-correlator: - $ref: "#/components/headers/x-correlator" + $ref: '#/components/headers/x-correlator' content: application/json: schema: allOf: - - $ref: "../common/CAMARA_common.yaml#/components/schemas/ErrorInfo" + - $ref: '#/components/schemas/ErrorInfo' - type: object properties: status: @@ -629,12 +848,12 @@ components: description: Unprocessable Content headers: x-correlator: - $ref: "#/components/headers/x-correlator" + $ref: '#/components/headers/x-correlator' content: application/json: schema: allOf: - - $ref: "../common/CAMARA_common.yaml#/components/schemas/ErrorInfo" + - $ref: '#/components/schemas/ErrorInfo' - type: object properties: status: @@ -661,12 +880,12 @@ components: description: Quota Exceed or Too Many Requests headers: x-correlator: - $ref: "#/components/headers/x-correlator" + $ref: '#/components/headers/x-correlator' content: application/json: schema: allOf: - - $ref: "../common/CAMARA_common.yaml#/components/schemas/ErrorInfo" + - $ref: '#/components/schemas/ErrorInfo' - type: object properties: status: @@ -689,14 +908,13 @@ components: status: 429 code: TOO_MANY_REQUESTS message: Rate limit reached. - examples: CREATE_CIRCLE: description: Create a circle service area slice value: serviceTime: - startDate: "2024-06-01T12:00:00Z" - endDate: "2024-06-02T12:00:00Z" + startDate: '2024-06-01T12:00:00Z' + endDate: '2024-06-02T12:00:00Z' serviceArea: areaType: CIRCLE center: @@ -717,19 +935,18 @@ components: upStreamDelayBudget: value: 12 unit: Milliseconds - sink: - "https://endpoint.example.com/sink" + sink: https://endpoint.example.com/sink sinkCredential: credentialType: ACCESSTOKEN - accessToken: "" - accessTokenExpiresUtc: "2025-12-31T23:59:59Z" + accessToken: + accessTokenExpiresUtc: '2025-12-31T23:59:59Z' accessTokenType: bearer CREATE_POLYGON: description: Create a polygon service area slice value: serviceTime: - startDate: "2024-06-01T12:00:00Z" - endDate: "2024-06-02T12:00:00Z" + startDate: '2024-06-01T12:00:00Z' + endDate: '2024-06-02T12:00:00Z' serviceArea: areaType: POLYGON boundary: @@ -755,19 +972,18 @@ components: upStreamDelayBudget: value: 12 unit: Milliseconds - sink: - "https://endpoint.example.com/sink" + sink: https://endpoint.example.com/sink sinkCredential: credentialType: ACCESSTOKEN - accessToken: "" - accessTokenExpiresUtc: "2025-12-31T23:59:59Z" + accessToken: + accessTokenExpiresUtc: '2025-12-31T23:59:59Z' accessTokenType: bearer RESPONSE_CIRCLE: description: Response example for a circle service area slice value: serviceTime: - startDate: "2024-06-01T12:00:00Z" - endDate: "2024-06-02T12:00:00Z" + startDate: '2024-06-01T12:00:00Z' + endDate: '2024-06-02T12:00:00Z' serviceArea: areaType: CIRCLE center: @@ -788,13 +1004,13 @@ components: upStreamDelayBudget: value: 12 unit: Milliseconds - sliceId: "3fa85f64-5717-4562-b3fc-2c963f66afa6" + sliceId: 3fa85f64-5717-4562-b3fc-2c963f66afa6 RESPONSE_POLYGON: description: Response example for a polygon service area slice value: serviceTime: - startDate: "2024-06-01T12:00:00Z" - endDate: "2024-06-02T12:00:00Z" + startDate: '2024-06-01T12:00:00Z' + endDate: '2024-06-02T12:00:00Z' serviceArea: areaType: POLYGON boundary: @@ -820,20 +1036,20 @@ components: upStreamDelayBudget: value: 12 unit: Milliseconds - sliceId: "3fa85f64-5717-4562-b3fc-2c963f66afa6" + sliceId: 3fa85f64-5717-4562-b3fc-2c963f66afa6 SLICE_CREATED_EVENT_CIRCLE: description: Event example for a slice created with circle service area value: - id: "83a0d986-0866-4f38-b8c0-fc65bfcda452" - source: "https://notificationSendServer12.example.com" - specversion: "1.0" - type: "org.camaraproject.network-slice-booking.v0.status-changed" - datacontenttype: "application/json" - time: "2024-06-01T12:00:00Z" + id: 83a0d986-0866-4f38-b8c0-fc65bfcda452 + source: https://notificationSendServer12.example.com + specversion: '1.0' + type: org.camaraproject.network-slice-booking.v0.status-changed + datacontenttype: application/json + time: '2024-06-01T12:00:00Z' data: serviceTime: - startDate: "2024-06-01T12:00:00Z" - endDate: "2024-06-02T12:00:00Z" + startDate: '2024-06-01T12:00:00Z' + endDate: '2024-06-02T12:00:00Z' serviceArea: areaType: CIRCLE center: @@ -854,20 +1070,20 @@ components: upStreamDelayBudget: value: 12 unit: Milliseconds - sliceId: "3fa85f64-5717-4562-b3fc-2c963f66afa6" + sliceId: 3fa85f64-5717-4562-b3fc-2c963f66afa6 SLICE_CREATED_EVENT_POLYGON: description: Event example for a slice created with polygon service area value: - id: "83a0d986-0866-4f38-b8c0-fc65bfcda452" - source: "https://notificationSendServer12.example.com" - specversion: "1.0" - type: "org.camaraproject.network-slice-booking.v0.status-changed" - datacontenttype: "application/json" - time: "2024-06-01T12:00:00Z" + id: 83a0d986-0866-4f38-b8c0-fc65bfcda452 + source: https://notificationSendServer12.example.com + specversion: '1.0' + type: org.camaraproject.network-slice-booking.v0.status-changed + datacontenttype: application/json + time: '2024-06-01T12:00:00Z' data: serviceTime: - startDate: "2024-06-01T12:00:00Z" - endDate: "2024-06-02T12:00:00Z" + startDate: '2024-06-01T12:00:00Z' + endDate: '2024-06-02T12:00:00Z' serviceArea: areaType: POLYGON boundary: @@ -893,4 +1109,4 @@ components: upStreamDelayBudget: value: 12 unit: Milliseconds - sliceId: "3fa85f64-5717-4562-b3fc-2c963f66afa6" + sliceId: 3fa85f64-5717-4562-b3fc-2c963f66afa6 diff --git a/code/Test_definitions/network-slice-assignment-assignDevice.feature b/code/Test_definitions/network-slice-assignment-assignDevice.feature index 68e642c..ec1838d 100644 --- a/code/Test_definitions/network-slice-assignment-assignDevice.feature +++ b/code/Test_definitions/network-slice-assignment-assignDevice.feature @@ -1,4 +1,4 @@ -Feature: CAMARA Network Slice Assignment API vwip - Operation assignDevice +Feature: CAMARA Network Slice Assignment API v0.1.0 - Operation assignDevice # Input to be provided by the implementation to the tester # @@ -11,7 +11,7 @@ Feature: CAMARA Network Slice Assignment API vwip - Operation assignDevice Background: Common assignDevice setup Given an environment at "apiRoot" - And the resource "/network-slice-assignment/vwip/slices/{sliceId}/devices" + And the resource "/network-slice-assignment/v0.1/slices/{sliceId}/devices" And the header "Content-Type" is set to "application/json" And the header "Authorization" is set to a valid access token And the header "x-correlator" complies with the schema at "#/components/schemas/XCorrelator" diff --git a/code/Test_definitions/network-slice-assignment-getDevices.feature b/code/Test_definitions/network-slice-assignment-getDevices.feature index d6b5020..0b1c43c 100644 --- a/code/Test_definitions/network-slice-assignment-getDevices.feature +++ b/code/Test_definitions/network-slice-assignment-getDevices.feature @@ -1,4 +1,4 @@ -Feature: CAMARA Network Slice Assignment API vwip - Operation getDevices +Feature: CAMARA Network Slice Assignment API v0.1.0 - Operation getDevices # Get information about devices assigned to an existing network slice. @@ -18,7 +18,7 @@ Feature: CAMARA Network Slice Assignment API vwip - Operation getDevices Background: Common getDevices setup Given an environment at "apiRoot" - And the resource "/network-slice-assignment/vwip/slices/{sliceId}/devices" + And the resource "/network-slice-assignment/v0.1/slices/{sliceId}/devices" And the header "Content-Type" is set to "application/json" And the header "Authorization" is set to a valid access token And the header "x-correlator" complies with the schema at "#/components/schemas/XCorrelator" diff --git a/code/Test_definitions/network-slice-assignment-releaseDevice.feature b/code/Test_definitions/network-slice-assignment-releaseDevice.feature index c92685e..5985802 100644 --- a/code/Test_definitions/network-slice-assignment-releaseDevice.feature +++ b/code/Test_definitions/network-slice-assignment-releaseDevice.feature @@ -1,4 +1,4 @@ -Feature: CAMARA Network Slice Assignment API vwip - Operation releaseDevice +Feature: CAMARA Network Slice Assignment API v0.1.0 - Operation releaseDevice # Input to be provided by the implementation to the tester # @@ -13,7 +13,7 @@ Feature: CAMARA Network Slice Assignment API vwip - Operation releaseDevice Background: Common releaseDevice setup Given an environment at "apiRoot" - And the resource "/network-slice-assignment/vwip/slices/{sliceId}/release" + And the resource "/network-slice-assignment/v0.1/slices/{sliceId}/release" And the header "Content-Type" is set to "application/json" And the header "Authorization" is set to a valid access token And the header "x-correlator" complies with the schema at "#/components/schemas/XCorrelator" diff --git a/code/Test_definitions/network-slice-assignment-retrieveSlicesByDevice.feature b/code/Test_definitions/network-slice-assignment-retrieveSlicesByDevice.feature index e4035c1..45a39f1 100644 --- a/code/Test_definitions/network-slice-assignment-retrieveSlicesByDevice.feature +++ b/code/Test_definitions/network-slice-assignment-retrieveSlicesByDevice.feature @@ -1,4 +1,4 @@ -Feature: CAMARA Network Slice Assignment API vwip - Operation retrieveSlicesByDevice +Feature: CAMARA Network Slice Assignment API v0.1.0 - Operation retrieveSlicesByDevice # Retrieve the list of network slices to which a device is assigned. @@ -18,7 +18,7 @@ Feature: CAMARA Network Slice Assignment API vwip - Operation retrieveSlicesByDe Background: Common retrieveSlicesByDevice setup Given an environment at "apiRoot" - And the resource "/network-slice-assignment/vwip/retrieve-slices" + And the resource "/network-slice-assignment/v0.1/retrieve-slices" And the header "Content-Type" is set to "application/json" And the header "Authorization" is set to a valid access token And the header "x-correlator" complies with the schema at "#/components/schemas/XCorrelator" diff --git a/code/Test_definitions/network-slice-booking-createSlice.feature b/code/Test_definitions/network-slice-booking-createSlice.feature index 4751340..d811022 100644 --- a/code/Test_definitions/network-slice-booking-createSlice.feature +++ b/code/Test_definitions/network-slice-booking-createSlice.feature @@ -1,4 +1,4 @@ -Feature: CAMARA Network Slice Booking API vwip - Operation createSlice +Feature: CAMARA Network Slice Booking API v0.2.0 - Operation createSlice # Input to be provided by the implementation to the tester # @@ -18,7 +18,7 @@ Feature: CAMARA Network Slice Booking API vwip - Operation createSlice Background: Common createSlice setup Given an environment at "apiRoot" - And the resource "/network-slice-booking/vwip/slices" + And the resource "/network-slice-booking/v0.2/slices" And the header "Content-Type" is set to "application/json" And the header "Authorization" is set to a valid access token And the header "x-correlator" complies with the schema at "#/components/schemas/XCorrelator" diff --git a/code/Test_definitions/network-slice-booking-deleteSlice.feature b/code/Test_definitions/network-slice-booking-deleteSlice.feature index 6ea2fc5..643d90a 100644 --- a/code/Test_definitions/network-slice-booking-deleteSlice.feature +++ b/code/Test_definitions/network-slice-booking-deleteSlice.feature @@ -1,4 +1,4 @@ -Feature: CAMARA Network Slice Booking API vwip - Operation deleteSlice +Feature: CAMARA Network Slice Booking API v0.2.0 - Operation deleteSlice # Input to be provided by the implementation to the tester # @@ -11,7 +11,7 @@ Feature: CAMARA Network Slice Booking API vwip - Operation deleteSlice Background: Common deleteSlice setup Given an environment at "apiRoot" - And the resource "/network-slice-booking/vwip/slices/{sliceId}" + And the resource "/network-slice-booking/v0.2/slices/{sliceId}" And the header "Content-Type" is set to "application/json" And the header "Authorization" is set to a valid access token And the header "x-correlator" complies with the schema at "#/components/schemas/XCorrelator" diff --git a/code/Test_definitions/network-slice-booking-getSlice.feature b/code/Test_definitions/network-slice-booking-getSlice.feature index 8605ed9..64e10c7 100644 --- a/code/Test_definitions/network-slice-booking-getSlice.feature +++ b/code/Test_definitions/network-slice-booking-getSlice.feature @@ -1,4 +1,4 @@ -Feature: CAMARA Network Slice Booking API vwip - Operation getSlice +Feature: CAMARA Network Slice Booking API v0.2.0 - Operation getSlice # Input to be provided by the implementation to the tester # @@ -11,7 +11,7 @@ Feature: CAMARA Network Slice Booking API vwip - Operation getSlice Background: Common getSlice setup Given an environment at "apiRoot" - And the resource "/network-slice-booking/vwip/slices/{sliceId}" + And the resource "/network-slice-booking/v0.2/slices/{sliceId}" And the header "Content-Type" is set to "application/json" And the header "Authorization" is set to a valid access token And the header "x-correlator" complies with the schema at "#/components/schemas/XCorrelator" diff --git a/code/common/.sync-manifest.yaml b/code/common/.sync-manifest.yaml deleted file mode 100644 index 0de41d2..0000000 --- a/code/common/.sync-manifest.yaml +++ /dev/null @@ -1,7 +0,0 @@ -sources: -- repository: Commonalities - release: r4.3 - files: - CAMARA_common.yaml: 73895974478c1d8fffd2ba7b7a6553eec1a145b1 - CAMARA_event_common.yaml: 42e72db4f3e8562b93b54b6182c40afb2b850d48 - info-description-templates.yaml: 1c7928d2cf51c70b8cdea7b4e5fdbaa75f7d984b diff --git a/code/common/CAMARA_common.yaml b/code/common/CAMARA_common.yaml deleted file mode 100644 index 7389597..0000000 --- a/code/common/CAMARA_common.yaml +++ /dev/null @@ -1,931 +0,0 @@ -info: - title: CAMARA common data types - description: | - Common data types for CAMARA APIs. - This file contains Commonalities-owned schemas that are identical across all - CAMARA APIs, including error responses, common parameters, headers, and - reusable data types. - - API repositories place this file in `code/common/` and reference schemas - via `$ref: "../common/CAMARA_common.yaml#/components/schemas/"`. - license: - name: Apache 2.0 - url: https://www.apache.org/licenses/LICENSE-2.0.html - version: wip - x-camara-commonalities: 0.8.0 - -components: - securitySchemes: - openId: - type: openIdConnect - openIdConnectUrl: https://example.com/.well-known/openid-configuration - description: OpenID Connect authentication via discovery metadata. - - headers: - x-correlator: - description: Correlation id for the different services - schema: - $ref: "#/components/schemas/XCorrelator" - - x-total-count: - description: Total number of items. Mirrors `pagination.totalCount` in the response body. - required: false - schema: - $ref: "#/components/schemas/TotalCount" - - x-total-pages: - description: Total number of pages. Mirrors `pagination.totalPages` in the response body. - required: false - schema: - $ref: "#/components/schemas/TotalPages" - - link: - description: | - Navigation links for paginated results following - [RFC 8288](https://www.rfc-editor.org/rfc/rfc8288). - Includes only the rels applicable to the current position - (`first`, `prev`, `next`, `last`). All original query parameters - are preserved in Link URLs. - Example: - Link: ; rel="first", - ; rel="prev", - ; rel="next", - ; rel="last" - required: false - schema: - type: string - maxLength: 8192 - - parameters: - x-correlator: - name: x-correlator - in: header - description: Correlation id for the different services - schema: - $ref: "#/components/schemas/XCorrelator" - - page: - name: page - in: query - description: > - Requested page number. Pages are 1-indexed. - Values below 1 are rejected with `400 INVALID_ARGUMENT`. - required: false - schema: - $ref: "#/components/schemas/Page" - - perPage: - name: perPage - in: query - description: > - Number of subscriptions to return per page. - Values outside the allowed range are rejected with `400 INVALID_ARGUMENT`. - required: false - schema: - $ref: "#/components/schemas/PerPage" - - schemas: - XCorrelator: - type: string - description: Correlator string, UUID format recommended but any string matching the pattern can be used - pattern: ^[a-zA-Z0-9-_:;.\/<>{}]{0,256}$ - maxLength: 256 - example: "b4333c46-49c0-4f62-80d7-f0ef930f1c46" - DateTime: - type: string - format: date-time - maxLength: 64 - description: Timestamp. It must follow [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) and must have time zone. - example: "2018-04-05T17:31:00Z" - TimePeriod: - type: object - description: A period of time defined by a start date and an optional end date. If `endDate` is not included, then the period has no ending date. - properties: - startDate: - $ref: "#/components/schemas/DateTime" - endDate: - $ref: "#/components/schemas/DateTime" - required: - - startDate - ErrorInfo: - type: object - description: A structured error response providing details about a failed request, including the HTTP status code, an error code, and a human-readable message - required: - - status - - code - - message - properties: - status: - type: integer - format: int32 - minimum: 100 - maximum: 599 - description: HTTP response status code - code: - type: string - maxLength: 96 - description: A human-readable code to describe the error - message: - type: string - maxLength: 512 - description: A human-readable description of what the event represents - Device: - description: | - End-user equipment able to connect to a mobile network. Examples of devices include smartphones or IoT sensors/actuators. - The developer can choose to provide the below specified device identifiers: - * `ipv4Address` - * `ipv6Address` - * `phoneNumber` - * `networkAccessIdentifier` - NOTE1: the network operator might support only a subset of these options. The API Consumer can provide multiple identifiers to ensure compatibility across different network operators. In this case, the API Provider will use one of the identifiers for the API logic without performing any matching checks among the provided identifiers. - NOTE2: as for this Commonalities release, we are enforcing that the networkAccessIdentifier is only part of the schema for future-proofing, and CAMARA does not currently allow its use. After the CAMARA meta-release work is concluded and the relevant issues are resolved, its use will need to be explicitly documented in the guidelines. - type: object - properties: - phoneNumber: - $ref: "#/components/schemas/PhoneNumber" - networkAccessIdentifier: - $ref: "#/components/schemas/NetworkAccessIdentifier" - ipv4Address: - $ref: "#/components/schemas/DeviceIpv4Address" - ipv6Address: - $ref: "#/components/schemas/DeviceIpv6Address" - minProperties: 1 - - DeviceResponse: - description: | - An identifier for the end-user equipment able to connect to the network that the response refers to. This parameter is only returned when the API consumer includes the `device` parameter in their request (i.e. they are using a two-legged access token), and is relevant when more than one device identifier is specified, as only one of those device identifiers is allowed in the response. - - If the API consumer provides more than one device identifier in their request, and this schema is included in the response definition, the API provider MUST use it to return a single identifier which is the one they are using to fulfil the request, even if the identifiers do not match the same device. API provider does not perform any logic to validate/correlate that the indicated device identifiers match the same device. No error should be returned if the identifiers are otherwise valid to prevent API consumers correlating different identifiers with a given end user. - - allOf: - - $ref: "#/components/schemas/Device" - - maxProperties: 1 - - PhoneNumber: - description: A public identifier addressing a telephone subscription. In mobile networks it corresponds to the MSISDN (Mobile Station International Subscriber Directory Number). In order to be globally unique it has to be formatted in international format, according to E.164 standard, prefixed with '+'. - type: string - pattern: '^\+[1-9][0-9]{4,14}$' - maxLength: 16 - example: "+123456789" - - NetworkAccessIdentifier: - description: A public identifier addressing a subscription in a mobile network. In 3GPP terminology, it corresponds to the GPSI formatted with the External Identifier ({Local Identifier}@{Domain Identifier}). Unlike the telephone number, the network access identifier is not subjected to portability ruling in force, and is individually managed by each operator. - type: string - maxLength: 2048 - example: "123456789@example.com" - - DeviceIpv4Address: - type: object - description: | - The device should be identified by either the public (observed) IP address and port as seen by the application server, or the private (local) and any public (observed) IP addresses in use by the device (this information can be obtained by various means, for example from some DNS servers). - - If the allocated and observed IP addresses are the same (i.e. NAT is not in use) then the same address should be specified for both publicAddress and privateAddress. - - If NAT64 is in use, the device should be identified by its publicAddress and publicPort, or separately by its allocated IPv6 address (field ipv6Address of the Device object) - - In all cases, publicAddress must be specified, along with at least one of either privateAddress or publicPort, dependent upon which is known. In general, mobile devices cannot be identified by their public IPv4 address alone. - properties: - publicAddress: - $ref: "#/components/schemas/SingleIpv4Address" - privateAddress: - $ref: "#/components/schemas/SingleIpv4Address" - publicPort: - $ref: "#/components/schemas/Port" - anyOf: - - required: [publicAddress, privateAddress] - - required: [publicAddress, publicPort] - example: - publicAddress: "84.125.93.10" - publicPort: 59765 - - SingleIpv4Address: - description: A single IPv4 address with no subnet mask - type: string - format: ipv4 - maxLength: 15 - example: "84.125.93.10" - - Port: - description: TCP or UDP port number - type: integer - format: int32 - minimum: 1 - maximum: 65535 - - DeviceIpv6Address: - description: | - The device should be identified by the observed IPv6 address, or by any single IPv6 address from within the subnet allocated to the device (e.g. adding ::0 to the /64 prefix). - type: string - format: ipv6 - maxLength: 45 - example: 2001:db8:85a3:8d3:1319:8a2e:370:7344 - - Area: - description: Base schema for all areas - type: object - properties: - areaType: - $ref: "#/components/schemas/AreaType" - required: - - areaType - discriminator: - propertyName: areaType - mapping: - CIRCLE: "#/components/schemas/Circle" - POLYGON: "#/components/schemas/Polygon" - - AreaType: - type: string - description: | - Type of this area. - CIRCLE - The area is defined as a circle. - POLYGON - The area is defined as a polygon. - enum: - - CIRCLE - - POLYGON - - Circle: - description: Circular area - allOf: - - $ref: "#/components/schemas/Area" - - type: object - required: - - center - - radius - properties: - center: - $ref: "#/components/schemas/Point" - radius: - type: number - description: Distance from the center in meters - minimum: 1 - - Polygon: - description: Polygonal area. The Polygon should be a simple polygon, i.e. should not intersect itself. - allOf: - - $ref: "#/components/schemas/Area" - - type: object - required: - - boundary - properties: - boundary: - $ref: "#/components/schemas/PointList" - - PointList: - description: List of points defining a polygon - type: array - items: - $ref: "#/components/schemas/Point" - minItems: 3 - maxItems: 15 - - Point: - type: object - description: Coordinates (latitude, longitude) defining a location in a map - required: - - latitude - - longitude - properties: - latitude: - $ref: "#/components/schemas/Latitude" - longitude: - $ref: "#/components/schemas/Longitude" - example: - latitude: 50.735851 - longitude: 7.10066 - - Latitude: - description: Latitude component of a location - type: number - format: double - minimum: -90 - maximum: 90 - - Longitude: - description: Longitude component of location - type: number - format: double - minimum: -180 - maximum: 180 - - # ───────────────────────────────────────────────────────────────────────── - # Pagination - # ───────────────────────────────────────────────────────────────────────── - - Pagination: - description: Pagination details helping to navigate through paged results efficiently. - type: object - properties: - page: - $ref: "#/components/schemas/Page" - perPage: - $ref: "#/components/schemas/PerPage" - totalCount: - $ref: "#/components/schemas/TotalCount" - totalPages: - $ref: "#/components/schemas/TotalPages" - - Page: - type: integer - format: int32 - minimum: 1 - maximum: 2147483647 - default: 1 - description: Current page number (1-indexed). - example: 1 - PerPage: - type: integer - format: int32 - minimum: 1 - maximum: 100 - default: 20 - description: Number of items per page. - example: 20 - TotalCount: - type: integer - format: int32 - minimum: 0 - maximum: 2147483647 - description: Total number of items matching the query, after filters applied. MAY be omitted where a full count query is prohibitively expensive. - example: 87 - TotalPages: - type: integer - format: int32 - minimum: 0 - maximum: 2147483647 - description: Total number of pages. Equals ceil(totalCount / perPage). MAY be omitted where totalCount is omitted. - example: 5 - responses: - ####################################################### - ####################################################### - # ERROR RESPONSE SCHEMA TEMPLATE - # - Objective: Make normative error `status` and `code` values - # - Schema Template rationale: - # - The `allOf` in content.application/json.schema allows a combination of both the generic ErrorInfo schema and the specific schema for this error response, - # which validates that `status` and `code` have only the specified values. - # This `allOf` is used without discriminator because it does not imply any hierarchy between the models, just 2 schemas that must be independently validated. - ####################################################### - # ErrorResponseSchema: - # ... - # content: - # application/json: - # schema: - # allOf: - # - $ref: '#/components/schemas/ErrorInfo' - # - type: object - # properties: - # status: - # enum: - # - - # code: - # enum: - # - - # - - # examples: - # ExampleKey1: - # value: - # status: - # code: - # message: - # ExampleKey2: - # value: - # status: - # code: - # message: - ####################################################### - ####################################################### - Generic400: - description: Bad Request - headers: - x-correlator: - $ref: "#/components/headers/x-correlator" - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/ErrorInfo" - - type: object - properties: - status: - enum: - - 400 - code: - enum: - - INVALID_ARGUMENT - - OUT_OF_RANGE - # - "{{SPECIFIC_CODE}}" - API-specific codes added if needed - examples: - GENERIC_400_INVALID_ARGUMENT: - description: Invalid Argument. Generic Syntax Exception - value: - status: 400 - code: INVALID_ARGUMENT - message: Client specified an invalid argument, request body or query param. - GENERIC_400_OUT_OF_RANGE: - description: Out of Range. Specific Syntax Exception used when a given field has a pre-defined range or a invalid filter criteria combination is requested - value: - status: 400 - code: OUT_OF_RANGE - message: Client specified an invalid range. - # GENERIC_400_{{SPECIFIC_CODE}}: - # description: Specific Syntax Exception regarding a field that is relevant in the context of the API - # value: - # status: 400 - # code: "{{SPECIFIC_CODE}}" - # message: Message for specific code - Generic401: - description: Unauthorized - headers: - x-correlator: - $ref: "#/components/headers/x-correlator" - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/ErrorInfo" - - type: object - properties: - status: - enum: - - 401 - code: - enum: - - UNAUTHENTICATED - examples: - GENERIC_401_UNAUTHENTICATED: - description: Request cannot be authenticated and a new authentication is required - value: - status: 401 - code: UNAUTHENTICATED - message: Request not authenticated due to missing, invalid, or expired credentials. A new authentication is required. - Generic403: - description: Forbidden - headers: - x-correlator: - $ref: "#/components/headers/x-correlator" - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/ErrorInfo" - - type: object - properties: - status: - enum: - - 403 - code: - enum: - - PERMISSION_DENIED - - INVALID_TOKEN_CONTEXT - # - "{{SPECIFIC_CODE}}" - API-specific codes added if needed - examples: - GENERIC_403_PERMISSION_DENIED: - description: Permission denied. OAuth2 token access does not have the required scope or when the user fails operational security - value: - 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." - message: "Request body is not consistent with access token." - # GENERIC_403_{{SPECIFIC_CODE}}: - # description: Indicate a Business Logic condition that forbids a process not attached to a specific field in the context of the API - # value: - # status: 403 - # code: "{{SPECIFIC_CODE}}" - # message: Message for specific code - Generic404: - description: Not found - headers: - x-correlator: - $ref: "#/components/headers/x-correlator" - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/ErrorInfo" - - type: object - properties: - status: - enum: - - 404 - code: - enum: - - NOT_FOUND - - IDENTIFIER_NOT_FOUND - # - "{{SPECIFIC_CODE}}" - API-specific codes added if needed - examples: - GENERIC_404_NOT_FOUND: - description: Resource is not found - value: - status: 404 - code: NOT_FOUND - message: The specified resource is not found. - GENERIC_404_IDENTIFIER_NOT_FOUND: - description: Some identifier cannot be matched to a device - value: - status: 404 - code: IDENTIFIER_NOT_FOUND - message: Device identifier not found. - # GENERIC_404_{{SPECIFIC_CODE}}: - # description: Specific situation to highlight the resource/concept not found - # value: - # status: 404 - # code: "{{SPECIFIC_CODE}}" - # message: Message for specific code - Generic405: - description: Method Not Allowed - headers: - x-correlator: - $ref: "#/components/headers/x-correlator" - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/ErrorInfo" - - type: object - properties: - status: - enum: - - 405 - code: - enum: - - METHOD_NOT_ALLOWED - examples: - GENERIC_405_METHOD_NOT_ALLOWED: - description: Invalid HTTP verb used with a given endpoint - value: - status: 405 - code: METHOD_NOT_ALLOWED - message: The requested method is not allowed/supported on the target resource. - Generic406: - description: Not Acceptable - headers: - x-correlator: - $ref: "#/components/headers/x-correlator" - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/ErrorInfo" - - type: object - properties: - status: - enum: - - 406 - code: - enum: - - NOT_ACCEPTABLE - examples: - GENERIC_406_NOT_ACCEPTABLE: - description: API Server does not accept the media type (`Accept-*` header) indicated by API client - value: - status: 406 - code: NOT_ACCEPTABLE - message: The server cannot produce a response matching the content requested by the client through `Accept-*` headers. - Generic409: - description: Conflict - headers: - x-correlator: - $ref: "#/components/headers/x-correlator" - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/ErrorInfo" - - type: object - properties: - status: - enum: - - 409 - code: - enum: - - ABORTED - - ALREADY_EXISTS - - CONFLICT - - INCOMPATIBLE_STATE - # - "{{SPECIFIC_CODE}}" - API-specific codes added if needed - examples: - GENERIC_409_ABORTED: - description: The resource is undergoing modification by another process - value: - status: 409 - code: ABORTED - message: Resource is being modified by another operation. Please wait, and retry if appropriate. - GENERIC_409_ALREADY_EXISTS: - description: Trying to create an existing resource - value: - status: 409 - code: ALREADY_EXISTS - message: The resource that a client tried to create already exists. - GENERIC_409_CONFLICT: - ################################### - # This Error Code is DEPRECATED - ################################### - description: Duplication of an existing resource - value: - status: 409 - code: CONFLICT - message: A specified resource duplicate entry found. - GENERIC_409_INCOMPATIBLE_STATE: - description: | - The status of the referenced resource is not compatible. - value: - status: 409 - code: INCOMPATIBLE_STATE - message: Resource must be in AVAILABLE state to extend. Current state is UNAVAILABLE. - # GENERIC_409_{{SPECIFIC_CODE}}: - # description: Specific conflict situation that is relevant in the context of the API - # value: - # status: 409 - # code: "{{SPECIFIC_CODE}}" - # message: Message for specific code - Generic410: - description: Gone - headers: - x-correlator: - $ref: "#/components/headers/x-correlator" - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/ErrorInfo" - - type: object - properties: - status: - enum: - - 410 - code: - enum: - - GONE - examples: - GENERIC_410_GONE: - description: Use in notifications flow to allow API Consumer to indicate that its callback is no longer available - value: - status: 410 - code: GONE - message: Access to the target resource is no longer available. - Generic412: - description: Failed precondition - headers: - x-correlator: - $ref: "#/components/headers/x-correlator" - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/ErrorInfo" - - type: object - properties: - status: - enum: - - 412 - code: - enum: - - FAILED_PRECONDITION - examples: - GENERIC_412_FAILED_PRECONDITION: - description: Indication by the API Server that the request cannot be processed in current system state - value: - status: 412 - code: FAILED_PRECONDITION - message: Request cannot be executed in the current system state. - Generic415: - description: Unsupported Media Type - headers: - x-correlator: - $ref: "#/components/headers/x-correlator" - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/ErrorInfo" - - type: object - properties: - status: - enum: - - 415 - code: - enum: - - UNSUPPORTED_MEDIA_TYPE - 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. - Generic422: - description: Unprocessable Content - headers: - x-correlator: - $ref: "#/components/headers/x-correlator" - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/ErrorInfo" - - type: object - properties: - status: - enum: - - 422 - code: - enum: - - SERVICE_NOT_APPLICABLE - - MISSING_IDENTIFIER - - UNSUPPORTED_IDENTIFIER - - UNNECESSARY_IDENTIFIER - # - "{{SPECIFIC_CODE}}" - API-specific codes added if needed - examples: - GENERIC_422_SERVICE_NOT_APPLICABLE: - description: Service not applicable for the provided identifier - value: - status: 422 - code: SERVICE_NOT_APPLICABLE - message: The service is not available for the provided identifier. - GENERIC_422_MISSING_IDENTIFIER: - description: An identifier is not included in the request and the device or phone number identification cannot be derived from the 3-legged access token - value: - status: 422 - code: MISSING_IDENTIFIER - message: The device cannot be identified. - GENERIC_422_UNSUPPORTED_IDENTIFIER: - description: None of the provided identifiers is supported by the implementation - value: - status: 422 - code: UNSUPPORTED_IDENTIFIER - message: The identifier provided is not supported. - GENERIC_422_UNNECESSARY_IDENTIFIER: - description: An explicit identifier is provided when a device or phone number has already been identified from the access token - value: - status: 422 - code: UNNECESSARY_IDENTIFIER - message: The device is already identified by the access token. - # GENERIC_422_{{SPECIFIC_CODE}}: - # description: Any semantic condition associated to business logic, specifically related to a field or data structure - # value: - # status: 422 - # code: "{{SPECIFIC_CODE}}" - # message: Message for specific code - Generic429: - description: Too Many Requests - headers: - x-correlator: - $ref: "#/components/headers/x-correlator" - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/ErrorInfo" - - type: object - properties: - status: - enum: - - 429 - code: - enum: - - QUOTA_EXCEEDED - - TOO_MANY_REQUESTS - examples: - GENERIC_429_QUOTA_EXCEEDED: - description: Request is rejected due to exceeding a business quota limit - value: - status: 429 - code: QUOTA_EXCEEDED - message: Out of resource quota. - GENERIC_429_TOO_MANY_REQUESTS: - description: Access to the API has been temporarily blocked due to rate or spike arrest limits being reached - value: - status: 429 - code: TOO_MANY_REQUESTS - message: Rate limit reached. - Generic500: - description: Internal Server Error - headers: - x-correlator: - $ref: "#/components/headers/x-correlator" - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/ErrorInfo" - - type: object - properties: - status: - enum: - - 500 - code: - enum: - - INTERNAL - examples: - GENERIC_500_INTERNAL: - description: Problem in Server side. Regular Server Exception - value: - status: 500 - code: INTERNAL - message: Unknown server error. Typically a server bug. - Generic501: - description: Not Implemented - headers: - x-correlator: - $ref: "#/components/headers/x-correlator" - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/ErrorInfo" - - type: object - properties: - status: - enum: - - 501 - code: - enum: - - NOT_IMPLEMENTED - examples: - GENERIC_501_NOT_IMPLEMENTED: - description: Service not implemented. The use of this code should be avoided as far as possible to get the objective to reach aligned implementations - value: - status: 501 - code: NOT_IMPLEMENTED - message: This functionality is not implemented yet. - Generic502: - description: Bad Gateway - headers: - x-correlator: - $ref: "#/components/headers/x-correlator" - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/ErrorInfo" - - type: object - properties: - status: - enum: - - 502 - code: - enum: - - BAD_GATEWAY - examples: - GENERIC_502_BAD_GATEWAY: - description: Internal routing problem in the Server side that blocks to manage the service properly - value: - status: 502 - code: BAD_GATEWAY - message: An upstream internal service cannot be reached. - Generic503: - description: Service Unavailable - headers: - x-correlator: - $ref: "#/components/headers/x-correlator" - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/ErrorInfo" - - type: object - properties: - status: - enum: - - 503 - code: - enum: - - UNAVAILABLE - examples: - GENERIC_503_UNAVAILABLE: - description: Service is not available. Temporary situation usually related to maintenance process in the server side - value: - status: 503 - code: UNAVAILABLE - message: Service Unavailable. - Generic504: - description: Gateway Timeout - headers: - x-correlator: - $ref: "#/components/headers/x-correlator" - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/ErrorInfo" - - type: object - properties: - status: - enum: - - 504 - code: - enum: - - TIMEOUT - examples: - GENERIC_504_TIMEOUT: - description: API Server Timeout - value: - status: 504 - code: TIMEOUT - message: Request timeout exceeded. diff --git a/code/common/CAMARA_event_common.yaml b/code/common/CAMARA_event_common.yaml deleted file mode 100644 index 42e72db..0000000 --- a/code/common/CAMARA_event_common.yaml +++ /dev/null @@ -1,650 +0,0 @@ -info: - title: CAMARA common event and subscription data types - description: | - Common data types for CAMARA event notification and subscription management. - This file contains Commonalities-owned schemas that are identical across all - CAMARA APIs supporting event notifications and/or explicit subscriptions. - - API repositories place this file in `code/common/` alongside `CAMARA_common.yaml` - and reference schemas via `$ref: "../common/CAMARA_event_common.yaml#/components/schemas/"`. - license: - name: Apache 2.0 - url: https://www.apache.org/licenses/LICENSE-2.0.html - version: wip - x-camara-commonalities: 0.8.0 - -components: - securitySchemes: - notificationsBearerAuth: - type: http - scheme: bearer - bearerFormat: "{$request.body#/sinkCredential.credentialType}" - description: | - Bearer token for notification delivery. Token format is determined - by `sinkCredential.credentialType` in the subscription request. - - schemas: - - # ───────────────────────────────────────────────────────────────────────── - # Section 1: CloudEvents 1.0 envelope - # - # Pure CloudEvents 1.0 specification envelope. Knows nothing about CAMARA - # event types, data payloads, or discriminator mappings. Any CAMARA API - # that needs to send a notification starts here. - # ───────────────────────────────────────────────────────────────────────── - - CloudEvent: - type: object - description: | - CloudEvents 1.0 specification envelope. - This schema is the stable base for all CAMARA event notifications. - It imposes no constraints on `type` values or `data` structure — - those concerns belong to the API-specific and lifecycle group schemas. - required: - - id - - source - - specversion - - type - - time - properties: - id: - type: string - maxLength: 256 - description: Identifier of this event, unique within the source context. - source: - $ref: "#/components/schemas/Source" - type: - type: string - maxLength: 512 - description: | - Identifies the event type. CAMARA APIs use reverse-DNS notation: - `org.camaraproject...` - The api-name segment makes each type globally unique across API groups. - specversion: - type: string - description: Version of the specification to which this event conforms (must be 1.0 if it conforms to cloudevents 1.0.2 version) - enum: - - "1.0" - datacontenttype: - type: string - description: 'media-type that describes the event payload encoding, must be "application/json" for CAMARA APIs' - enum: - - application/json - data: - type: object - description: Event details payload. Structure is defined by each concrete event schema. - time: - $ref: "CAMARA_common.yaml#/components/schemas/DateTime" - - Source: - type: string - format: uri-reference - minLength: 1 - maxLength: 2048 - description: | - Identifies the context in which an event happened - be a non-empty `URI-reference` like: - - URI with a DNS authority: - * https://github.com/cloudevents - * mailto:cncf-wg-serverless@lists.cncf.io - - Universally-unique URN with a UUID: - * urn:uuid:6e8bc430-9c3a-11d9-9669-0800200c9a66 - - Application-specific identifier: - * /cloudevents/spec/pull/123 - * 1-555-123-4567 - example: "https://notificationSendServer12.example.com" - - # ───────────────────────────────────────────────────────────────────────── - # Section 2: Subscription management - # - # Configuration and identification schemas used by the subscription - # management endpoints. These are Commonalities-owned and identical - # across all CAMARA APIs that support explicit subscriptions. - # ───────────────────────────────────────────────────────────────────────── - - SubscriptionId: - type: string - maxLength: 256 - description: The unique identifier of the subscription in the scope of the subscription manager. 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 - - Config: - description: | - Implementation-specific configuration parameters needed by the subscription manager for acquiring events. - In CAMARA we have predefined attributes like `subscriptionExpireTime`, `subscriptionMaxEvents`, `initialEvent` - Specific event type attributes must be defined in `subscriptionDetail`. - Note: if a request is performed for several event types, all subscribed events will use same `config` parameters. - type: object - required: - - subscriptionDetail - properties: - subscriptionDetail: - $ref: "#/components/schemas/CreateSubscriptionDetail" - subscriptionExpireTime: - type: string - format: date-time - maxLength: 64 - example: 2023-01-17T13:18:23.682Z - description: The subscription expiration time (in date-time format) requested by the API consumer. It must follow [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) and must have time zone. Up to API project decision to keep it. - subscriptionMaxEvents: - type: integer - format: int32 - description: Identifies the maximum number of event reports to be generated (>=1) requested by the API consumer - Once this number is reached, the subscription ends. Up to API project decision to keep it. - minimum: 1 - maximum: 1000000 - example: 5 - initialEvent: - type: boolean - description: | - Set to `true` by API consumer if consumer wants to get an event as soon as the subscription is created and current situation reflects event request. - Example: Consumer request Roaming event. If consumer sets initialEvent to true and device is in roaming situation, an event is triggered - Up to API project decision to keep it. - - CreateSubscriptionDetail: - description: The detail of the requested event subscription. - type: object - - # ───────────────────────────────────────────────────────────────────────── - # Section 3: Protocol support - # - # Protocol selection and protocol-specific delivery settings. - # These are Commonalities-owned and identical across all CAMARA APIs. - # ───────────────────────────────────────────────────────────────────────── - - Protocol: - type: string - enum: - - HTTP - # Future protocol support (not yet used in CAMARA): - # - MQTT3 - # - MQTT5 - # - AMQP - # - NATS - # - KAFKA - description: Identifier of a delivery protocol. Only HTTP is allowed for now - example: "HTTP" - - HTTPSettings: - type: object - description: HTTP protocol settings for event delivery. - 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. 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 - maxLength: 512 - method: - type: string - description: The HTTP method to use for sending the message. - enum: - - POST - - # Future protocol support (not yet used in CAMARA): - # MQTTSettings: - # type: object - # properties: - # topicName: - # type: string - # maxLength: 256 - # description: MQTT topic name - # qos: - # type: integer - # format: int32 - # minimum: 0 - # maximum: 2 - # description: Quality of Service level (0, 1, or 2) - # retain: - # type: boolean - # expiry: - # type: integer - # format: int32 - # minimum: 0 - # maximum: 2147483647 - # description: Message expiry interval in seconds - # userProperties: - # type: object - # required: - # - topicName - - # AMQPSettings: - # type: object - # properties: - # address: - # type: string - # maxLength: 512 - # linkName: - # type: string - # maxLength: 256 - # senderSettlementMode: - # type: string - # enum: ["settled", "unsettled"] - # linkProperties: - # type: object - # additionalProperties: - # type: string - # maxLength: 1024 - - # ApacheKafkaSettings: - # type: object - # properties: - # topicName: - # type: string - # maxLength: 249 - # partitionKeyExtractor: - # type: string - # maxLength: 512 - # clientId: - # type: string - # maxLength: 256 - # ackMode: - # type: integer - # format: int32 - # minimum: 0 - # maximum: 2 - # description: Acknowledgment mode (0=no ack, 1=leader ack, 2=all replicas ack) - # required: - # - topicName - - # NATSSettings: - # type: object - # properties: - # subject: - # type: string - # maxLength: 256 - # description: NATS subject - # required: - # - subject - - # ───────────────────────────────────────────────────────────────────────── - # Section 4: Sink credentials - # - # Authentication and authorization information for event delivery. - # These are Commonalities-owned and identical across all CAMARA APIs. - # ───────────────────────────────────────────────────────────────────────── - - SinkCredential: - description: A sink credential provides authentication or authorization information necessary to enable delivery of events to a target. - type: object - properties: - credentialType: - type: string - enum: - # - PLAIN # not used in CAMARA - - ACCESSTOKEN - - PRIVATE_KEY_JWT - description: | - The type of the credential - MUST be set to ACCESSTOKEN or PRIVATE_KEY_JWT for now - discriminator: - propertyName: credentialType - mapping: - # PLAIN: "#/components/schemas/PlainCredential" # not used in CAMARA - ACCESSTOKEN: "#/components/schemas/AccessTokenCredential" - PRIVATE_KEY_JWT: "#/components/schemas/PrivateKeyJWTCredential" - required: - - credentialType - - # PlainCredential: # not used in CAMARA - # type: object - # description: A plain credential as a combination of an identifier and a secret. - # allOf: - # - $ref: "#/components/schemas/SinkCredential" - # - type: object - # required: - # - identifier - # - secret - # properties: - # identifier: - # description: The identifier might be an account or username. - # type: string - # maxLength: 256 - # secret: - # description: The secret might be a password or passphrase. - # type: string - # maxLength: 512 - - AccessTokenCredential: - type: object - description: An access token credential. This type of credential is meant to be used by API Consumers that have limited capabilities to handle authorization requests. - allOf: - - $ref: "#/components/schemas/SinkCredential" - - type: object - properties: - accessToken: - description: REQUIRED. An access token is a token granting access to the target resource. - type: string - maxLength: 4096 - writeOnly: true - accessTokenExpiresUtc: - type: string - format: date-time - maxLength: 64 - description: | - REQUIRED. An absolute (UTC) timestamp at which the token shall be considered expired. - In the case of an ACCESS_TOKEN_EXPIRED termination reason, implementation should notify the client before the expiration date. - If the access token is a JWT and registered "exp" (Expiration Time) claim is present, the two expiry times should match. - 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" - accessTokenType: - description: REQUIRED. Type of the access token (See [OAuth 2.0](https://tools.ietf.org/html/rfc6749#section-7.1)). - type: string - writeOnly: true - enum: - - bearer - required: - - accessToken - - accessTokenExpiresUtc - - accessTokenType - - PrivateKeyJWTCredential: - type: object - description: Use PRIVATE_KEY_JWT to get an access token. This type of credential is to be used by clients that have an authorization server. - allOf: - - $ref: "#/components/schemas/SinkCredential" - - type: object - properties: - clientId: - description: The client ID used to authenticate when requesting an access token using PRIVATE_KEY_JWT. - type: string - maxLength: 128 - writeOnly: true - tokenUri: - description: The URI where to request an access token using PRIVATE_KEY_JWT. - type: string - format: uri - maxLength: 2048 - pattern: ^https:\/\/.+$ - writeOnly: true - jwksUri: - description: The URI used to request the public key to verify that the JWT assertion was signed by PRIVATE_KEY_JWT. - type: string - format: uri - maxLength: 2048 - pattern: ^https:\/\/.+$ - readOnly: true - - # ───────────────────────────────────────────────────────────────────────── - # Section 5: Subscription lifecycle data - # - # Data payload schemas for subscription lifecycle events. These define the - # `data` content of subscription-started, subscription-updated, and - # subscription-ended events. The lifecycle event wrappers (which contain - # api-name placeholders in their event type strings) stay in API templates. - # ───────────────────────────────────────────────────────────────────────── - - SubscriptionStarted: - description: Event detail structure for subscription started event - type: object - required: - - initiationReason - - subscriptionId - properties: - initiationReason: - $ref: "#/components/schemas/InitiationReason" - subscriptionId: - $ref: "#/components/schemas/SubscriptionId" - initiationDescription: - type: string - maxLength: 512 - description: Description of subscription initiation - - InitiationReason: - type: string - description: | - - SUBSCRIPTION_CREATED - Subscription created by API Server - enum: - - SUBSCRIPTION_CREATED - - SubscriptionUpdated: - description: Event detail structure for subscription updated event - type: object - required: - - updateReason - - subscriptionId - properties: - updateReason: - $ref: "#/components/schemas/UpdateReason" - subscriptionId: - $ref: "#/components/schemas/SubscriptionId" - updateDescription: - type: string - maxLength: 512 - description: Description of subscription update - - UpdateReason: - type: string - description: | - - SUBSCRIPTION_ACTIVE - API server transitioned subscription status to `ACTIVE` - - SUBSCRIPTION_INACTIVE - API server transitioned subscription status to `INACTIVE` - enum: - - SUBSCRIPTION_ACTIVE - - SUBSCRIPTION_INACTIVE - - SubscriptionEnded: - description: Event detail structure for subscription ended event - type: object - required: - - terminationReason - - subscriptionId - properties: - terminationReason: - $ref: "#/components/schemas/TerminationReason" - subscriptionId: - $ref: "#/components/schemas/SubscriptionId" - terminationDescription: - type: string - maxLength: 512 - description: Description of subscription termination - - TerminationReason: - type: string - description: | - - NETWORK_TERMINATED - API server stopped sending notification - - SUBSCRIPTION_EXPIRED - Subscription expire time (optionally set by the requester) has been reached - - MAX_EVENTS_REACHED - Maximum number of events (optionally set by the requester) has been reached - - ACCESS_TOKEN_EXPIRED - Access Token sinkCredential (optionally set by the requester with credential type `ACCESSTOKEN`) expiration time has been reached - - SUBSCRIPTION_DELETED - Subscription was deleted by the requester - enum: - - MAX_EVENTS_REACHED - - NETWORK_TERMINATED - - SUBSCRIPTION_EXPIRED - - ACCESS_TOKEN_EXPIRED - - SUBSCRIPTION_DELETED - - # ───────────────────────────────────────────────────────────────────────── - # Subscription-specific error responses - # - # These extend generic CAMARA error codes with subscription-specific codes. - # Commonalities-owned and identical across all APIs using explicit subscriptions. - # ───────────────────────────────────────────────────────────────────────── - - responses: - CreateSubscriptionBadRequest400: - description: Problem with the client request - headers: - x-correlator: - $ref: "CAMARA_common.yaml#/components/headers/x-correlator" - content: - application/json: - schema: - allOf: - - $ref: "CAMARA_common.yaml#/components/schemas/ErrorInfo" - - type: object - properties: - status: - enum: - - 400 - code: - enum: - - INVALID_ARGUMENT - - OUT_OF_RANGE - - INVALID_PROTOCOL - - INVALID_CREDENTIAL - - INVALID_TOKEN - - INVALID_SINK - examples: - GENERIC_400_INVALID_ARGUMENT: - description: Invalid Argument. Generic Syntax Exception - value: - status: 400 - code: INVALID_ARGUMENT - message: Client specified an invalid argument, request body or query param. - GENERIC_400_OUT_OF_RANGE: - description: Out of Range. Specific Syntax Exception used when a given field has a pre-defined range or a invalid filter criteria combination is requested - value: - status: 400 - code: OUT_OF_RANGE - message: Client specified an invalid range. - GENERIC_400_INVALID_PROTOCOL: - description: Invalid protocol for events subscription management - value: - status: 400 - code: INVALID_PROTOCOL - message: Only HTTP is supported - GENERIC_400_INVALID_CREDENTIAL: - description: Invalid sink credential type - value: - status: 400 - code: INVALID_CREDENTIAL - message: Only Access token or Private key JWT are supported - GENERIC_400_INVALID_SINK: - description: Invalid sink value - value: - status: 400 - code: INVALID_SINK - message: sink not valid for the specified protocol - - SubscriptionIdRequired400: - description: Problem with the client request - headers: - x-correlator: - $ref: "CAMARA_common.yaml#/components/headers/x-correlator" - content: - application/json: - schema: - allOf: - - $ref: "CAMARA_common.yaml#/components/schemas/ErrorInfo" - - type: object - properties: - status: - enum: - - 400 - code: - enum: - - INVALID_ARGUMENT - examples: - GENERIC_400_INVALID_ARGUMENT: - description: Invalid Argument. Generic Syntax Exception - value: - status: 400 - code: INVALID_ARGUMENT - message: Client specified an invalid argument, request body or query param. - GENERIC_400_SUBSCRIPTION_ID_REQUIRED: - description: subscription id is required - value: - status: 400 - code: INVALID_ARGUMENT - message: "Expected property is missing: subscriptionId" - - SubscriptionPermissionDenied403: - description: Client does not have sufficient permission - headers: - x-correlator: - $ref: "CAMARA_common.yaml#/components/headers/x-correlator" - content: - application/json: - schema: - allOf: - - $ref: "CAMARA_common.yaml#/components/schemas/ErrorInfo" - - type: object - properties: - status: - enum: - - 403 - code: - enum: - - PERMISSION_DENIED - - SUBSCRIPTION_MISMATCH - examples: - GENERIC_403_PERMISSION_DENIED: - description: Permission denied. OAuth2 token access does not have the required scope or when the user fails operational security - value: - status: 403 - code: PERMISSION_DENIED - message: Client does not have sufficient permissions to perform this action. - GENERIC_403_SUBSCRIPTION_MISMATCH: - description: Inconsistent access token for requested subscription - value: - status: 403 - code: "SUBSCRIPTION_MISMATCH" - message: "Inconsistent access token for requested events subscription" - - CreateSubscriptionUnprocessableEntity422: - description: Unprocessable Entity - headers: - x-correlator: - $ref: "CAMARA_common.yaml#/components/headers/x-correlator" - content: - application/json: - schema: - allOf: - - $ref: "CAMARA_common.yaml#/components/schemas/ErrorInfo" - - type: object - properties: - status: - enum: - - 422 - code: - enum: - - SERVICE_NOT_APPLICABLE - - MISSING_IDENTIFIER - - UNSUPPORTED_IDENTIFIER - - UNNECESSARY_IDENTIFIER - - MULTIEVENT_SUBSCRIPTION_NOT_SUPPORTED - - MULTIEVENT_COMBINATION_TEMPORARILY_NOT_SUPPORTED - - PRIVATE_KEY_JWT_NOT_CONFIGURED - examples: - GENERIC_422_SERVICE_NOT_APPLICABLE: - description: Service not applicable for the provided identifier - value: - status: 422 - code: SERVICE_NOT_APPLICABLE - message: The service is not available for the provided identifier. - GENERIC_422_MISSING_IDENTIFIER: - description: An identifier is not included in the request and the device or phone number identification cannot be derived from the 3-legged access token - value: - status: 422 - code: MISSING_IDENTIFIER - message: The device cannot be identified. - GENERIC_422_UNSUPPORTED_IDENTIFIER: - description: None of the provided identifiers is supported by the implementation - value: - status: 422 - code: UNSUPPORTED_IDENTIFIER - message: The identifier provided is not supported. - GENERIC_422_UNNECESSARY_IDENTIFIER: - description: An explicit identifier is provided when a device or phone number has already been identified from the access token - value: - status: 422 - code: UNNECESSARY_IDENTIFIER - message: The device is already identified by the access token. - GENERIC_422_MULTIEVENT_SUBSCRIPTION_NOT_SUPPORTED: - description: Multi event types subscription is not supported - value: - status: 422 - code: MULTIEVENT_SUBSCRIPTION_NOT_SUPPORTED - message: Multi event types subscription not managed - GENERIC_422_MULTIEVENT_COMBINATION_TEMPORARILY_NOT_SUPPORTED: - description: Combination of multiple event types is temporarily not supported - value: - status: 422 - code: MULTIEVENT_COMBINATION_TEMPORARILY_NOT_SUPPORTED - message: The requested combination of event types is temporarily not supported. - GENERIC_422_PRIVATE_KEY_JWT_NOT_CONFIGURED: - description: Private key JWT sink credential type is used but no configuration was pre-shared - value: - status: 422 - code: PRIVATE_KEY_JWT_NOT_CONFIGURED - message: No JWK Set configured for PRIVATE_KEY_JWT authentication. diff --git a/code/common/info-description-templates.yaml b/code/common/info-description-templates.yaml deleted file mode 100644 index 1c7928d..0000000 --- a/code/common/info-description-templates.yaml +++ /dev/null @@ -1,116 +0,0 @@ -# Mandatory `info.description` text templates for CAMARA API specs. -# -# This file is owned by Commonalities and synchronised into every onboarded -# CAMARA API repository as `code/common/info-description-templates.yaml` by the -# cache-common mechanism. Do not edit in API repositories. -# -# Each top-level key is a template name (lowercase-hyphenated, derived from -# the heading of its template). The `content` field holds the text that an -# API specification MUST embed as-is inside its `info.description`, bracketed -# by the BEGIN / END HTML-comment markers that are part of the content. -# -# Indentation is chosen so that copying the BEGIN..END region from this file -# into a target spec's `info.description` (`info:` column 0 -> `description: |` -# column 2 -> text column 4) preserves indentation with no fixup. -# -# Sources: -# - CAMARA API Design Guide (Commonalities) -# - CAMARA-API-access-and-user-consent.md (IdentityAndConsentManagement) -# If this file and a source document disagree, the source document wins; this -# file is regenerated to match. - -# Universal - mandatory in every CAMARA API. -# Source: -# IdentityAndConsentManagement/documentation/CAMARA-API-access-and-user-consent.md -# section "Mandatory template for `info.description` in CAMARA API specs" - -info: - x-camara-commonalities: 0.8.0 - -authorization-and-authentication: - content: | - - # Authorization and authentication - - The "Camara Security and Interoperability Profile" provides details of how an API consumer requests an access token. Please refer to Identity and Consent Management (https://github.com/camaraproject/IdentityAndConsentManagement/) for the released version of the profile. - - The specific authorization flows to be used will be agreed upon during the onboarding process, happening between the API consumer and the API provider, taking into account the declared purpose for accessing the API, whilst also being subject to the prevailing legal framework dictated by local legislation. - - In cases where personal data is processed by the API and users can exercise their rights through mechanisms such as opt-in and/or opt-out, the use of three-legged access tokens is mandatory. This ensures that the API remains in compliance with privacy regulations, upholding the principles of transparency and user-centric privacy-by-design. - - -# Universal - mandatory in every CAMARA API. -# Source: -# Commonalities/documentation/CAMARA-API-Design-Guide.md section 3.2.3 -# "Error Responses - Mandatory Template for `info.description` in CAMARA API" -additional-error-responses: - content: | - - # Additional CAMARA error responses - - The list of error codes in this API specification is not exhaustive. Therefore the API specification MAY not document some non-mandatory error statuses as indicated in `CAMARA API Design Guide`. - - Please refer to the `CAMARA_common.yaml` of the Commonalities Release associated to this API version for a complete list of error responses. The applicable Commonalities Release can be identified in the `API Readiness Checklist` document associated to this API version. - - As a specific rule, error `501 - NOT_IMPLEMENTED` can be only a possible error response if it is explicitly documented in the API. - - -# Universal - mandatory in every CAMARA API targeting Commonalities r4.3 or later. -# Source: -# Commonalities/documentation/CAMARA-API-Design-Guide.md section 3.2.4 -# "Request Body Strictness - Mandatory Template for `info.description` in CAMARA API" -request-body-strictness: - content: | - - # Request body strictness - - This API rejects requests with JSON request bodies that contain properties not declared in this specification, at any nesting level. Unknown properties result in a `400 INVALID_ARGUMENT` response. - - -# Opt-in - applicable to APIs where the subject of an operation can be -# identified either implicitly from a three-legged access token or explicitly -# from a `device` object. Mutually exclusive with `identifying-phone-number-from-access-token`. -# Source: -# Commonalities/documentation/CAMARA-API-Design-Guide.md Appendix A, -# filled in with the `device` / `device` object choice. -identifying-device-from-access-token: - content: | - - # Identifying the device from the access token - - This API requires the API consumer to identify a device as the subject of the API as follows: - - When the API is invoked using a two-legged access token, the subject will be identified from the optional `device` object, which therefore MUST be provided. - - When a three-legged access token is used however, this optional identifier MUST NOT be provided, as the subject will be uniquely identified from the access token. - - This approach simplifies API usage for API consumers using a three-legged access token to invoke the API by relying on the information that is associated with the access token and was identified during the authentication process. - - ## Error handling: - - - If the subject cannot be identified from the access token and the optional `device` object is not included in the request, then the server will return an error with the `422 MISSING_IDENTIFIER` error code. - - - If the subject can be identified from the access token and the optional `device` object is also included in the request, then the server will return an error with the `422 UNNECESSARY_IDENTIFIER` error code. This will be the case even if the same device is identified by these two methods, as the server is unable to make this comparison. - - -# Opt-in - applicable to APIs where the subject of an operation can be -# identified either implicitly from a three-legged access token or explicitly -# from a `phoneNumber` field. Mutually exclusive with `identifying-device-from-access-token`. -# Source: -# Commonalities/documentation/CAMARA-API-Design-Guide.md Appendix A, -# filled in with the `phone number` / `phoneNumber` field choice. -identifying-phone-number-from-access-token: - content: | - - # Identifying the phone number from the access token - - This API requires the API consumer to identify a phone number as the subject of the API as follows: - - When the API is invoked using a two-legged access token, the subject will be identified from the optional `phoneNumber` field, which therefore MUST be provided. - - When a three-legged access token is used however, this optional identifier MUST NOT be provided, as the subject will be uniquely identified from the access token. - - This approach simplifies API usage for API consumers using a three-legged access token to invoke the API by relying on the information that is associated with the access token and was identified during the authentication process. - - ## Error handling: - - - If the subject cannot be identified from the access token and the optional `phoneNumber` field is not included in the request, then the server will return an error with the `422 MISSING_IDENTIFIER` error code. - - - If the subject can be identified from the access token and the optional `phoneNumber` field is also included in the request, then the server will return an error with the `422 UNNECESSARY_IDENTIFIER` error code. This will be the case even if the same phone number is identified by these two methods, as the server is unable to make this comparison. - diff --git a/release-metadata.yaml b/release-metadata.yaml new file mode 100644 index 0000000..4ea0f22 --- /dev/null +++ b/release-metadata.yaml @@ -0,0 +1,16 @@ +repository: + repository_name: NetworkSliceBooking + release_tag: r2.3 + release_type: public-release + release_date: null + src_commit_sha: e64cf3d8830bcc61689c82cf5e600486cdd45fbc +apis: +- api_name: network-slice-booking + api_version: 0.2.0 + api_title: Network Slice Booking +- api_name: network-slice-assignment + api_version: 0.1.0 + api_title: Network Slice Assignment +dependencies: + commonalities_release: r4.3 (0.8.0) + identity_consent_management_release: r4.2 (0.5.0) diff --git a/release-plan.yaml b/release-plan.yaml deleted file mode 100644 index ba327be..0000000 --- a/release-plan.yaml +++ /dev/null @@ -1,48 +0,0 @@ -# CAMARA Release Plan -# This file declares release intentions for this repository. -# It replaces manual wiki tracking with automated tooling. -# -# Update this file; CI validates it; releases are generated from this plan. -# Docs: https://github.com/camaraproject/ReleaseManagement/tree/main/documentation - -repository: - # How this repository participates in CAMARA releases - # Options: independent (default) | meta-release - release_track: meta-release - # Meta-release participation (update for next cycle when planning) - meta_release: Spring26 - - # Target CAMARA release tag. - # Initialized to the latest release; update when planning the next release. - # - New release cycle (increment first number, reset second to 1) - # - Progression in same cycle (increment second number) - target_release_tag: r2.3 - - # Release type being prepared (must be set before release can be triggered) - # Options: none | pre-release-alpha | pre-release-rc | public-release | maintenance-release - target_release_type: public-release - -# Dependencies on Commonalities and ICM releases -# Update per ReleaseManagement requirements for each release cycle -dependencies: - commonalities_release: r4.3 - identity_consent_management_release: r4.2 - -# APIs in this repository -# - api_name: kebab-case identifier (must be filename in code/API_definitions/) -# - target_api_status: draft (no file yet) | alpha | rc | public -apis: - - api_name: network-slice-booking - target_api_version: 0.2.0 - target_api_status: public - main_contacts: - - chinaunicomyangfan - - DanXu-ChinaTelecom - - Kai-hw - - api_name: network-slice-assignment - target_api_version: 0.1.0 - target_api_status: public - main_contacts: - - chinaunicomyangfan - - DanXu-ChinaTelecom - - Kai-hw