Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull in latest changes from catena-x fork #119

Merged
merged 65 commits into from
May 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
266eadf
feat(impl):[TRI-1191] cancel batch order impl
ds-ext-kmassalski May 3, 2023
2d0cdcd
Merge branch 'main' into feature/TRI-1191-cancel-batch-order-impl
ds-ext-kmassalski May 4, 2023
31a6158
feat(impl):[TRI-1191] cover impl with unit tests
ds-ext-kmassalski May 4, 2023
cd1bf8e
feat(impl):[TRI-1191] update api desc
ds-ext-kmassalski May 4, 2023
8f3fcc8
feat(impl):[TRI-1191] fix test
ds-ext-kmassalski May 4, 2023
e319d1a
feat(impl):[TRI-1191] merge main
ds-ext-kmassalski May 8, 2023
940600f
feat(impl):[TRI-1192] additional unit test, exteneded assertions
ds-ext-kmassalski May 8, 2023
4ad6804
Merge pull request #304 from catenax-ng/feature/TRI-1191-cancel-batch…
ds-ext-kmassalski May 8, 2023
d2d1fc2
feat(testdata): Update script to register decentralized registry
ds-jhartmann May 8, 2023
44352fb
feat(local): Update local setup to decentralized registry
ds-jhartmann May 8, 2023
336a467
feat(impl):[TRI-1192] extend with unit test
ds-ext-kmassalski May 9, 2023
e19549e
Merge pull request #308 from catenax-ng/feature/TRI-1192-extened-unit…
ds-ext-kmassalski May 9, 2023
03e0786
feat(local): Add discovery service mocks to irs-full
ds-jhartmann May 9, 2023
9d679be
feat(local): Remove default ingress
ds-jhartmann May 9, 2023
cfbad5d
feat(local): Remove hpa
ds-jhartmann May 9, 2023
7e1f175
feat(charts): Update config map reference name
ds-jhartmann May 9, 2023
bd80ce4
chore(release):[TRI-708] Add new workflow for release automation
ds-jkreutzfeld May 9, 2023
ecf7db4
feat(impl):[TRI-1080] change rules to match api
ds-ext-kmassalski May 10, 2023
d1fae0e
chore(testing): Add request collection for Discovery services
ds-jhartmann May 10, 2023
81724e5
Merge pull request #313 from catenax-ng/feature/TRI-1080-change-rules
ds-ext-kmassalski May 10, 2023
7ce4238
feat(impl):[TRI-1080] change regexp
ds-ext-kmassalski May 10, 2023
99c8b11
chore(testing): Update discovery request titles
ds-jhartmann May 10, 2023
021615f
Merge pull request #316 from catenax-ng/feature/TRI-1080-change-rules
ds-ext-kmassalski May 10, 2023
cf609f9
chore(release):[TRI-708] Replace sed with yq to improve readability
ds-jkreutzfeld May 10, 2023
1496e7c
feat(impl):[TRI-1163] validate bpn endpoint before starting job
ds-ext-kmassalski May 10, 2023
b6fc434
feat(impl):[TRI-1163] unit test
ds-ext-kmassalski May 10, 2023
b3c10c0
chore(dependencies): Update DEPENDENCIES
ds-jhartmann May 10, 2023
ab305d7
feat(impl):[TRI-1163] unit test
ds-ext-kmassalski May 10, 2023
91c2103
Merge pull request #322 from catenax-ng/chore/update_dependencies
ds-jhartmann May 10, 2023
8de242f
feat(impl):[TRI-1163] fix test
ds-ext-kmassalski May 10, 2023
5f61bc0
chore(release):[TRI-708] Fix release workflow
ds-jkreutzfeld May 10, 2023
b29ca7a
chore(release):[TRI-708] Add call trigger for jira workflow
ds-jkreutzfeld May 11, 2023
1388ef7
chore(release):[TRI-708] Add title for PR
ds-jkreutzfeld May 11, 2023
dec6e40
Merge pull request #315 from catenax-ng/chore/TRI-708-automate-release
ds-jkreutzfeld May 11, 2023
1abfefb
feat(charts): Adjust bpdm.bpnEndpoint template to be empty if bpdm.ur…
ds-jhartmann May 11, 2023
65551e1
chore(workflows): Add kind-registry image repository for helm testing
ds-jhartmann May 11, 2023
6c7ac80
Merge pull request #321 from catenax-ng/feature/TRI-1163-validate-bpd…
ds-ext-kmassalski May 11, 2023
c9cdab3
Merge pull request #324 from catenax-ng/chore/fix-helm-test-image-path
ds-jhartmann May 11, 2023
da6f3de
fix(api):[TRI-1094] [CVE][PENTEST][MEDIUM] Blind Server Side Request …
May 12, 2023
08f2988
Merge pull request #325 from catenax-ng/fix/TRI-1094
ds-ext-abugajewski May 12, 2023
880e50c
feat(impl):[TRI-XXX] adjustments for smells
ds-ext-kmassalski May 12, 2023
e945d9d
feat(impl):[TRI-1222] introduce constant after review
ds-ext-kmassalski May 12, 2023
427e6cc
feat(impl):[TRI-1222] introduce constant after review
ds-ext-kmassalski May 12, 2023
574a297
Merge pull request #327 from catenax-ng/feature/TRI-1222-introduce-co…
ds-ext-abugajewski May 12, 2023
4a31fde
Merge pull request #326 from catenax-ng/feature/TRI-XXX-code-smells-a…
ds-ext-abugajewski May 12, 2023
262e71d
Merge pull request #311 from catenax-ng/feature/TRI-1293-decentralize…
ds-jhartmann May 15, 2023
37633a5
chore(release): Prepare IRS release 2.6.1 and helm 5.3.1
May 15, 2023
71ff426
chore(release): Prepare IRS release 2.6.1 and helm 5.3.1 - revert wro…
May 15, 2023
ae30c45
chore(release): Prepare IRS release 2.6.1 and helm 5.3.1 - revert sec…
May 15, 2023
72054fd
Merge pull request #328 from catenax-ng/chore/prepare-release-2.6.1
ds-ext-abugajewski May 15, 2023
6bf7bc0
chore(release): Prepare release for Helm version 5.3.1
ds-ext-abugajewski May 15, 2023
f56252a
Merge pull request #329 from catenax-ng/chore/prepare-helm-release-5.3.1
ds-ext-abugajewski May 15, 2023
fd89b03
chore(testdata):[TRI-1400] added bpnl list parameter to specify bpnls…
ds-mmaul May 15, 2023
1478750
chore(release):[TRI-708] Fix release workflows
ds-jkreutzfeld May 15, 2023
61617ac
Merge pull request #330 from catenax-ng/chore/fix-workflows
ds-jkreutzfeld May 15, 2023
04f5c67
chore(docs):Add explanation comment for policy config
ds-jkreutzfeld May 16, 2023
75ab92a
chore(testdata): Add README describing the functionality of transform…
ds-jhartmann May 16, 2023
4b766e8
chore(testdata): Fix script name
ds-jhartmann May 16, 2023
6b913e1
Merge pull request #332 from catenax-ng/chore/add-policy-manual
ds-jkreutzfeld May 17, 2023
cac4b13
feat(testdata): add --aas3 option to upload AAS 3.0 conform shells
ds-jhartmann May 17, 2023
6723223
feat(testdata): fix typo
ds-jhartmann May 22, 2023
ac524ae
Merge pull request #333 from catenax-ng/chore/testdata-script-documen…
ds-jhartmann May 23, 2023
b8d4558
Merge pull request #314 from catenax-ng/chore/add-discovery-requests
ds-jhartmann May 25, 2023
791fdcf
Merge pull request #336 from catenax-ng/feature/TRI-1321-testdata-AAS…
ds-jhartmann May 26, 2023
93f134d
Merge branch 'main' into chore/sync-to-tx
ds-jhartmann May 26, 2023
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
4 changes: 2 additions & 2 deletions .config/spectral/restBasicUrls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ rules:


# MUST use camelCase for query parameters
use-snake-case-for-query-parameters:
use-camel-case-for-query-parameters:
description: |
MUST use camelCase for query parameters
message: '{{property}} use camelCase for query parameters: {{error}}'
Expand All @@ -114,7 +114,7 @@ rules:
then:
function: pattern
functionOptions:
match: "^[a-z]+([A-Z][a-z0-9]+)+"
match: "^[a-z]+([A-Z][a-z0-9]+)*$"

# MUST pluralize resource names [134]
# => https://opensource.zalando.com/restful-api-guidelines/#134
Expand Down
30 changes: 15 additions & 15 deletions .config/spectral/restBasicsJsonPayload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +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 camelCase
must-use-snake-case-for-property-names:
message: Property name has to be ASCII camelCase
description: MUST property names must be ASCII camelCase
# MUST property names must be ASCII pascalCase
must-use-pascal-or-camel-case-for-property-names:
message: Property name has to be ASCII PascalCase or camelCase
description: MUST property names must be ASCII PascalCase or 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][a-z0-9]+)+
match: ^[A-Z]?[a-z]+(?:[A-Z][a-z]+)*$

# SHOULD declare enum values using UPPER_SNAKE_CASE string [240]
# => https://opensource.zalando.com/restful-api-guidelines/#240
Expand Down Expand Up @@ -75,15 +75,15 @@ rules:

# SHOULD not use null for empty arrays [124]
# => https://opensource.zalando.com/restful-api-guidelines/#124
should-not-use-null-for-empty-array-values:
message: '{{error}}'
description: SHOULD not use null for empty arrays [124]
documentationUrl: https://opensource.zalando.com/restful-api-guidelines/#124
severity: error
given: $..properties[?(@.type == 'array')]
then:
field: default
function: truthy
# should-not-use-null-for-empty-array-values:
# message: '{{error}}'
# description: SHOULD not use null for empty arrays [124]
# documentationUrl: https://opensource.zalando.com/restful-api-guidelines/#124
# severity: error
# given: $..properties[?(@.type == 'array')]
# then:
# field: default
# function: truthy

# MUST use common field names and semantics [174]
# => https://opensource.zalando.com/restful-api-guidelines/#174
Expand All @@ -106,7 +106,7 @@ rules:
then:
function: pattern
functionOptions:
match: "^[a-z0-9]+(?:_[a-z0-9]+)*$"
match: "^[a-z]+([A-Z][a-z0-9]+)*$"

must-use-common-field-names-and-semantics-for-id-field:
message: '{{error}}'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/helm-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 --helm-extra-set-args "--set=image.tag=testing"
ct install --charts charts/irs-helm --helm-extra-set-args "--set=image.tag=testing --set=image.repository=kind-registry:5000/irs-api"
if: steps.list-changed.outputs.changed == 'true'
29 changes: 17 additions & 12 deletions .github/workflows/jira-publish-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ on:
required: true
type: string
description: Version that will be released in Jira, eg. 2.0.0

workflow_call:
inputs:
version:
required: true
type: string
description: Version that will be released in Jira, eg. 2.0.0
jobs:
build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -38,20 +43,20 @@ jobs:
VERSION_ID: ${{ env.versionId }}
RELEASE_DATE: ${{ env.NOW }}
run: |
curl --request PUT --url 'https://jira.catena-x.net/rest/api/latest/version/$VERSION_ID' \
curl --request PUT --url "https://jira.catena-x.net/rest/api/latest/version/$VERSION_ID" \
--user $JIRA_USERNAME:$JIRA_PASSWORD \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"archived": false,
"description": $VERSION,
"id": $VERSION_ID,
"name": $VERSION,
"releaseDate": $RELEASE_DATE,
"released": true,
"overdue": false,
"projectId": 10211
}'
--data "{
\"archived\": false,
\"description\": \"$VERSION\",
\"id\": $VERSION_ID,
\"name\": \"$VERSION\",
\"releaseDate\": \"$RELEASE_DATE\",
\"released\": true,
\"overdue\": false,
\"projectId\": 10211
}"

- name: Create NEXT_RELEASE Version in Jira
env:
Expand Down
55 changes: 55 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Release IRS

on:
workflow_dispatch:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Calculate Helm release version from CHANGELOG
run: echo HELM_VERSION=$(cat charts/irs-helm/CHANGELOG.md | sed -n 's/.*\[\([0-9]\+\.[0-9]\+\.[0-9]\+\)\].*/\1/p' | head -n 1) >> $GITHUB_ENV

- name: Update Chart.yaml appVersion
uses: mikefarah/[email protected]
with:
cmd: yq -i eval '.appVersion = "${{ github.ref_name }}"' charts/irs-helm/Chart.yaml

- name: Update Chart.yaml version
uses: mikefarah/[email protected]
with:
cmd: yq -i eval '.version = "${{ env.HELM_VERSION }}"' charts/irs-helm/Chart.yaml

- name: Prepare Helm release
uses: peter-evans/create-pull-request@v5
with:
commit-message: "chore(release): Prepare release for Helm version ${{ env.HELM_VERSION }}"
branch: chore/prepare-helm-release-${{ env.HELM_VERSION }}
base: main
delete-branch: true
title: Prepare Helm release for next version
body: |
This PR prepares the Helm chart release for version ${{ env.HELM_VERSION }}.
Please check whether the Chart was updated correctly and that the CHANGELOG contains the relevant information
for this release. Also, make sure that the values.yaml is correct before merging this PR.

- name: Extract changelog text
run: echo CHANGELOG=$(sed -n -e '/## \[${{ github.ref_name }}\]/,/## \[/ p' CHANGELOG.md | head -n -1) >> $GITHUB_ENV

- name: Create IRS release
uses: softprops/action-gh-release@v1
with:
body: ${{ env.CHANGELOG }}

trigger-jira:
needs:
- release
uses: ./.github/workflows/jira-publish-release.yaml
with:
version: ${{ github.ref_name }}
secrets: inherit
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Known knowns
- PLACEHOLDER REMOVE IF EMPTY: risks that were introduced or discovered in the release and are known but not resolved

## [2.6.1] - 2023-05-15
### Added
- Validation if bpnEndpoint is set in properties before starting a job with lookupBPNs set to true
- Automate release workflow
- Validate if callback url starts with http or https before register a job

## [2.6.0] - 2023-05-05
### Added
- IRS now checks the EDC policies and only negotiates contracts if the policy matches the ones defined in the configuration at `edc.catalog.policies.allowedNames` (comma separated string)
Expand Down Expand Up @@ -214,7 +220,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Unresolved
- **Select Aspects you need** You are able to select the needed aspects for which you want to collect the correct endpoint information.

[Unreleased]: https://github.com/eclipse-tractusx/item-relationship-service/compare/2.6.0...HEAD
[Unreleased]: https://github.com/eclipse-tractusx/item-relationship-service/compare/2.6.1...HEAD
[2.6.1]: https://github.com/eclipse-tractusx/item-relationship-service/compare/2.6.0...2.6.1
[2.6.0]: https://github.com/eclipse-tractusx/item-relationship-service/compare/2.5.1...2.6.0
[2.5.1]: https://github.com/eclipse-tractusx/item-relationship-service/compare/2.5.0...2.5.1
[2.5.0]: https://github.com/eclipse-tractusx/item-relationship-service/compare/2.4.0...2.5.0
Expand Down
10 changes: 5 additions & 5 deletions DEPENDENCIES
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ maven/mavencentral/io.swagger.core.v3/swagger-core/2.2.0, Apache-2.0, approved,
maven/mavencentral/io.swagger.core.v3/swagger-models-jakarta/2.2.7, Apache-2.0, approved, #5919
maven/mavencentral/io.swagger.core.v3/swagger-models/2.2.0, Apache-2.0, approved, clearlydefined
maven/mavencentral/io.swagger/swagger-annotations/1.6.8, Apache-2.0, approved, #3792
maven/mavencentral/jakarta.activation/jakarta.activation-api/1.2.1, BSD-3-Clause, approved, #8017
maven/mavencentral/jakarta.activation/jakarta.activation-api/2.1.1, BSD-3-Clause AND ((EPL-2.0 AND BSD-3-Clause AND GPL-2.0-only) AND LicenseRef-scancode-unknown-spdx), restricted, #8015
maven/mavencentral/jakarta.annotation/jakarta.annotation-api/2.1.1, EPL-2.0 AND (GPL-2.0-only WITH Classpath-exception-2.0) AND (EPL-2.0 AND (GPL-2.0-only WITH Classpath-exception-2.0) AND LicenseRef-scancode-generic-export-compliance) AND (CDDL-1.0 AND EPL-2.0 AND (GPL-2.0-only WITH Classpath-exception-2.0)), restricted, #8018
maven/mavencentral/jakarta.activation/jakarta.activation-api/1.2.1, EPL-2.0 OR BSD-3-Clause OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jaf
maven/mavencentral/jakarta.activation/jakarta.activation-api/2.1.1, EPL-2.0 OR BSD-3-Clause OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jaf
maven/mavencentral/jakarta.annotation/jakarta.annotation-api/2.1.1, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.ca
maven/mavencentral/jakarta.validation/jakarta.validation-api/3.0.2, Apache-2.0, approved, clearlydefined
maven/mavencentral/jakarta.xml.bind/jakarta.xml.bind-api/2.3.2, CDDL-1.1 OR GPL-2.0-only WITH Classpath-exception-2.0, approved, CQ16911
maven/mavencentral/jakarta.xml.bind/jakarta.xml.bind-api/4.0.0, BSD-3-Clause, approved, #8016
maven/mavencentral/jakarta.xml.bind/jakarta.xml.bind-api/2.3.2, BSD-3-Clause, approved, ee4j.jaxb
maven/mavencentral/jakarta.xml.bind/jakarta.xml.bind-api/4.0.0, BSD-3-Clause, approved, ee4j.jaxb
maven/mavencentral/junit/junit/4.13.2, EPL-2.0, approved, CQ23636
maven/mavencentral/net.bytebuddy/byte-buddy-agent/1.12.23, Apache-2.0, approved, #1810
maven/mavencentral/net.bytebuddy/byte-buddy/1.12.23, Apache-2.0 AND BSD-3-Clause, approved, #1811
Expand Down
4 changes: 4 additions & 0 deletions charts/irs-helm/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [5.3.1] - 2023-05-15
### Fixed
- `bpdm.bpnEndpoint` will not be set to an unresolvable URL if `bpdm.url` is not set.

## [5.3.0] - 2023-05-05
### Added
- Added new configuration option for supported policies: `edc.catalog.policies.allowedNames` (comma-separated string)
Expand Down
8 changes: 2 additions & 6 deletions charts/irs-helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,31 +22,27 @@
apiVersion: v2
name: irs-helm
description: IRS Helm chart for Kubernetes

home: https://eclipse-tractusx.github.io/
sources:
- https://github.com/eclipse-tractusx/item-relationship-service

# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 5.3.0
version: 5.3.1


# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "2.6.0"

appVersion: "2.6.1"

dependencies:
- name: common
Expand Down
8 changes: 6 additions & 2 deletions charts/irs-helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ semanticshub:
bpdm:
url: # https://<bpdm-url>
bpnEndpoint: >-
{{ tpl (.Values.bpdm.url | default "") . }}/api/catena/legal-entities/{partnerId}?idType={idType}
{{- if .Values.bpdm.url }}
{{- tpl (.Values.bpdm.url | default "") . }}/api/catena/legal-entities/{partnerId}?idType={idType}
{{- end }}
minioUser: "minio" # <minio-username>
minioPassword: # <minio-password>
minioUrl: "http://{{ .Release.Name }}-minio:9000"
Expand Down Expand Up @@ -173,7 +175,9 @@ edc:
ttl: P1D # Time after which a cached Item is no longer valid and the real catalog is called instead
maxCachedItems: 64000 # Maximum amount of cached catalog items
policies:
allowedNames: ID 3.0 Trace, ID 3.1 Trace, R2_Traceability
# IRS will only negotiate contracts for offers with a policy as defined in the allowedNames list.
# If a requested asset does not provide one of these policies, a tombstone will be created and this node will not be processed.
allowedNames: ID 3.0 Trace, ID 3.1 Trace, R2_Traceability # List of comma separated names of the policies to accept.

discovery:
endpoint: # EDC Discovery Service endpoint
Expand Down
66 changes: 66 additions & 0 deletions docs/src/api/irs-v1.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,72 @@ paths:
summary: Get a batch order for a given orderId.
tags:
- Item Relationship Service
put:
description: Cancel a batch order for a given orderId.
operationId: cancelBatchOrder
parameters:
- description: Id of the order.
example: 6c311d29-5753-46d4-b32c-19b918ea93b0
in: path
name: orderId
required: true
schema:
type: string
format: uuid
maxLength: 36
minLength: 36
responses:
"200":
content:
application/json:
examples:
complete:
$ref: '#/components/examples/complete-order-result'
schema:
$ref: '#/components/schemas/BatchOrderResponse'
description: Cancel a batch order for a given orderId.
"400":
content:
application/json:
examples:
error:
$ref: '#/components/examples/error-response-400'
schema:
$ref: '#/components/schemas/ErrorResponse'
description: Return Batch Order failed.
"401":
content:
application/json:
examples:
error:
$ref: '#/components/examples/error-response-401'
schema:
$ref: '#/components/schemas/ErrorResponse'
description: No valid authentication credentials.
"403":
content:
application/json:
examples:
error:
$ref: '#/components/examples/error-response-403'
schema:
$ref: '#/components/schemas/ErrorResponse'
description: Authorization refused by server.
"404":
content:
application/json:
examples:
error:
$ref: '#/components/examples/error-response-404'
schema:
$ref: '#/components/schemas/ErrorResponse'
description: Batch Order with the requested orderId not found.
security:
- oAuth2:
- profile email
summary: Cancel a batch order for a given orderId.
tags:
- Item Relationship Service
/irs/orders/{orderId}/batches/{batchId}:
get:
description: Get a batch with a given batchId for a given orderId.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public TrustedPortConfiguration(@Value("${server.port:8080}") final String serve
}

@Bean
public WebServerFactoryCustomizer<?> servletContainer() {
public WebServerFactoryCustomizer<TomcatServletWebServerFactory> servletContainer() {

final Connector[] additionalConnectors = this.additionalConnector();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
*/
public interface BatchOrderStore {

void save(UUID batchId, BatchOrder batch);
void save(UUID batchOrderId, BatchOrder batch);

Optional<BatchOrder> find(UUID batchId);
Optional<BatchOrder> find(UUID batchOrderId);

List<BatchOrder> findAll();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ private String toBlobId(final String jobId) {
return JOB_PREFIX + jobId;
}

private Boolean isLastStateSameAsCurrentState(final String jobId, final JobState state) {
private boolean isLastStateSameAsCurrentState(final String jobId, final JobState state) {
final Optional<MultiTransferJob> optJob = get(jobId);
return optJob.isPresent() && optJob.get().getJob().getState() == state;
return optJob.isPresent() && optJob.get().getJob().getState().equals(state);
}

}
Loading