diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 50d8d04..5b71912 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -7,4 +7,15 @@ on: jobs: trigger-workflow: - uses: eclipse-dataspace-protocol-base/.github/.github/workflows/scan-pr-title.yml@main \ No newline at end of file + 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 \ No newline at end of file diff --git a/artifacts/src/main/resources/common/protocol-version-schema.json b/artifacts/src/main/resources/common/protocol-version-schema.json index 19b6763..9f3d49b 100644 --- a/artifacts/src/main/resources/common/protocol-version-schema.json +++ b/artifacts/src/main/resources/common/protocol-version-schema.json @@ -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", diff --git a/artifacts/src/test/java/org/eclipse/dsp/schema/common/InvalidVersionSchemaTest.java b/artifacts/src/test/java/org/eclipse/dsp/schema/common/InvalidVersionSchemaTest.java index 0a0447f..916b5d0 100644 --- a/artifacts/src/test/java/org/eclipse/dsp/schema/common/InvalidVersionSchemaTest.java +++ b/artifacts/src/test/java/org/eclipse/dsp/schema/common/InvalidVersionSchemaTest.java @@ -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 @@ -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" + ] + } } ] } @@ -104,7 +111,7 @@ void setUp() { "version": "1.0", "path": "/some/path/v1", "binding": "HTTPS", - "auth": "auth-protocol" + "auth": "a string" } ] } @@ -118,14 +125,17 @@ 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": [ { @@ -133,8 +143,9 @@ void setUp() { "path": "/some/path/v1", "binding": "HTTPS", "auth": { - "version": "a.b.c", - "profile": "someprofile" + "protocol": "some-protocol", + "version": "2", + "profile": "one-profile" } } ]