diff --git a/CHANGELOG/CHANGELOG-r1.md b/CHANGELOG/CHANGELOG-r1.md deleted file mode 100644 index 8434b89..0000000 --- a/CHANGELOG/CHANGELOG-r1.md +++ /dev/null @@ -1,119 +0,0 @@ -# Changelog ReleaseTest - - -## Table of Contents -- [r1.3](#r13) -- [r1.2](#r12) -- [r1.1](#r11) - - -**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 it has been released. For example, changes may be reverted before a release is published. For the best results, use the latest published release.** - -The below sections record the changes for each API version in each release as follows: - -* for an alpha release, the delta with respect to the previous release -* for the first release-candidate, all changes since the last public release -* 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 - -# r1.3 - -## Release Notes - -This release candidate contains the definition and documentation of -* release-test 1.0.0-rc.2 - -The API definition(s) are based on -* Commonalities r4.1 -* Identity and Consent Management r4.1 - -## release-test 1.0.0-rc.2 - -**release-test 1.0.0-rc.2 is ...** - -- API definition **with inline documentation**: - - [View it on ReDoc](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/camaraproject/ReleaseTest/r1.3/code/API_definitions/release-test.yaml&nocors) - - [View it on Swagger Editor](https://camaraproject.github.io/swagger-ui/?url=https://raw.githubusercontent.com/camaraproject/ReleaseTest/r1.3/code/API_definitions/release-test.yaml) - - OpenAPI [YAML spec file](https://github.com/camaraproject/ReleaseTest/blob/r1.3/code/API_definitions/release-test.yaml) - -### Added - -* _To be filled during release review_ - -### Changed - -* _To be filled during release review_ - -### Fixed - -* _To be filled during release review_ - -### Removed - -* _To be filled during release review_ - -**Full Changelog**: https://github.com/camaraproject/ReleaseTest/compare/r1.2...r1.3 - -# r1.2 - -## Release Notes - -This release candidate contains the definition and documentation of -* Release Test 1.0.0-rc.1 - -The API definition(s) are based on -* Commonalities r4.1 -* Identity and Consent Management r4.1 - -## release-test 1.0.0-rc.1 - -**release-test 1.0.0-rc.1 is ...** - -- API definition **with inline documentation**: - - [View it on ReDoc](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/camaraproject/ReleaseTest/r1.2/code/API_definitions/release-test.yaml&nocors) - - [View it on Swagger Editor](https://camaraproject.github.io/swagger-ui/?url=https://raw.githubusercontent.com/camaraproject/ReleaseTest/r1.2/code/API_definitions/release-test.yaml) - - OpenAPI [YAML spec file](https://github.com/camaraproject/ReleaseTest/blob/r1.2/code/API_definitions/release-test.yaml) - -### Added - -* Added test definition file release-test-getStatus.feature by @hdamker-bot in https://github.com/camaraproject/ReleaseTest/pull/28 - -**Full Changelog**: https://github.com/camaraproject/ReleaseTest/compare/r1.1...r1.2 - -# r1.1 - -## Release Notes - -This pre-release contains the definition and documentation of -* Release Test 1.0.0-alpha.1 - -The API definition(s) are based on -* Commonalities r4.1 -* Identity and Consent Management r4.1 - -## release-test 1.0.0-alpha.1 - -**release-test 1.0.0-alpha.1 is the first test pre-release of the Release Test API** - -- API definition **with inline documentation**: - - [View it on ReDoc](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/camaraproject/ReleaseTest/r1.1/code/API_definitions/release-test.yaml&nocors) - - [View it on Swagger Editor](https://camaraproject.github.io/swagger-ui/?url=https://raw.githubusercontent.com/camaraproject/ReleaseTest/r1.1/code/API_definitions/release-test.yaml) - - OpenAPI [YAML spec file](https://github.com/camaraproject/ReleaseTest/blob/r1.1/code/API_definitions/release-test.yaml) - -### Added - -* _To be filled during release review_ - -### Changed - -* _To be filled during release review_ - -### Fixed - -* _To be filled during release review_ - -### Removed - -* _To be filled during release review_ - -**Full Changelog**: https://github.com/camaraproject/ReleaseTest/commits/r1.1 diff --git a/CHANGELOG/README.md b/CHANGELOG/README.md deleted file mode 100644 index 8b5f3c5..0000000 --- a/CHANGELOG/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Changelog - -Release changelogs are organized by release cycle. diff --git a/code/API_definitions/release-test-notifications.yaml b/code/API_definitions/release-test-notifications.yaml new file mode 100644 index 0000000..10d7d37 --- /dev/null +++ b/code/API_definitions/release-test-notifications.yaml @@ -0,0 +1,147 @@ +openapi: 3.0.3 +info: + title: Release Test Notifications + description: | + Test API for notification subscription management. + This is not a real API — it exists solely for validation framework testing. + version: wip + x-camara-commonalities: 0.6 + license: + name: Apache 2.0 + url: https://www.apache.org/licenses/LICENSE-2.0.html +externalDocs: + description: Product documentation at CAMARA + url: https://github.com/camaraproject/TestRepo +servers: + - url: "{apiRoot}/release-test-notifications/vwip" + variables: + apiRoot: + default: https://localhost:443 + description: API root +tags: + - name: Subscriptions + description: Subscription management operations +paths: + /subscriptions: + post: + operationId: CreateSubscription + summary: Create a new notification subscription + description: Creates a subscription for receiving event notifications via webhook callback. + tags: + - Subscriptions + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/subscriptionRequest" + responses: + "201": + description: Subscription created + content: + application/json: + schema: + $ref: "#/components/schemas/Subscription" + get: + operationId: listSubscriptions + summary: List subscriptions + description: Returns a list of active notification subscriptions. + tags: + - Subscriptions + parameters: + - name: pageSize + in: query + schema: + type: integer + minimum: 1 + maximum: 100 + responses: + "200": + description: Subscriptions listed + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/Subscription" + /subscriptions/{subscriptionId}: + get: + operationId: getSubscription + summary: Get a specific subscription + description: Returns a single notification subscription by its identifier. This description is intentionally very long to trigger a line length warning from yamllint because it exceeds the typical maximum character limit configured in the CAMARA yamllint configuration + tags: + - Subscriptions + parameters: + - name: subscriptionId + in: path + required: true + schema: + type: string + responses: + "200": + description: Subscription details + content: + application/json: + schema: + $ref: "#/components/schemas/Subscription" + delete: + operationId: deleteSubscription + summary: Delete a subscription + description: Deletes a notification subscription. No further events will be delivered. + tags: + - Subscriptions + parameters: + - name: subscriptionId + in: path + required: yes + schema: + type: string + responses: + "204": + description: Subscription deleted +components: + schemas: + subscriptionRequest: + type: object + required: + - webhook + - eventTypes + properties: + webhook: + type: object + required: + - notificationUrl + properties: + notificationUrl: + type: string + format: uri + description: The URL to receive event notifications. + eventTypes: + type: array + items: + type: string + description: List of event types to subscribe to. + Subscription: + type: object + properties: + id: + type: string + description: Unique subscription identifier. + webhook: + type: object + properties: + notificationUrl: + type: string + format: uri + eventTypes: + type: array + items: + type: string + startsAt: + type: string + format: date-time + description: Subscription activation timestamp. + expiresAt: + type: string + format: date-time + description: Subscription expiration timestamp. diff --git a/code/API_definitions/release-test.yaml b/code/API_definitions/release-test.yaml index 797da18..60eae8d 100644 --- a/code/API_definitions/release-test.yaml +++ b/code/API_definitions/release-test.yaml @@ -21,7 +21,7 @@ servers: tags: - name: Status description: Service status operations -paths: +paths: /status: get: operationId: getStatus @@ -29,6 +29,11 @@ paths: description: Returns the current status of the release test service. tags: - Status + parameters: + - name: verbose + in: query + schema: + type: boolean responses: "200": description: Service is running @@ -41,3 +46,27 @@ paths: type: string enum: - available + /status/{id}: + get: + operationId: getStatusById + summary: Get status for a specific component + tags: + - Status + parameters: + - name: id + in: path + required: true + schema: + type: string + responses: + "200": + description: Component status + content: + application/json: + schema: + type: object + properties: + componentName: + type: string + status: + type: string diff --git a/code/Test_definitions/release-test-notifications-createSubscription.feature b/code/Test_definitions/release-test-notifications-createSubscription.feature new file mode 100644 index 0000000..e0ac626 --- /dev/null +++ b/code/Test_definitions/release-test-notifications-createSubscription.feature @@ -0,0 +1,59 @@ +Feature: CAMARA Release Test Notifications API, vwip - Operation: createSubscription + + # Input to be provided by the implementation to the tests + # References to OAS spec schemas refer to schemas specified in + # /code/API_definitions/release-test-notifications.yaml + + Background: Common createSubscription setup + Given an environment at "apiRoot" + And the resource "/release-test-notifications/vwip/subscriptions" + And the header "Authorization" is set to a valid access token + And the header "Content-Type" is set to "application/json" + + # Success scenarios + + @ReleaseTest_Notifications_createSubscription_201.01_success + Scenario: Create subscription successfully + Given the request body is set to a valid subscription request + When the HTTPS "POST" request is sent + Then the response status code is 201 + And the response header "Content-Type" is "application/json" + And the response property "$.id" exists + And the response property "$.webhook.notificationUrl" exists + + # Error scenarios + + @ReleaseTest_Notifications_createSubscription_400.01_missing_webhook + Scenario: Error response for missing webhook field + Given the request body property "$.webhook" is not included + When the HTTPS "POST" request is sent + Then the response status code is 400 + And the response header "Content-Type" is "application/json" + And the response property "$.status" is 400 + And the response property "$.code" is "INVALID_ARGUMENT" + And the response property "$.message" exists + + @ReleaseTest_Notifications_createSubscription_401.01_no_authorization + Scenario: Error response for missing authorization header + Given the header "Authorization" is not set + When the HTTPS "POST" request is sent + Then the response status code is 401 + And the response property "$.status" is 401 + And the response property "$.code" is "UNAUTHENTICATED" + And the response property "$.message" exists + + Scenario: Error response for invalid event type + Given the request body property "$.eventTypes[0]" is set to "INVALID_EVENT" + When the HTTPS "POST" request is sent + Then the response status code is 400 + And the response property "$.code" is "INVALID_ARGUMENT" + + + @ReleaseTest_Notifications_createSubscription_201.01_success + Scenario: Create subscription with all fields + Given the request body is set to a valid subscription request with all optional fields + When the HTTPS "POST" request is sent + Then the response status code is 201 + And the response property "$.id" exists + And the response property "$.startsAt" exists + And the response property "$.expiresAt" exists