Conversation
Add support for Open Banking UK v4.0.1: new OpenAPI spec files, conditionality entries and payment/account manifests. Introduce PCRE (regexp2) compilation/evaluation for OpenAPI `pattern` fields and related tests (regexp2 compiler and pcre support tests), and update openapi3 validators to use it. Bump dependencies (github.com/getkin/kin-openapi, github.com/stretchr/testify, add github.com/dlclark/regexp2, etc.). Fix failing negative standing-order consent tests by setting Content-Type: application/json in manifests, and update JWS b64 encoding handling and project version/docs to v1.9.8-beta1.
- Updated references in Readme.md - updated file copy in Dockerfile
There was a problem hiding this comment.
Pull request overview
This PR updates the conformance suite to support Open Banking UK v4.0.1 schema files and to correctly handle OpenAPI pattern validation by switching from RE2 to PCRE via regexp2 (including at spec-load time and during runtime response validation).
Changes:
- Add/extend bundled OpenAPI spec JSONs (v4.0.1 added; v4.0.0 updated to include PCRE-only
patterns such as negative lookahead). - Upgrade
kin-openapiand wire a customregexp2-backed regex compiler into spec validation, router creation, and response validation. - Update manifests/tests/release docs to reflect new behavior and fix Content-Type issues in negative standing order consent tests.
Reviewed changes
Copilot reviewed 23 out of 28 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| yarn.lock | Adds a root Yarn lockfile (currently empty). |
| README.md | Updates advertised version/tag and compatibility list. |
| pkg/version/version.go | Bumps suite version to 1.9.8 with prerelease marker. |
| pkg/schema/spec/v4.0.1/variable-recurring-payments-openapi.json | Adds OB v4.0.1 VRP OpenAPI schema. |
| pkg/schema/spec/v4.0.1/confirmation-funds-openapi.json | Adds OB v4.0.1 Confirmation of Funds OpenAPI schema. |
| pkg/schema/spec/v4.0.0/variable-recurring-payments-openapi.json | Adds PCRE-only pattern for x-idempotency-key. |
| pkg/schema/spec/v4.0.0/payment-initiation-openapi.json | Adds PCRE-only pattern for x-idempotency-key. |
| pkg/schema/spec/v4.0.0/cvrp-openapi.json | Adds PCRE-only pattern for x-idempotency-key. |
| pkg/schema/spec/v4.0.0/confirmation-funds-openapi.json | Adds PCRE-only pattern for x-idempotency-key and normalizes EOF formatting. |
| pkg/schema/spec/v4.0.0/account-info-openapi.json | Adds PCRE-only pattern for x-idempotency-key. |
| pkg/schema/regexp2_compiler.go | Introduces regexp2-based regex compiler with match timeout. |
| pkg/schema/pcre_support_test.go | Adds unit + integration coverage for PCRE patterns and v4.0.1 spec loading. |
| pkg/schema/openapi3Validator.go | Wires custom regex compiler into doc validation, routing, and response validation; updates for kin-openapi API changes. |
| pkg/schema/openapi3Validator_test.go | Updates test fixtures to include required OB response headers; adds nil-items regression tests. |
| pkg/schema/openapi3ResponseValidator_test.go | Ensures required OB response headers are set in response-validation fixtures. |
| pkg/model/specification.go | Registers v4.0.1 spec metadata (identifiers/URLs/schemaVersion). |
| pkg/model/condition_static.go | Adds conditionality static data entries for v4.0.1 specs. |
| pkg/authentication/jws.go | Accounts for v4.0.1 in b64 encoding decision logic. |
| manifests/ob_4.0_payment_fca.json | Fixes Content-Type header for negative standing order consent request. |
| manifests/ob_3.1_payment_fca.json | Fixes Content-Type header for negative standing order consent request. |
| go.sum | Adds regexp2 and updates dependency checksums (incl. kin-openapi, testify, etc.). |
| go.mod | Upgrades kin-openapi, testify, adds regexp2, updates indirect deps. |
| docs/releases/v1.9.6.md | Fixes incorrect test case ID references. |
| docs/releases/releases.md | Adds 1.9.8-beta1 release entry and compare links. |
| Dockerfile | Ensures v4.0.1 schema files are copied into the image. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ## Release Notes | ||
|
|
||
| ### v1.9.7 - 2026-03-05 | ||
| ### v1.9.8-beta3 - 2026-06-02 |
| --- | ||
| **Download**: | ||
| `docker run --rm -it -p 127.0.0.1:8443:8443 "openbanking/conformance-suite:v1.9.7"` | | ||
| `docker run --rm -it -p 127.0.0.1:8443:8443 "openbanking/conformance-suite:v1.9.8-beta3"` | |
| | v1.6.12 | v3.1.9 | | ||
| | Release | Standard version | | ||
| | ------------ | ---------------------------------------------------------------------------------------------- | | ||
| | v1.9.8-beta3 | v4.0.1 | |
| Pull and run the latest (stable) tagged Docker image: | ||
|
|
||
| > docker run --rm -it -p 127.0.0.1:8443:8443 "openbanking/conformance-suite:v1.9.7" | ||
| > docker run --rm -it -p 127.0.0.1:8443:8443 "openbanking/conformance-suite:v1.9.8-beta3" |
| or | ||
|
|
||
| > docker run --rm -it -p 8443:8443 "openbanking/conformance-suite:v1.9.7" | ||
| > docker run --rm -it -p 8443:8443 "openbanking/conformance-suite:v1.9.8-beta3" |
|
|
||
| - Added support for Open Banking UK v4.0.1 OpenAPI schema files | ||
|
|
||
| ## Fixed |
Comment on lines
+15
to
+18
| func TestRegexp2CompilerPCREPattern(t *testing.T) { | ||
| _, err := regexp2Compiler(`^(?!\s)(.*)(\\S)$`) | ||
| require.NoError(t, err) | ||
| } |
Comment on lines
+24
to
+30
| func TestRegexp2CompilerSetsMatchTimeout(t *testing.T) { | ||
| m, err := regexp2Compiler(`^(?!\s)(.*)(\\S)$`) | ||
| require.NoError(t, err) | ||
| matcher, ok := m.(*regexp2Matcher) | ||
| require.True(t, ok, "expected *regexp2Matcher") | ||
| assert.Equal(t, matchTimeout, matcher.re.MatchTimeout, "MatchTimeout must be finite to prevent ReDoS") | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added
Changed
patternfields are now compiled and evaluated usingregexp2(PCRE) at both spec load time and runtime request/response validation. RE2-compatible patterns are unaffected (RE2 is a strict subset of PCRE). (as per 1.9.8 - Beta 1)