Skip to content

Commit

Permalink
Merge pull request #112 from catenax-ng/main
Browse files Browse the repository at this point in the history
Add support for EDC policies, restructure repository, prepare release 2.6.0
  • Loading branch information
ds-jkreutzfeld authored May 5, 2023
2 parents 5dcfbe8 + b623904 commit 59098dc
Showing 387 changed files with 978 additions and 971 deletions.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions ci/checkstyle.xml → .config/checkstyle.xml
Original file line number Diff line number Diff line change
@@ -17,12 +17,12 @@ page at http://checkstyle.sourceforge.net/config.html -->
</module>

<module name="SuppressionFilter">
<property name="file" value="ci/checkstyle-suppressions.xml"/>
<property name="file" value=".config/checkstyle-suppressions.xml"/>
<property name="optional" value="true"/>
</module>

<module name="Header">
<property name="headerFile" value="ci/irs.header"/>
<property name="headerFile" value=".config/irs.header"/>
<property name="fileExtensions" value="java"/>
</module>

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -6,18 +6,18 @@ rules:

# MUST contain API meta information [218]
# https://opensource.zalando.com/restful-api-guidelines/#218
must-use-x-summary:
message: "API MUST have an one-liner #/info/x-summary field"
description: "In OAS3.1 you can use the standard `#/info/summary` field."
given: $
severity: error
recommended: true
type: style
formats:
- oas3
then:
field: "info.x-summary"
function: truthy
# must-use-x-summary:
# message: "API MUST have an one-liner #/info/x-summary field"
# description: "In OAS3.1 you can use the standard `#/info/summary` field."
# given: $
# severity: error
# recommended: true
# type: style
# formats:
# - oas3
# then:
# field: "info.x-summary"
# function: truthy

must-have-info-description:
message: Missing `info.description`.
@@ -29,25 +29,25 @@ rules:
field: description
function: truthy

must-have-info-contact-name:
message: Missing `info.contact.name`.
description: MUST contain API meta information [218]
documentationUrl: https://opensource.zalando.com/restful-api-guidelines/#218
severity: error
given: $.info
then:
field: contact.name
function: truthy
# must-have-info-contact-name:
# message: Missing `info.contact.name`.
# description: MUST contain API meta information [218]
# documentationUrl: https://opensource.zalando.com/restful-api-guidelines/#218
# severity: error
# given: $.info
# then:
# field: contact.name
# function: truthy

must-have-info-contact-url:
message: Missing `info.contact.url`.
description: MUST contain API meta information [218]
documentationUrl: https://opensource.zalando.com/restful-api-guidelines/#218
severity: error
given: $.info
then:
field: contact.url
function: truthy
# must-have-info-contact-url:
# message: Missing `info.contact.url`.
# description: MUST contain API meta information [218]
# documentationUrl: https://opensource.zalando.com/restful-api-guidelines/#218
# severity: error
# given: $.info
# then:
# field: contact.url
# function: truthy

info-contact: true
info-description: true
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -103,19 +103,18 @@ rules:
match: ^\/[^\/]*((\/{[^}]*})*\/[^\/]*(\/{[^}]*})*){0,3}\/?$


# MUST use snake_case (never camelCase) for query parameters [130]
# => https://opensource.zalando.com/restful-api-guidelines/#130
# MUST use camelCase for query parameters
use-snake-case-for-query-parameters:
description: |
MUST use snake_case (never camelCase) for query parameters
message: '{{property}} use snake_case for query parameters: {{error}}'
MUST use camelCase for query parameters
message: '{{property}} use camelCase for query parameters: {{error}}'
severity: error
recommended: true
given: $.paths.*.*.parameters[?(@.in=='query')].name
then:
function: pattern
functionOptions:
match: "^[a-z0-9]+(?:_[a-z0-9]+)*$"
match: "^[a-z]+([A-Z][a-z0-9]+)+"

# MUST pluralize resource names [134]
# => https://opensource.zalando.com/restful-api-guidelines/#134
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -56,81 +56,6 @@ rules:
required:
- schema

must-use-http-methode-put-correctly:
message: 'must use standardized response code {{error}}'
description: MUST use HTTP methods correctly [148]
documentationUrl: https://opensource.zalando.com/restful-api-guidelines/#148
severity: error
given: $.paths.*.[put]
then:
function: must-use-http-methods-correctly
functionOptions:
requiredFields:
- '200'
- '201'
- '204'
- default

must-use-http-methode-get-correctly:
message: 'must use standardized response code {{error}}'
description: MUST use HTTP methods correctly [148]
documentationUrl: https://opensource.zalando.com/restful-api-guidelines/#148
severity: error
given: $.paths.*.[get]
then:
function: must-use-http-methods-correctly
functionOptions:
requiredFields:
- '200'
- '404'
- default

must-use-http-methode-post-correctly:
message: 'must use standardized response code {{error}}'
description: MUST use HTTP methods correctly [148]
documentationUrl: https://opensource.zalando.com/restful-api-guidelines/#148
severity: error
given: $.paths.*.[post]
then:
function: must-use-http-methods-correctly
functionOptions:
requiredFields:
- '200'
- '201'
- '202'
- '204'
- default

must-use-http-methode-patch-correctly:
message: 'must use standardized response code {{error}}'
description: MUST use HTTP methods correctly [148]
documentationUrl: https://opensource.zalando.com/restful-api-guidelines/#148
severity: error
given: $.paths.*.[patch]
then:
function: must-use-http-methods-correctly
functionOptions:
requiredFields:
- '200'
- '204'
- default

must-use-http-methode-delete-correctly:
message: 'must use standardized response code {{error}}'
description: MUST use HTTP methods correctly [148]
documentationUrl: https://opensource.zalando.com/restful-api-guidelines/#148
severity: error
given: $.paths.*.[delete]
then:
function: must-use-http-methods-correctly
functionOptions:
requiredFields:
- '200'
- '204'
- '404'
- '410'
- default

application-json-response-success:
description: All success responses MUST be of media type application/json
severity: error
Original file line number Diff line number Diff line change
@@ -10,15 +10,15 @@ rules:

# MUST specify success and error responses [151]
# => https://opensource.zalando.com/restful-api-guidelines/#151
must-specify-default-response:
message: Operation does not contain a default response
description: MUST specify success and error responses [151]
documentationUrl: https://opensource.zalando.com/restful-api-guidelines/#151
severity: error
given: $.paths.*.*.responses
then:
field: default
function: truthy
# must-specify-default-response:
# message: Operation does not contain a default response
# description: MUST specify success and error responses [151]
# documentationUrl: https://opensource.zalando.com/restful-api-guidelines/#151
# severity: error
# given: $.paths.*.*.responses
# then:
# field: default
# function: truthy

must-use-problem-json-as-default-response:
message: Operation must use problem json as default response
@@ -139,15 +139,15 @@ rules:

# MUST support problem JSON [176]
# => https://opensource.zalando.com/restful-api-guidelines/#176
must-use-problem-json-for-errors:
message: Error response must be application/problem+json
description: MUST support problem JSON [176]
documentationUrl: https://opensource.zalando.com/restful-api-guidelines/#176
severity: error
given: $.paths.*.*.responses[?(@property.match(/^(4|5)/))]
then:
field: content.application/problem+json
function: truthy
# must-use-problem-json-for-errors:
# message: Error response must be application/problem+json
# description: MUST support problem JSON [176]
# documentationUrl: https://opensource.zalando.com/restful-api-guidelines/#176
# severity: error
# given: $.paths.*.*.responses[?(@property.match(/^(4|5)/))]
# then:
# field: content.application/problem+json
# function: truthy

must-use-valid-problem-json-schema:
message: '{{error}}'
Original file line number Diff line number Diff line change
@@ -21,18 +21,17 @@ rules:
functionOptions:
match: ^application\/(problem\+)?json$|^[a-zA-Z0-9_]+\/[-+.a-zA-Z0-9_]+;(v|version)=[0-9]+$

# MUST property names must be ASCII snake_case [118]
# => https://opensource.zalando.com/restful-api-guidelines/#118
# MUST property names must be ASCII camelCase
must-use-snake-case-for-property-names:
message: Property name has to be ASCII snake_case
description: MUST property names must be ASCII snake_case [118]
message: Property name has to be ASCII camelCase
description: MUST property names must be ASCII camelCase
documentationUrl: https://opensource.zalando.com/restful-api-guidelines/#118
severity: error
given: $.paths.*.*[responses,requestBody]..content..schema..properties.*~
then:
function: pattern
functionOptions:
match: ^[a-z_][a-z_0-9]*$
match: ^[a-z]+([A-Z][a-z0-9]+)+

# SHOULD declare enum values using UPPER_SNAKE_CASE string [240]
# => https://opensource.zalando.com/restful-api-guidelines/#240
@@ -48,19 +47,18 @@ rules:
functionOptions:
match: "^(([A-Z]+)(_[A-Z]+)*)$"

# SHOULD name date/time properties with _at suffix [235]
# => https://opensource.zalando.com/restful-api-guidelines/#235
# SHOULD name date/time properties with On suffix [235]
should-use-name-date-and-time-properties-with-at-suffix:
message: 'SHOULD name date/time properties with _at suffix'
description: SHOULD name date/time properties with _at suffix [235]
message: 'SHOULD name date/time properties with On suffix'
description: SHOULD name date/time properties with On suffix [235]
documentationUrl: https://opensource.zalando.com/restful-api-guidelines/#235
severity: error
recommended: true
given: $..properties[?((@.format == "date-time" || @.format == "date") && @.type == 'string')].~
then:
function: pattern
functionOptions:
match: "^(.*[_]at$).*$"
match: "^(.*On$).*$"

# MUST not use null for boolean properties [122]
# => https://opensource.zalando.com/restful-api-guidelines/#122
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions .github/workflows/BETA-xray-cucumber-integration.yaml
Original file line number Diff line number Diff line change
@@ -40,13 +40,13 @@ jobs:
env:
KEYCLOAK_CLIENT_SECRET: ${{ secrets.KEYCLOAK_OAUTH2_CLIENT_SECRET_BETA }}
run: |
unzip -o features.zip -d cucumber-tests/src/test/resources/features
mvn --batch-mode clean install -pl cucumber-tests,irs-models -D"cucumber.filter.tags"="not @Ignore and @INTEGRATION_TEST"
unzip -o features.zip -d irs-cucumber-tests/src/test/resources/features
mvn --batch-mode clean install -pl irs-cucumber-tests,irs-models -D"cucumber.filter.tags"="not @Ignore and @INTEGRATION_TEST"
- name: Submit results to Xray
if: ${{ always() && steps.download.outputs.http_response == '200' }}
env:
JIRA_USERNAME: ${{ secrets.ORG_IRS_JIRA_USERNAME }}
JIRA_PASSWORD: ${{ secrets.ORG_IRS_JIRA_PASSWORD }}
run: |
curl --request POST -u $JIRA_USERNAME:$JIRA_PASSWORD --header 'Content-Type: application/json' --data-binary '@cucumber-tests/report.json' "https://jira.catena-x.net/rest/raven/1.0/import/execution/cucumber"
curl --request POST -u $JIRA_USERNAME:$JIRA_PASSWORD --header 'Content-Type: application/json' --data-binary '@irs-cucumber-tests/report.json' "https://jira.catena-x.net/rest/raven/1.0/import/execution/cucumber"
9 changes: 2 additions & 7 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -22,15 +22,10 @@ on:
paths-ignore:
- '**/*.md'
- '**/*.txt'
- 'api/**'
- 'api-tests/**'
- 'charts/**'
- 'ci/**'
- '.config/**'
- 'docs/**'
- 'dev/**'
- 'testdata-transform/**'
- 'testing/**'
- 'uml-diagrams/**'
- 'local/**'
- 'README.md'
- 'CHANGELOG.md'
schedule:
2 changes: 1 addition & 1 deletion .github/workflows/helm-test.yaml
Original file line number Diff line number Diff line change
@@ -56,5 +56,5 @@ jobs:
helm repo add minio https://charts.min.io/
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo add grafana https://grafana.github.io/helm-charts
ct install --charts charts/irs-helm
ct install --charts charts/irs-helm --helm-extra-set-args "--set=image.tag=testing"
if: steps.list-changed.outputs.changed == 'true'
10 changes: 5 additions & 5 deletions .github/workflows/int-setup-testdata.yml
Original file line number Diff line number Diff line change
@@ -39,7 +39,7 @@ jobs:
with:
python-version: 3.8 #install the python needed
cache: 'pip'
- run: pip install -r testdata-transform/requirements.txt
- run: pip install -r local/testing/testdata/requirements.txt

- name: Delete existing and setup new test data on provider EDC and Registry
if: ${{ github.event.inputs.esrUrl == '' }}
@@ -50,11 +50,11 @@ jobs:
EDC_URLs: ${{ github.event.inputs.edcUrls }}
EDC_API_KEY: ${{ github.event.inputs.edcApiKey }}
run: |
python testdata-transform/reset-env.py \
python local/testing/testdata/reset-env.py \
-a $AAS_URL \
-edc $EDC_URLs \
-k $EDC_API_KEY
python testdata-transform/transform-and-upload.py \
python local/testing/testdata/transform-and-upload.py \
-f $TESTFILE_PATH \
-s $SUBMODEL_URLs \
-a $AAS_URL \
@@ -71,11 +71,11 @@ jobs:
EDC_API_KEY: ${{ github.event.inputs.edcApiKey }}
ESR_URL: ${{ github.event.inputs.esrUrl }}
run: |
python testdata-transform/reset-env.py \
python local/testing/testdata/reset-env.py \
-a $AAS_URL \
-edc $EDC_URLs \
-k $EDC_API_KEY
python testdata-transform/transform-and-upload.py \
python local/testing/testdata/transform-and-upload.py \
-f $TESTFILE_PATH \
-s $SUBMODEL_URLs \
-a $AAS_URL \
2 changes: 1 addition & 1 deletion .github/workflows/int-test-automation.yml
Original file line number Diff line number Diff line change
@@ -34,6 +34,6 @@ jobs:
env:
PROFILE_GITHUB: ${{ github.event.inputs.irsTestProfile }}
run: |
mvn -Dtest=integration-tests/src/test/java/org/eclipse/tractusx/irs/smoketest/ItemGraphSmokeTest test \
mvn -Dtest=irs-integration-tests/src/test/java/org/eclipse/tractusx/irs/smoketest/ItemGraphSmokeTest test \
-D spring.profiles.active=$PROFILE_GITHUB \
-D surefire.failIfNoSpecifiedTests=false
9 changes: 2 additions & 7 deletions .github/workflows/irs-build.yml
Original file line number Diff line number Diff line change
@@ -6,15 +6,10 @@ on:
paths-ignore:
- '**/*.md'
- '**/*.txt'
- 'api/**'
- 'api-tests/**'
- 'charts/**'
- 'ci/**'
- '.config/**'
- 'docs/**'
- 'dev/**'
- 'testdata-transform/**'
- 'testing/**'
- 'uml-diagrams/**'
- 'local/**'
- 'CHANGELOG.md'
push:
branches:
Loading

0 comments on commit 59098dc

Please sign in to comment.