From f4cb678263b2676381d9c61c960d6206cc499c92 Mon Sep 17 00:00:00 2001 From: Herbert Damker <52109189+hdamker@users.noreply.github.com> Date: Fri, 27 Mar 2026 15:18:49 +0100 Subject: [PATCH 1/6] feat: add notifications API and test scenarios for validation testing Adds a second API spec (release-test-notifications) and feature file with intentional issues to exercise the validation framework across all engines (yamllint, Spectral, gherkin-lint, Python checks). --- .../release-test-notifications.yaml | 147 ++++++++++++++++++ code/API_definitions/release-test.yaml | 29 ++++ ...t-notifications-createSubscription.feature | 59 +++++++ 3 files changed, 235 insertions(+) create mode 100644 code/API_definitions/release-test-notifications.yaml create mode 100644 code/Test_definitions/release-test-notifications-createSubscription.feature 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..00afbce 100644 --- a/code/API_definitions/release-test.yaml +++ b/code/API_definitions/release-test.yaml @@ -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 From e4c4a6ca107b478620c5bffd91a44db01d844455 Mon Sep 17 00:00:00 2001 From: Herbert Damker <52109189+hdamker@users.noreply.github.com> Date: Fri, 27 Mar 2026 17:30:54 +0100 Subject: [PATCH 2/6] test: remove CHANGELOG content to trigger repo-level validation finding --- CHANGELOG/CHANGELOG-r1.md | 119 -------------------------------------- CHANGELOG/README.md | 3 - 2 files changed, 122 deletions(-) delete mode 100644 CHANGELOG/CHANGELOG-r1.md delete mode 100644 CHANGELOG/README.md 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. From 712db34bd08b0be842af8e03463ea1d7e91645a2 Mon Sep 17 00:00:00 2001 From: Herbert Damker Date: Sat, 28 Mar 2026 18:55:33 +0100 Subject: [PATCH 3/6] Update release-test.yaml --- code/API_definitions/release-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/API_definitions/release-test.yaml b/code/API_definitions/release-test.yaml index 00afbce..5a31537 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 From 68fccf51ff61dfc37c57205263fdc871eac3af1f Mon Sep 17 00:00:00 2001 From: Herbert Damker Date: Sat, 28 Mar 2026 19:15:06 +0100 Subject: [PATCH 4/6] Update release-test.yaml --- code/API_definitions/release-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/API_definitions/release-test.yaml b/code/API_definitions/release-test.yaml index 5a31537..6b76871 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 From 7c8bf3b2d18dff1cde19bac637138da3f7c4720a Mon Sep 17 00:00:00 2001 From: Herbert Damker Date: Sat, 28 Mar 2026 19:22:37 +0100 Subject: [PATCH 5/6] Update release-test.yaml --- code/API_definitions/release-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/API_definitions/release-test.yaml b/code/API_definitions/release-test.yaml index 6b76871..2307c26 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 From aa869e2b6f0ba9f6a15483383a88626972043d5a Mon Sep 17 00:00:00 2001 From: Herbert Damker Date: Tue, 31 Mar 2026 06:48:39 +0200 Subject: [PATCH 6/6] Fix indentation in release-test.yaml --- code/API_definitions/release-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/API_definitions/release-test.yaml b/code/API_definitions/release-test.yaml index 2307c26..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