From 03995c03e0942b79c8d86839d81bf1b7299097da Mon Sep 17 00:00:00 2001 From: maheshc01 Date: Mon, 14 Sep 2026 12:59:46 -0500 Subject: [PATCH] Rename API to device-media-streaming-rate Align the API name with the repository name (#38): - API definition file renamed to device-media-streaming-rate.yaml - info.title, tags, servers.url, security scope, schema names and description references updated accordingly - Test definitions renamed to device-media-streaming-rate.feature with matching resource path and scenario tags release-plan.yaml is updated separately in #48, as the validation rules require release-plan changes to be in their own PR. --- ....yaml => device-media-streaming-rate.yaml} | 22 ++++---- ...re => device-media-streaming-rate.feature} | 52 +++++++++---------- 2 files changed, 37 insertions(+), 37 deletions(-) rename code/API_definitions/{media-streaming-rate.yaml => device-media-streaming-rate.yaml} (95%) rename code/Test_definitions/{media-streaming-rate.feature => device-media-streaming-rate.feature} (88%) diff --git a/code/API_definitions/media-streaming-rate.yaml b/code/API_definitions/device-media-streaming-rate.yaml similarity index 95% rename from code/API_definitions/media-streaming-rate.yaml rename to code/API_definitions/device-media-streaming-rate.yaml index 2b41272..0fb3d68 100644 --- a/code/API_definitions/media-streaming-rate.yaml +++ b/code/API_definitions/device-media-streaming-rate.yaml @@ -1,10 +1,10 @@ openapi: 3.0.3 info: - title: Media Streaming Rate + title: Device Media Streaming Rate version: wip x-camara-commonalities: wip description: | - The Media Streaming Rate API allows an application developer to retrieve the maximum + The Device Media Streaming Rate API allows an application developer to retrieve the maximum downstream media streaming rate that the network allows for a given device. # Introduction @@ -49,7 +49,7 @@ info: The diagram below illustrates this workflow: - ![Media Streaming Rate API Sequence Diagram](https://raw.githubusercontent.com/camaraproject/DeviceMediaStreamingRate/main/documentation/SupportingDocuments/media-rate-sequence-flow.png) + ![Device Media Streaming Rate API Sequence Diagram](https://raw.githubusercontent.com/camaraproject/DeviceMediaStreamingRate/main/documentation/SupportingDocuments/media-rate-sequence-flow.png) @@ -105,14 +105,14 @@ externalDocs: url: https://github.com/camaraproject/DeviceMediaStreamingRate servers: - - url: "{apiRoot}/media-streaming-rate/vwip" + - url: "{apiRoot}/device-media-streaming-rate/vwip" variables: apiRoot: default: http://localhost:9091 description: API root, defined by the service provider, e.g. `api.example.com` or `api.example.com/somepath` tags: - - name: Media Streaming Rate + - name: Device Media Streaming Rate description: | Retrieve the maximum downstream media streaming rate permitted for a given device. @@ -121,9 +121,9 @@ paths: post: security: - openId: - - media-streaming-rate:retrieve-maximum-downstream-media-rate + - device-media-streaming-rate:retrieve-maximum-downstream-media-rate tags: - - Media Streaming Rate + - Device Media Streaming Rate summary: Get maximum downstream media streaming rate description: | Retrieve the maximum downstream media streaming rate that the network permits for a device. @@ -141,7 +141,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/MediaStreamingRateRequest" + $ref: "#/components/schemas/DeviceMediaStreamingRateRequest" required: true responses: "200": @@ -152,7 +152,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/MediaStreamingRateResponse" + $ref: "#/components/schemas/DeviceMediaStreamingRateResponse" "400": $ref: "#/components/responses/Generic400" "401": @@ -357,14 +357,14 @@ components: message: Rate limit reached. schemas: - MediaStreamingRateRequest: + DeviceMediaStreamingRateRequest: type: object description: Request body identifying the device for which the permitted media streaming rate is retrieved. properties: device: $ref: "../common/CAMARA_common.yaml#/components/schemas/Device" - MediaStreamingRateResponse: + DeviceMediaStreamingRateResponse: type: object description: The maximum downstream media streaming rate permitted for the device. properties: diff --git a/code/Test_definitions/media-streaming-rate.feature b/code/Test_definitions/device-media-streaming-rate.feature similarity index 88% rename from code/Test_definitions/media-streaming-rate.feature rename to code/Test_definitions/device-media-streaming-rate.feature index e74fbbb..f8ed311 100644 --- a/code/Test_definitions/media-streaming-rate.feature +++ b/code/Test_definitions/device-media-streaming-rate.feature @@ -1,4 +1,4 @@ -Feature: CAMARA Media Streaming Rate API, vwip - Operation retrieveMaximumDownstreamMediaRate +Feature: CAMARA Device Media Streaming Rate API, vwip - Operation retrieveMaximumDownstreamMediaRate # Input to be provided by the implementation to the tester # @@ -17,22 +17,22 @@ Feature: CAMARA Media Streaming Rate API, vwip - Operation retrieveMaximumDownst # Note: Unless a scenario states otherwise, request bodies are assumed to be otherwise # valid, with only the property under test deviating. # - # References to OAS spec schemas refer to schemas specified in media-streaming-rate.yaml + # References to OAS spec schemas refer to schemas specified in device-media-streaming-rate.yaml # or, for referenced common schemas, in CAMARA_common.yaml - Background: Common Media Streaming Rate setup + Background: Common Device Media Streaming Rate setup Given an environment at "apiRoot" - And the resource "/media-streaming-rate/vwip/retrieve-maximum-downstream-media-rate" + And the resource "/device-media-streaming-rate/vwip/retrieve-maximum-downstream-media-rate" 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" - And the request body is set by default to a request body compliant with the schema at "#/components/schemas/MediaStreamingRateRequest" + And the request body is set by default to a request body compliant with the schema at "#/components/schemas/DeviceMediaStreamingRateRequest" ########################## # Happy path scenarios ########################## - @media_streaming_rate_01_two_legged_device_in_body + @device_media_streaming_rate_01_two_legged_device_in_body Scenario: Retrieve the maximum downstream media streaming rate with a two-legged access token Given the header "Authorization" is set to a valid access token which does not identify a single device And the request body property "$.device" is set to a valid device supported by the implementation @@ -40,12 +40,12 @@ Feature: CAMARA Media Streaming Rate API, vwip - Operation retrieveMaximumDownst Then the response status code is 200 And the response header "Content-Type" is "application/json" And the response header "x-correlator" has same value as the request header "x-correlator" - And the response body complies with the OAS schema at "#/components/schemas/MediaStreamingRateResponse" + And the response body complies with the OAS schema at "#/components/schemas/DeviceMediaStreamingRateResponse" And the response property "$.maxDownstreamMediaRate.value" is an integer greater than or equal to 0 And the response property "$.maxDownstreamMediaRate.unit" is one of "bps", "kbps", "Mbps", "Gbps" or "Tbps" And the response property "$.device", if present, contains a single device identifier that was included in the request - @media_streaming_rate_02_three_legged_device_from_token + @device_media_streaming_rate_02_three_legged_device_from_token Scenario: Retrieve the maximum downstream media streaming rate with a three-legged access token Given the header "Authorization" is set to a valid access token identifying a device And the request body property "$.device" is not included @@ -53,12 +53,12 @@ Feature: CAMARA Media Streaming Rate API, vwip - Operation retrieveMaximumDownst Then the response status code is 200 And the response header "Content-Type" is "application/json" And the response header "x-correlator" has same value as the request header "x-correlator" - And the response body complies with the OAS schema at "#/components/schemas/MediaStreamingRateResponse" + And the response body complies with the OAS schema at "#/components/schemas/DeviceMediaStreamingRateResponse" And the response property "$.maxDownstreamMediaRate.value" is an integer greater than or equal to 0 And the response property "$.maxDownstreamMediaRate.unit" is one of "bps", "kbps", "Mbps", "Gbps" or "Tbps" And the response property "$.device" is not present - @media_streaming_rate_03_multiple_device_identifiers + @device_media_streaming_rate_03_multiple_device_identifiers Scenario: Retrieve the maximum downstream media streaming rate providing more than one device identifier Given the header "Authorization" is set to a valid access token which does not identify a single device And the request body property "$.device" includes more than one identifier type, all identifying the same valid device @@ -66,7 +66,7 @@ Feature: CAMARA Media Streaming Rate API, vwip - Operation retrieveMaximumDownst Then the response status code is 200 And the response header "Content-Type" is "application/json" And the response header "x-correlator" has same value as the request header "x-correlator" - And the response body complies with the OAS schema at "#/components/schemas/MediaStreamingRateResponse" + And the response body complies with the OAS schema at "#/components/schemas/DeviceMediaStreamingRateResponse" And the response property "$.device" is present And the response property "$.device" contains a single device identifier that was included in the request @@ -74,7 +74,7 @@ Feature: CAMARA Media Streaming Rate API, vwip - Operation retrieveMaximumDownst # 400 - Request body validation ########################## - @media_streaming_rate_400.1_no_request_body + @device_media_streaming_rate_400.1_no_request_body Scenario: Missing request body Given the header "Authorization" is set to a valid access token which does not identify a single device And the request body is not included @@ -84,7 +84,7 @@ Feature: CAMARA Media Streaming Rate API, vwip - Operation retrieveMaximumDownst And the response property "$.code" is "INVALID_ARGUMENT" And the response property "$.message" contains a user friendly text - @media_streaming_rate_400.2_empty_request_body + @device_media_streaming_rate_400.2_empty_request_body Scenario: Empty object as request body Given the header "Authorization" is set to a valid access token which does not identify a single device And the request body is set to "{}" @@ -95,7 +95,7 @@ Feature: CAMARA Media Streaming Rate API, vwip - Operation retrieveMaximumDownst And the response property "$.message" contains a user friendly text # Request body strictness: undeclared properties are rejected at any nesting level - @media_streaming_rate_400.3_unknown_property + @device_media_streaming_rate_400.3_unknown_property Scenario Outline: A request body with an undeclared property is rejected Given the header "Authorization" is set to a valid access token which does not identify a single device And the request body property "$.device" is set to a valid device supported by the implementation @@ -115,7 +115,7 @@ Feature: CAMARA Media Streaming Rate API, vwip - Operation retrieveMaximumDownst # Device identifier errors (Commonalities C01) ########################## - @media_streaming_rate_C01.01_device_empty + @device_media_streaming_rate_C01.01_device_empty Scenario: The device value is an empty object Given the header "Authorization" is set to a valid access token which does not identify a single device And the request body property "$.device" is set to: {} @@ -125,7 +125,7 @@ Feature: CAMARA Media Streaming Rate API, vwip - Operation retrieveMaximumDownst And the response property "$.code" is "INVALID_ARGUMENT" And the response property "$.message" contains a user friendly text - @media_streaming_rate_C01.02_device_identifiers_not_schema_compliant + @device_media_streaming_rate_C01.02_device_identifiers_not_schema_compliant Scenario Outline: Some device identifier value does not comply with the schema Given the header "Authorization" is set to a valid access token which does not identify a single device And the request body property "" does not comply with the OAS schema at "" @@ -143,7 +143,7 @@ Feature: CAMARA Media Streaming Rate API, vwip - Operation retrieveMaximumDownst | $.device.networkAccessIdentifier | #/components/schemas/NetworkAccessIdentifier | # This scenario may happen e.g. with 2-legged access tokens, which do not identify a single device. - @media_streaming_rate_C01.03_device_not_found + @device_media_streaming_rate_C01.03_device_not_found Scenario: Some identifier cannot be matched to a device Given the header "Authorization" is set to a valid access token which does not identify a single device And the request body property "$.device" is compliant with the schema but does not identify a valid device @@ -153,7 +153,7 @@ Feature: CAMARA Media Streaming Rate API, vwip - Operation retrieveMaximumDownst And the response property "$.code" is "IDENTIFIER_NOT_FOUND" And the response property "$.message" contains a user friendly text - @media_streaming_rate_C01.04_unnecessary_device + @device_media_streaming_rate_C01.04_unnecessary_device Scenario: Device not to be included when it can be deduced from the access token Given the header "Authorization" is set to a valid access token identifying a device And the request body property "$.device" is set to a valid device @@ -163,7 +163,7 @@ Feature: CAMARA Media Streaming Rate API, vwip - Operation retrieveMaximumDownst And the response property "$.code" is "UNNECESSARY_IDENTIFIER" And the response property "$.message" contains a user friendly text - @media_streaming_rate_C01.05_missing_device + @device_media_streaming_rate_C01.05_missing_device Scenario: Device not included and cannot be deduced from the access token Given the header "Authorization" is set to a valid access token which does not identify a single device And the request body property "$.device" is not included @@ -173,7 +173,7 @@ Feature: CAMARA Media Streaming Rate API, vwip - Operation retrieveMaximumDownst And the response property "$.code" is "MISSING_IDENTIFIER" And the response property "$.message" contains a user friendly text - @media_streaming_rate_C01.06_unsupported_device + @device_media_streaming_rate_C01.06_unsupported_device Scenario: None of the provided device identifiers is supported by the implementation Given that some types of device identifiers are not supported by the implementation And the header "Authorization" is set to a valid access token which does not identify a single device @@ -185,7 +185,7 @@ Feature: CAMARA Media Streaming Rate API, vwip - Operation retrieveMaximumDownst And the response property "$.message" contains a user friendly text # When the service is only offered to certain types of devices or subscriptions, e.g. IoT, B2C, etc. - @media_streaming_rate_C01.07_device_not_supported + @device_media_streaming_rate_C01.07_device_not_supported Scenario: Service not available for the device Given that the service is not available for all devices commercialized by the operator And a valid device, identified by the token or provided in the request body, for which the service is not applicable @@ -199,7 +199,7 @@ Feature: CAMARA Media Streaming Rate API, vwip - Operation retrieveMaximumDownst # 401 - Authentication errors ########################## - @media_streaming_rate_401.1_no_authorization_header + @device_media_streaming_rate_401.1_no_authorization_header Scenario: No Authorization header Given the header "Authorization" is removed And the request body property "$.device" is set to a valid device supported by the implementation @@ -209,7 +209,7 @@ Feature: CAMARA Media Streaming Rate API, vwip - Operation retrieveMaximumDownst And the response property "$.code" is "UNAUTHENTICATED" And the response property "$.message" contains a user friendly text - @media_streaming_rate_401.2_expired_access_token + @device_media_streaming_rate_401.2_expired_access_token Scenario: Expired access token Given the header "Authorization" is set to an expired access token And the request body property "$.device" is set to a valid device supported by the implementation @@ -219,7 +219,7 @@ Feature: CAMARA Media Streaming Rate API, vwip - Operation retrieveMaximumDownst And the response property "$.code" is "UNAUTHENTICATED" And the response property "$.message" contains a user friendly text - @media_streaming_rate_401.3_invalid_access_token + @device_media_streaming_rate_401.3_invalid_access_token Scenario: Invalid access token Given the header "Authorization" is set to an invalid access token And the request body property "$.device" is set to a valid device supported by the implementation @@ -233,9 +233,9 @@ Feature: CAMARA Media Streaming Rate API, vwip - Operation retrieveMaximumDownst # 403 - Authorization errors ########################## - @media_streaming_rate_403.1_missing_access_token_scope + @device_media_streaming_rate_403.1_missing_access_token_scope Scenario: Access token does not include the required scope - Given the header "Authorization" is set to a valid access token which does not include the scope "media-streaming-rate:retrieve-maximum-downstream-media-rate" + Given the header "Authorization" is set to a valid access token which does not include the scope "device-media-streaming-rate:retrieve-maximum-downstream-media-rate" And the request body property "$.device" is set to a valid device supported by the implementation When the request "retrieveMaximumDownstreamMediaRate" is sent Then the response status code is 403