Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,15 @@ on:

jobs:
trigger-workflow:
uses: eclipse-dataspace-protocol-base/.github/.github/workflows/scan-pr-title.yml@main
uses: eclipse-dataspace-protocol-base/.github/.github/workflows/scan-pr-title.yml@main
run-tests:
name: gradle
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-java
- name: run
run: |
cd artifacts
chmod +x ./gradlew
./gradlew build
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "object",
"allOf": [
{
"$ref": "#/definitions/Version"
"$ref": "#/definitions/VersionResponse"
}
],
"$id": "https://w3id.org/dspace/2025/1/common/protocol-version-schema.json",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ void verifyInvalidCases() throws IOException {
assertThat(schema.validate(INVALID_BINDING_NOT_IN_ENUM, JSON).iterator().next().getType()).isEqualTo(ENUM);
assertThat(schema.validate(INVALID_AUTH_A_STRING, JSON).iterator().next().getType()).isEqualTo(TYPE);
assertThat(schema.validate(INVALID_AUTH_MISSING_PROTOCOL, JSON).iterator().next().getType()).isEqualTo(REQUIRED);
assertThat(schema.validate(INVALID_AUTH_NOT_AN_ARRAY, JSON).iterator().next().getType()).isEqualTo(TYPE);
assertThat(schema.validate(INVALID_AUTH_PROFILE_NOT_AN_ARRAY, JSON).iterator().next().getType()).isEqualTo(TYPE);
}

@BeforeEach
Expand Down Expand Up @@ -91,7 +91,14 @@ void setUp() {
"version": "1.0",
"path": "mqtts://mycorp.com/some/path/v1",
"binding": "MQTT",
"auth": "auth-protocol"
"auth": {
"protocol": "some-protocol",
"version": "2",
"profile": [
"one-profile",
"different-profile"
]
}
}
]
}
Expand All @@ -104,7 +111,7 @@ void setUp() {
"version": "1.0",
"path": "/some/path/v1",
"binding": "HTTPS",
"auth": "auth-protocol"
"auth": "a string"
}
]
}
Expand All @@ -118,23 +125,27 @@ void setUp() {
"path": "/some/path/v1",
"binding": "HTTPS",
"auth": {
"version": "a.b.c",
"profile": ["someprofile"]
"version": "2",
"profile": [
"one-profile",
"different-profile"
]
}
}
]
}
""";
private static final String INVALID_AUTH_NOT_AN_ARRAY = """
private static final String INVALID_AUTH_PROFILE_NOT_AN_ARRAY = """
{
"protocolVersions": [
{
"version": "1.0",
"path": "/some/path/v1",
"binding": "HTTPS",
"auth": {
"version": "a.b.c",
"profile": "someprofile"
"protocol": "some-protocol",
"version": "2",
"profile": "one-profile"
}
}
]
Expand Down