feature/use-dot-uuid-in-api (#120)

Co-authored-by: Michael Hoennig <michael@hoennig.de>
Reviewed-on: #120
Reviewed-by: Marc Sandlus <marc.sandlus@hostsharing.net>
This commit is contained in:
Michael Hoennig 2024-11-11 11:25:42 +01:00
parent e97b177a92
commit 8f410198e9
41 changed files with 189 additions and 190 deletions

View File

@ -77,7 +77,6 @@ public class HsOfficeCoopAssetsTransactionController implements HsOfficeCoopAsse
@Override
@Transactional(readOnly = true)
public ResponseEntity<HsOfficeCoopAssetsTransactionResource> getCoopAssetTransactionByUuid(
final String currentSubject, final String assumedRoles, final UUID assetTransactionUuid) {

View File

@ -52,11 +52,11 @@ components:
HsBookingItemInsert:
type: object
properties:
projectUuid:
project.uuid:
type: string
format: uuid
nullable: false
parentItemUuid:
parentItem.uuid:
type: string
format: uuid
nullable: false
@ -77,7 +77,7 @@ components:
$ref: '../hs-hosting/hs-hosting-asset-schemas.yaml#/components/schemas/HsHostingAssetAutoInsert'
required:
- caption
- projectUuid
- project.uuid
- validFrom
- resources
additionalProperties: false

View File

@ -25,7 +25,7 @@ components:
HsBookingProjectInsert:
type: object
properties:
debitorUuid:
debitor.uuid:
type: string
format: uuid
nullable: false
@ -35,6 +35,6 @@ components:
maxLength: 80
nullable: false
required:
- debitorUuid
- debitor.uuid
- caption
additionalProperties: false

View File

@ -54,7 +54,7 @@ components:
caption:
type: string
nullable: true
alarmContactUuid:
alarmContact.uuid:
type: string
format: uuid
nullable: true
@ -64,11 +64,11 @@ components:
HsHostingAssetInsert:
type: object
properties:
bookingItemUuid:
bookingItem.uuid:
type: string
format: uuid
nullable: true
parentAssetUuid:
parentAsset.uuid:
type: string
format: uuid
nullable: true
@ -84,7 +84,7 @@ components:
minLength: 3
maxLength: 80
nullable: false
alarmContactUuid:
alarmContact.uuid:
type: string
format: uuid
nullable: true
@ -99,11 +99,11 @@ components:
HsHostingAssetAutoInsert:
type: object
properties:
parentAssetUuid:
parentAsset.uuid:
type: string
format: uuid
nullable: true
assignedToAssetUuid:
assignedToAsset.uuid:
type: string
format: uuid
type:
@ -118,7 +118,7 @@ components:
minLength: 3
maxLength: 80
nullable: false
alarmContactUuid:
alarmContact.uuid:
type: string
format: uuid
nullable: true
@ -147,10 +147,10 @@ components:
minLength: 3
maxLength: 80
nullable: false
assignedToAssetUuid:
assignedToAsset.uuid:
type: string
format: uuid
alarmContactUuid:
alarmContact.uuid:
type: string
format: uuid
nullable: true

View File

@ -62,7 +62,7 @@ components:
HsOfficeCoopAssetsTransactionInsert:
type: object
properties:
membershipUuid:
membership.uuid:
type: string
format: uuid
nullable: false
@ -80,11 +80,11 @@ components:
maxLength: 48
comment:
type: string
reverseEntryUuid:
reverseEntry.uuid:
type: string
format: uuid
required:
- membershipUuid
- membership.uuid
- transactionType
- assetValue
- valueDate

View File

@ -56,7 +56,7 @@ components:
HsOfficeCoopSharesTransactionInsert:
type: object
properties:
membershipUuid:
membership.uuid:
type: string
format: uuid
nullable: false
@ -73,11 +73,11 @@ components:
maxLength: 48
comment:
type: string
adjustedShareTxUuid:
adjustedShareTx.uuid:
type: string
format: uuid
required:
- membershipUuid
- membership.uuid
- transactionType
- shareCount
- valueDate

View File

@ -41,7 +41,7 @@ components:
HsOfficeDebitorPatch:
type: object
properties:
debitorRelUuid:
debitorRel.uuid:
type: string
format: uuid
nullable: true
@ -61,7 +61,7 @@ components:
vatReverseCharge:
type: boolean
nullable: false
refundBankAccountUuid:
refundBankAccount.uuid:
type: string
format: uuid
nullable: true
@ -75,7 +75,7 @@ components:
properties:
debitorRel:
$ref: 'hs-office-relation-schemas.yaml#/components/schemas/HsOfficeRelationSubInsert'
debitorRelUuid:
debitorRel.uuid:
type: string
format: uuid
debitorNumberSuffix:
@ -92,7 +92,7 @@ components:
type: boolean
vatReverseCharge:
type: boolean
refundBankAccountUuid:
refundBankAccount.uuid:
type: string
format: uuid
defaultPrefix:

View File

@ -62,7 +62,7 @@ components:
HsOfficeMembershipInsert:
type: object
properties:
partnerUuid:
partner.uuid:
type: string
format: uuid
nullable: false
@ -86,7 +86,7 @@ components:
nullable: false
type: boolean
required:
- partnerUuid
- partner.uuid
- memberNumberSuffix
- validFrom
- membershipFeeBillable

View File

@ -50,7 +50,7 @@ components:
HsOfficePartnerPatch:
type: object
properties:
partnerRelUuid:
partnerRel.uuid:
type: string
format: uuid
nullable: true
@ -103,19 +103,19 @@ components:
type: object
nullable: false
properties:
anchorUuid:
anchor.uuid:
type: string
format: uuid
holderUuid:
holder.uuid:
type: string
format: uuid
contactUuid:
contact.uuid:
type: string
format: uuid
required:
- anchorUuid
- holderUuid
- relContactUuid
- anchor.uuid
- holder.uuid
- relContact.uuid
HsOfficePartnerDetailsInsert:
type: object

View File

@ -36,7 +36,7 @@ components:
HsOfficeRelationPatch:
type: object
properties:
contactUuid:
contact.uuid:
type: string
format: uuid
nullable: true
@ -45,10 +45,10 @@ components:
HsOfficeRelationInsert:
type: object
properties:
anchorUuid:
anchor.uuid:
type: string
format: uuid
holderUuid:
holder.uuid:
type: string
format: uuid
type:
@ -57,32 +57,32 @@ components:
mark:
type: string
nullable: true
contactUuid:
contact.uuid:
type: string
format: uuid
required:
- anchorUuid
- holderUuid
- anchor.uuid
- holder.uuid
- type
- contactUuid
- contact.uuid
# relation created as a sub-element with implicitly known type
HsOfficeRelationSubInsert:
type: object
properties:
anchorUuid:
anchor.uuid:
type: string
format: uuid
holderUuid:
holder.uuid:
type: string
format: uuid
mark:
type: string
nullable: true
contactUuid:
contact.uuid:
type: string
format: uuid
required:
- anchorUuid
- holderUuid
- contactUuid
- anchor.uuid
- holder.uuid
- contact.uuid

View File

@ -48,11 +48,11 @@ components:
HsOfficeSepaMandateInsert:
type: object
properties:
debitorUuid:
debitor.uuid:
type: string
format: uuid
nullable: false
bankAccountUuid:
bankAccount.uuid:
type: string
format: uuid
nullable: false
@ -72,8 +72,8 @@ components:
format: date
nullable: true
required:
- debitorUuid
- bankAccountUuid
- debitor.uuid
- bankAccount.uuid
- reference
- agreement
- validFrom

View File

@ -8,21 +8,21 @@ components:
properties:
grantedByRoleIdName:
type: string
grantedByRoleUuid:
grantedByRole.uuid:
type: string
format: uuid
assumed:
type: boolean
grantedRoleIdName:
type: string
grantedRoleUuid:
grantedRole.uuid:
type: string
format: uuid
granteeSubjectName:
type: string
granteeSubjectUuid:
granteeSubject.uuid:
type: string
format: uuid
required:
- grantedRoleUuid
- granteeSubjectUuid
- grantedRole.uuid
- granteeSubject.uuid

View File

@ -9,7 +9,7 @@ components:
uuid:
type: string
format: uuid
objectUuid:
object.uuid:
type: string
format: uuid
objectTable:

View File

@ -14,7 +14,7 @@ components:
RbacSubjectPermission:
type: object
properties:
objectUuid:
object.uuid:
type: string
format: uuid
objectTable:
@ -23,10 +23,10 @@ components:
type: string
roleName:
type: string
roleUuid:
role.uuid:
type: string
format: uuid
permissionUuid:
permission.uuid:
type: string
format: uuid
op:

View File

@ -150,7 +150,7 @@ class HsBookingItemControllerAcceptanceTest extends ContextBasedTestWithCleanup
.contentType(ContentType.JSON)
.body("""
{
"projectUuid": "{projectUuid}",
"project.uuid": "{projectUuid}",
"type": "MANAGED_SERVER",
"caption": "some new booking",
"validTo": "{validTo}",
@ -200,8 +200,8 @@ class HsBookingItemControllerAcceptanceTest extends ContextBasedTestWithCleanup
.contentType(ContentType.JSON)
.body("""
{
"projectUuid": "{projectUuid}",
"parentItemUuid": "{managedServerUuid}",
"project.uuid": "{projectUuid}",
"parentItem.uuid": "{managedServerUuid}",
"type": "MANAGED_WEBSPACE",
"caption": "some managed webspace",
"resources": {
@ -270,7 +270,7 @@ class HsBookingItemControllerAcceptanceTest extends ContextBasedTestWithCleanup
.contentType(ContentType.JSON)
.body("""
{
"projectUuid": "{projectUuid}",
"project.uuid": "{projectUuid}",
"type": "DOMAIN_SETUP",
"caption": "Domain-Setup for example.org",
"resources": {
@ -285,7 +285,7 @@ class HsBookingItemControllerAcceptanceTest extends ContextBasedTestWithCleanup
},
{
"type": "DOMAIN_HTTP_SETUP",
"assignedToAssetUuid": "{unixUserUuid}"
"assignedToAsset.uuid": "{unixUserUuid}"
},
{
"type": "DOMAIN_MBOX_SETUP"
@ -360,7 +360,7 @@ class HsBookingItemControllerAcceptanceTest extends ContextBasedTestWithCleanup
.contentType(ContentType.JSON)
.body("""
{
"projectUuid": "{projectUuid}",
"project.uuid": "{projectUuid}",
"type": "DOMAIN_SETUP",
"caption": "some new domain-setup booking",
"resources": {
@ -375,7 +375,7 @@ class HsBookingItemControllerAcceptanceTest extends ContextBasedTestWithCleanup
},
{
"type": "DOMAIN_HTTP_SETUP",
"assignedToAssetUuid": "{unixUserUuid}"
"assignedToAsset.uuid": "{unixUserUuid}"
},
{
"type": "DOMAIN_MBOX_SETUP"

View File

@ -105,7 +105,7 @@ class HsBookingItemControllerRestTest {
.contentType(MediaType.APPLICATION_JSON)
.content("""
{
"projectUuid": "{projectUuid}",
"project.uuid": "{projectUuid}",
"type": "MANAGED_SERVER",
"caption": "some new booking",
"validTo": "{validTo}",
@ -155,7 +155,7 @@ class HsBookingItemControllerRestTest {
.contentType(MediaType.APPLICATION_JSON)
.content("""
{
"projectUuid": "{projectUuid}",
"project.uuid": "{projectUuid}",
"type": "MANAGED_SERVER",
"caption": "some new booking",
"validFrom": "{validFrom}",

View File

@ -92,7 +92,7 @@ class HsBookingProjectControllerAcceptanceTest extends ContextBasedTestWithClean
.contentType(ContentType.JSON)
.body("""
{
"debitorUuid": "%s",
"debitor.uuid": "%s",
"caption": "some new project"
}
""".formatted(givenDebitor.getUuid()))

View File

@ -165,10 +165,10 @@ class HsHostingAssetControllerAcceptanceTest extends ContextBasedTestWithCleanup
.contentType(ContentType.JSON)
.body("""
{
"bookingItemUuid": "%s",
"bookingItem.uuid": "%s",
"type": "MANAGED_WEBSPACE",
"identifier": "fir10",
"parentAssetUuid": "%s",
"parentAsset.uuid": "%s",
"caption": "some separate ManagedWebspace HA",
"config": {}
}
@ -227,7 +227,7 @@ class HsHostingAssetControllerAcceptanceTest extends ContextBasedTestWithCleanup
.contentType(ContentType.JSON)
.body("""
{
"parentAssetUuid": "%s",
"parentAsset.uuid": "%s",
"type": "UNIX_USER",
"identifier": "fir01-temp",
"caption": "some new UnixUser in client's ManagedWebspace",
@ -280,7 +280,7 @@ class HsHostingAssetControllerAcceptanceTest extends ContextBasedTestWithCleanup
.contentType(ContentType.JSON)
.body("""
{
"bookingItemUuid": "%s",
"bookingItem.uuid": "%s",
"type": "DOMAIN_SETUP",
"identifier": "example.com",
"caption": "some unrelated domain-setup",
@ -326,7 +326,7 @@ class HsHostingAssetControllerAcceptanceTest extends ContextBasedTestWithCleanup
.contentType(ContentType.JSON)
.body("""
{
"bookingItemUuid": "%s",
"bookingItem.uuid": "%s",
"type": "MANAGED_SERVER",
"identifier": "vm1400",
"caption": "some new ManagedServer",
@ -381,7 +381,7 @@ class HsHostingAssetControllerAcceptanceTest extends ContextBasedTestWithCleanup
.contentType(ContentType.JSON)
.body("""
{
"parentAssetUuid": "%s",
"parentAsset.uuid": "%s",
"type": "UNIX_USER",
"identifier": "fir01-extra",
"caption": "some extra UnixUser",
@ -508,7 +508,7 @@ class HsHostingAssetControllerAcceptanceTest extends ContextBasedTestWithCleanup
.contentType(ContentType.JSON)
.body("""
{
"alarmContactUuid": "%s",
"alarmContact.uuid": "%s",
"config": {
"monit_max_ssd_usage": 85,
"monit_max_hdd_usage": null,

View File

@ -83,7 +83,7 @@ class DomainSetupHostingAssetFactoryUnitTest {
"subHostingAssets": [
{
"type": "DOMAIN_HTTP_SETUP",
"assignedToAssetUuid": "{unixUserHostingAssetUuid}"
"assignedToAsset.uuid": "{unixUserHostingAssetUuid}"
},
{
"type": "DOMAIN_DNS_SETUP"
@ -124,7 +124,7 @@ class DomainSetupHostingAssetFactoryUnitTest {
"subHostingAssets": [
{
"type": "DOMAIN_HTTP_SETUP",
"assignedToAssetUuid": "{unixUserHostingAssetUuid}"
"assignedToAsset.uuid": "{unixUserHostingAssetUuid}"
},
{
"type": "DOMAIN_DNS_SETUP"
@ -164,7 +164,7 @@ class DomainSetupHostingAssetFactoryUnitTest {
"subHostingAssets": [
{
"type": "DOMAIN_HTTP_SETUP",
"assignedToAssetUuid": "{unixUserHostingAssetUuid}"
"assignedToAsset.uuid": "{unixUserHostingAssetUuid}"
},
{
"type": "DOMAIN_DNS_SETUP"
@ -206,7 +206,7 @@ class DomainSetupHostingAssetFactoryUnitTest {
"subHostingAssets": [
{
"type": "DOMAIN_HTTP_SETUP",
"assignedToAssetUuid": "{unixUserHostingAssetUuid}"
"assignedToAsset.uuid": "{unixUserHostingAssetUuid}"
},
{
"type": "DOMAIN_DNS_SETUP"

View File

@ -180,7 +180,7 @@ class HsOfficeCoopAssetsTransactionControllerAcceptanceTest extends ContextBased
.contentType(ContentType.JSON)
.body("""
{
"membershipUuid": "%s",
"membership.uuid": "%s",
"transactionType": "DEPOSIT",
"assetValue": 1024.00,
"valueDate": "2022-10-13",
@ -237,13 +237,13 @@ class HsOfficeCoopAssetsTransactionControllerAcceptanceTest extends ContextBased
.contentType(ContentType.JSON)
.body("""
{
"membershipUuid": "%s",
"membership.uuid": "%s",
"transactionType": "ADJUSTMENT",
"assetValue": %s,
"valueDate": "2022-10-30",
"reference": "test ref adjustment",
"comment": "some coop assets adjustment transaction",
"reverseEntryUuid": "%s"
"reverseEntry.uuid": "%s"
}
""".formatted(
givenMembership.getUuid(),
@ -270,7 +270,7 @@ class HsOfficeCoopAssetsTransactionControllerAcceptanceTest extends ContextBased
"reference": "test ref"
}
}
""".formatted(givenTransaction.getUuid())))
"""))
.header("Location", startsWith("http://localhost"))
.extract().header("Location"); // @formatter:on
@ -293,14 +293,14 @@ class HsOfficeCoopAssetsTransactionControllerAcceptanceTest extends ContextBased
.contentType(ContentType.JSON)
.body("""
{
"membershipUuid": "%s",
"membership.uuid": "%s",
"transactionType": "DISBURSAL",
"assetValue": -10240.00,
"valueDate": "2022-10-13",
"reference": "temp ref X",
"comment": "just some test coop assets transaction"
}
""".formatted(givenMembership.getUuid()))
""".formatted(givenMembership.getUuid()))
.port(port)
.when()
.post("http://localhost/api/hs/office/coopassetstransactions")

View File

@ -37,7 +37,7 @@ class HsOfficeCoopAssetsTransactionControllerRestTest {
static final String VALID_INSERT_REQUEST_BODY = """
{
"membershipUuid": "%s",
"membership.uuid": "%s",
"transactionType": "DEPOSIT",
"assetValue": 128.00,
"valueDate": "2022-10-13",
@ -48,8 +48,8 @@ class HsOfficeCoopAssetsTransactionControllerRestTest {
enum BadRequestTestCases {
MEMBERSHIP_UUID_MISSING(
requestBody -> requestBody.without("membershipUuid"),
"[membershipUuid must not be null but is \"null\"]"),
requestBody -> requestBody.without("membership.uuid"),
"[membershipUuid must not be null but is \"null\"]"), // TODO.impl: should be membership.uuid, Spring validation-problem?
TRANSACTION_TYPE_MISSING(
requestBody -> requestBody.without("transactionType"),
@ -121,10 +121,10 @@ class HsOfficeCoopAssetsTransactionControllerRestTest {
.accept(MediaType.APPLICATION_JSON))
// then
.andExpect(status().is4xxClientError())
.andExpect(jsonPath("message", is("ERROR: [400] " + testCase.expectedErrorMessage)))
.andExpect(jsonPath("statusCode", is(400)))
.andExpect(jsonPath("statusPhrase", is("Bad Request")))
.andExpect(jsonPath("message", is("ERROR: [400] " + testCase.expectedErrorMessage)));
.andExpect(status().is4xxClientError());
}
}

View File

@ -168,7 +168,7 @@ class HsOfficeCoopSharesTransactionControllerAcceptanceTest extends ContextBased
final var location = RestAssured // @formatter:off
.given().header("current-subject", "superuser-alex@hostsharing.net").contentType(ContentType.JSON).body("""
{
"membershipUuid": "%s",
"membership.uuid": "%s",
"transactionType": "SUBSCRIPTION",
"shareCount": 8,
"valueDate": "2022-10-13",
@ -214,13 +214,13 @@ class HsOfficeCoopSharesTransactionControllerAcceptanceTest extends ContextBased
.contentType(ContentType.JSON)
.body("""
{
"membershipUuid": "%s",
"membership.uuid": "%s",
"transactionType": "ADJUSTMENT",
"shareCount": %s,
"valueDate": "2022-10-30",
"reference": "test ref adjustment",
"comment": "some coop shares adjustment transaction",
"adjustedShareTxUuid": "%s"
"adjustedShareTx.uuid": "%s"
}
""".formatted(
givenMembership.getUuid(),
@ -267,7 +267,7 @@ class HsOfficeCoopSharesTransactionControllerAcceptanceTest extends ContextBased
RestAssured // @formatter:off
.given().header("current-subject", "superuser-alex@hostsharing.net").contentType(ContentType.JSON).body("""
{
"membershipUuid": "%s",
"membership.uuid": "%s",
"transactionType": "CANCELLATION",
"shareCount": -80,
"valueDate": "2022-10-13",

View File

@ -37,7 +37,7 @@ class HsOfficeCoopSharesTransactionControllerRestTest {
static final String VALID_INSERT_REQUEST_BODY = """
{
"membershipUuid": "%s",
"membership.uuid": "%s",
"transactionType": "SUBSCRIPTION",
"shareCount": 8,
"valueDate": "2022-10-13",
@ -48,7 +48,7 @@ class HsOfficeCoopSharesTransactionControllerRestTest {
enum BadRequestTestCases {
MEMBERSHIP_UUID_MISSING(
requestBody -> requestBody.without("membershipUuid"),
requestBody -> requestBody.without("membership.uuid"),
"[membershipUuid must not be null but is \"null\"]"),
TRANSACTION_TYPE_MISSING(

View File

@ -287,14 +287,14 @@ class HsOfficeDebitorControllerAcceptanceTest extends ContextBasedTestWithCleanu
.contentType(ContentType.JSON)
.body("""
{
"debitorRelUuid": "%s",
"debitorRel.uuid": "%s",
"debitorNumberSuffix": "%s",
"billable": "true",
"vatId": "VAT123456",
"vatCountryCode": "DE",
"vatBusiness": true,
"vatReverseCharge": "false",
"refundBankAccountUuid": "%s",
"refundBankAccount.uuid": "%s",
"defaultPrefix": "for"
}
""".formatted( givenDebitorRelUUid, ++nextDebitorSuffix, givenBankAccount.getUuid()))
@ -333,9 +333,9 @@ class HsOfficeDebitorControllerAcceptanceTest extends ContextBasedTestWithCleanu
.body("""
{
"debitorRel": {
"anchorUuid": "%s",
"holderUuid": "%s",
"contactUuid": "%s"
"anchor.uuid": "%s",
"holder.uuid": "%s",
"contact.uuid": "%s"
},
"debitorNumberSuffix": "%s",
"defaultPrefix": "for",
@ -384,9 +384,9 @@ class HsOfficeDebitorControllerAcceptanceTest extends ContextBasedTestWithCleanu
.body("""
{
"debitorRel": {
"anchorUuid": "%s",
"holderUuid": "%s",
"contactUuid": "%s"
"anchor.uuid": "%s",
"holder.uuid": "%s",
"contact.uuid": "%s"
},
"debitorNumberSuffix": "%s",
"defaultPrefix": "for",
@ -418,7 +418,7 @@ class HsOfficeDebitorControllerAcceptanceTest extends ContextBasedTestWithCleanu
.contentType(ContentType.JSON)
.body("""
{
"debitorRelUuid": "%s",
"debitorRel.uuid": "%s",
"debitorNumberSuffix": "%s",
"defaultPrefix": "for",
"billable": "true",

View File

@ -182,7 +182,7 @@ class HsOfficeMembershipControllerAcceptanceTest extends ContextBasedTestWithCle
.contentType(ContentType.JSON)
.body("""
{
"partnerUuid": "%s",
"partner.uuid": "%s",
"memberNumberSuffix": "%s",
"validFrom": "2022-10-13",
"membershipFeeBillable": "true"

View File

@ -56,12 +56,12 @@ public class HsOfficeMembershipControllerRestTest {
.contentType(MediaType.APPLICATION_JSON)
.content("""
{
"partnerUuid": null,
"partner.uuid": null,
"memberNumberSuffix": "01",
"validFrom": "2022-10-13",
"membershipFeeBillable": "true"
}
""".formatted(UUID.randomUUID()))
""")
.accept(MediaType.APPLICATION_JSON))
// then
@ -86,7 +86,7 @@ public class HsOfficeMembershipControllerRestTest {
.contentType(MediaType.APPLICATION_JSON)
.content("""
{
"partnerUuid": "%s",
"partner.uuid": "%s",
"memberNumberSuffix": "01",
"validFrom": "2022-10-13",
"membershipFeeBillable": "true"
@ -112,7 +112,7 @@ public class HsOfficeMembershipControllerRestTest {
.contentType(MediaType.APPLICATION_JSON)
.content("""
{
"partnerUuid": "%s",
"partner.uuid": "%s",
%s
"validFrom": "2022-10-13",
"membershipFeeBillable": "true"

View File

@ -102,9 +102,9 @@ class HsOfficePartnerControllerAcceptanceTest extends ContextBasedTestWithCleanu
{
"partnerNumber": "20002",
"partnerRel": {
"anchorUuid": "%s",
"holderUuid": "%s",
"contactUuid": "%s"
"anchor.uuid": "%s",
"holder.uuid": "%s",
"contact.uuid": "%s"
},
"details": {
"registrationOffice": "Temp Registergericht Aurich",
@ -161,12 +161,12 @@ class HsOfficePartnerControllerAcceptanceTest extends ContextBasedTestWithCleanu
{
"partnerNumber": "20003",
"partnerRel": {
"anchorUuid": "%s",
"holderUuid": "%s",
"contactUuid": "%s"
"anchor.uuid": "%s",
"holder.uuid": "%s",
"contact.uuid": "%s"
},
"personUuid": "%s",
"contactUuid": "%s",
"person.uuid": "%s",
"contact.uuid": "%s",
"details": {}
}
""".formatted(
@ -199,12 +199,12 @@ class HsOfficePartnerControllerAcceptanceTest extends ContextBasedTestWithCleanu
{
"partnerNumber": "20004",
"partnerRel": {
"anchorUuid": "%s",
"holderUuid": "%s",
"contactUuid": "%s"
"anchor.uuid": "%s",
"holder.uuid": "%s",
"contact.uuid": "%s"
},
"personUuid": "%s",
"contactUuid": "%s",
"person.uuid": "%s",
"contact.uuid": "%s",
"details": {}
}
""".formatted(
@ -321,7 +321,7 @@ class HsOfficePartnerControllerAcceptanceTest extends ContextBasedTestWithCleanu
.body("""
{
"partnerNumber": "20011",
"partnerRelUuid": "%s",
"partnerRel.uuid": "%s",
"details": {
"registrationOffice": "Temp Registergericht Aurich",
"registrationNumber": "222222",
@ -330,7 +330,7 @@ class HsOfficePartnerControllerAcceptanceTest extends ContextBasedTestWithCleanu
"dateOfDeath": "2022-01-12"
}
}
""".formatted(givenPartnerRel.getUuid()))
""".formatted(givenPartnerRel.getUuid()))
.port(port)
.when()
.patch("http://localhost/api/hs/office/partners/" + givenPartner.getUuid())
@ -387,7 +387,7 @@ class HsOfficePartnerControllerAcceptanceTest extends ContextBasedTestWithCleanu
.contentType(ContentType.JSON)
.body("""
{
"partnerRelUuid": "%s"
"partnerRel.uuid": "%s"
}
""".formatted(givenPartnerRel.getUuid()))
.port(port)

View File

@ -101,12 +101,12 @@ class HsOfficePartnerControllerRestTest {
{
"partnerNumber": "20002",
"partnerRel": {
"anchorUuid": "%s",
"holderUuid": "%s",
"contactUuid": "%s"
"anchor.uuid": "%s",
"holder.uuid": "%s",
"contact.uuid": "%s"
},
"personUuid": "%s",
"contactUuid": "%s",
"person.uuid": "%s",
"contact.uuid": "%s",
"details": {
"registrationOffice": "Temp Registergericht Aurich",
"registrationNumber": "111111"
@ -138,12 +138,12 @@ class HsOfficePartnerControllerRestTest {
{
"partnerNumber": "20002",
"partnerRel": {
"anchorUuid": "%s",
"holderUuid": "%s",
"contactUuid": "%s"
"anchor.uuid": "%s",
"holder.uuid": "%s",
"contact.uuid": "%s"
},
"personUuid": "%s",
"contactUuid": "%s",
"person.uuid": "%s",
"contact.uuid": "%s",
"details": {
"registrationOffice": "Temp Registergericht Aurich",
"registrationNumber": "111111"

View File

@ -235,9 +235,9 @@ class HsOfficeRelationControllerAcceptanceTest extends ContextBasedTestWithClean
{
"type": "%s",
"mark": "%s",
"anchorUuid": "%s",
"holderUuid": "%s",
"contactUuid": "%s"
"anchor.uuid": "%s",
"holder.uuid": "%s",
"contact.uuid": "%s"
}
""".formatted(
HsOfficeRelationTypeResource.SUBSCRIBER,
@ -281,9 +281,9 @@ class HsOfficeRelationControllerAcceptanceTest extends ContextBasedTestWithClean
.body("""
{
"type": "%s",
"anchorUuid": "%s",
"holderUuid": "%s",
"contactUuid": "%s"
"anchor.uuid": "%s",
"holder.uuid": "%s",
"contact.uuid": "%s"
}
""".formatted(
HsOfficeRelationTypeResource.DEBITOR,
@ -313,9 +313,9 @@ class HsOfficeRelationControllerAcceptanceTest extends ContextBasedTestWithClean
.body("""
{
"type": "%s",
"anchorUuid": "%s",
"holderUuid": "%s",
"contactUuid": "%s"
"anchor.uuid": "%s",
"holder.uuid": "%s",
"contact.uuid": "%s"
}
""".formatted(
HsOfficeRelationTypeResource.DEBITOR,
@ -346,9 +346,9 @@ class HsOfficeRelationControllerAcceptanceTest extends ContextBasedTestWithClean
.body("""
{
"type": "%s",
"anchorUuid": "%s",
"holderUuid": "%s",
"contactUuid": "%s"
"anchor.uuid": "%s",
"holder.uuid": "%s",
"contact.uuid": "%s"
}
""".formatted(
HsOfficeRelationTypeResource.DEBITOR,
@ -461,9 +461,9 @@ class HsOfficeRelationControllerAcceptanceTest extends ContextBasedTestWithClean
.contentType(ContentType.JSON)
.body("""
{
"contactUuid": "%s"
"contact.uuid": "%s"
}
""".formatted(givenContact.getUuid()))
""".formatted(givenContact.getUuid()))
.port(port)
.when()
.patch("http://localhost/api/hs/office/relations/" + givenRelation.getUuid())

View File

@ -47,7 +47,7 @@ public class ReplaceContactData extends UseCase<ReplaceContactData> {
withTitle("Replace the Contact-Reference in the Partner-Relation", () ->
httpPatch("/api/hs/office/relations/%{partnerRelationUuid}", usingJsonBody("""
{
"contactUuid": ${Contact: %{newContactCaption}}
"contact.uuid": ${Contact: %{newContactCaption}}
}
"""))
.expecting(OK)

View File

@ -55,9 +55,9 @@ public class CreateExternalDebitorForPartner extends UseCase<CreateExternalDebit
return httpPost("/api/hs/office/debitors", usingJsonBody("""
{
"debitorRel": {
"anchorUuid": ${Person: %{partnerPersonTradeName}},
"holderUuid": ${Person: Billing GmbH},
"contactUuid": ${Contact: Billing GmbH - Test AG billing}
"anchor.uuid": ${Person: %{partnerPersonTradeName}},
"holder.uuid": ${Person: Billing GmbH},
"contact.uuid": ${Contact: Billing GmbH - Test AG billing}
},
"debitorNumberSuffix": ${debitorNumberSuffix},
"billable": ${billable},
@ -65,7 +65,7 @@ public class CreateExternalDebitorForPartner extends UseCase<CreateExternalDebit
"vatCountryCode": ${vatCountryCode},
"vatBusiness": ${vatBusiness},
"vatReverseCharge": ${vatReverseCharge},
"refundBankAccountUuid": ${BankAccount: Billing GmbH - refund bank account},
"refundBankAccount.uuid": ${BankAccount: Billing GmbH - refund bank account},
"defaultPrefix": ${defaultPrefix}
}
"""))

View File

@ -48,9 +48,9 @@ public class CreateSelfDebitorForPartner extends UseCase<CreateSelfDebitorForPar
return httpPost("/api/hs/office/debitors", usingJsonBody("""
{
"debitorRel": {
"anchorUuid": ${partnerPersonUuid},
"holderUuid": ${partnerPersonUuid},
"contactUuid": ${Contact: Test AG - billing department}
"anchor.uuid": ${partnerPersonUuid},
"holder.uuid": ${partnerPersonUuid},
"contact.uuid": ${Contact: Test AG - billing department}
},
"debitorNumberSuffix": ${debitorNumberSuffix},
"billable": ${billable},
@ -58,7 +58,7 @@ public class CreateSelfDebitorForPartner extends UseCase<CreateSelfDebitorForPar
"vatCountryCode": ${vatCountryCode},
"vatBusiness": ${vatBusiness},
"vatReverseCharge": ${vatReverseCharge},
"refundBankAccountUuid": ${BankAccount: Test AG - refund bank account},
"refundBankAccount.uuid": ${BankAccount: Test AG - refund bank account},
"defaultPrefix": ${defaultPrefix}
}
"""))

View File

@ -35,8 +35,8 @@ public class CreateSepaMandateForDebitor extends UseCase<CreateSepaMandateForDeb
return httpPost("/api/hs/office/sepamandates", usingJsonBody("""
{
"debitorUuid": ${Debitor: Test AG - main debitor},
"bankAccountUuid": ${BankAccount: Test AG - debit bank account},
"debitor.uuid": ${Debitor: Test AG - main debitor},
"bankAccount.uuid": ${BankAccount: Test AG - debit bank account},
"reference": ${mandateReference},
"agreement": ${mandateAgreement},
"validFrom": ${mandateValidFrom}

View File

@ -18,7 +18,7 @@ public class CreateMembership extends UseCase<CreateMembership> {
protected HttpResponse run() {
return httpPost("/api/hs/office/memberships", usingJsonBody("""
{
"partnerUuid": ${Partner: Test AG},
"partner.uuid": ${Partner: Test AG},
"memberNumberSuffix": ${memberNumberSuffix},
"status": "ACTIVE",
"validFrom": ${validFrom},

View File

@ -57,9 +57,9 @@ public class AddOperationsContactToPartner extends UseCase<AddOperationsContactT
return httpPost("/api/hs/office/relations", usingJsonBody("""
{
"type": "OPERATIONS",
"anchorUuid": ${Person: %{partnerPersonTradeName}},
"holderUuid": ${Person: %{operationsContactGivenName} %{operationsContactFamilyName}},
"contactUuid": ${Contact: %{operationsContactGivenName} %{operationsContactFamilyName}}
"anchor.uuid": ${Person: %{partnerPersonTradeName}},
"holder.uuid": ${Person: %{operationsContactGivenName} %{operationsContactFamilyName}},
"contact.uuid": ${Contact: %{operationsContactGivenName} %{operationsContactFamilyName}}
}
"""))
.expecting(CREATED).expecting(JSON);

View File

@ -60,9 +60,9 @@ public class AddRepresentativeToPartner extends UseCase<AddRepresentativeToPartn
return httpPost("/api/hs/office/relations", usingJsonBody("""
{
"type": "REPRESENTATIVE",
"anchorUuid": ${Person: %{partnerPersonTradeName}},
"holderUuid": ${Person: %{representativeGivenName} %{representativeFamilyName}},
"contactUuid": ${Contact: %{representativeGivenName} %{representativeFamilyName}}
"anchor.uuid": ${Person: %{partnerPersonTradeName}},
"holder.uuid": ${Person: %{representativeGivenName} %{representativeFamilyName}},
"contact.uuid": ${Contact: %{representativeGivenName} %{representativeFamilyName}}
}
"""))
.expecting(CREATED).expecting(JSON);

View File

@ -62,9 +62,9 @@ public class CreatePartner extends UseCase<CreatePartner> {
{
"partnerNumber": ${partnerNumber},
"partnerRel": {
"anchorUuid": ${Person: Hostsharing eG},
"holderUuid": ${Person: %{%{tradeName???}???%{givenName???} %{familyName???}}},
"contactUuid": ${Contact: %{contactCaption}}
"anchor.uuid": ${Person: Hostsharing eG},
"holder.uuid": ${Person: %{%{tradeName???}???%{givenName???} %{familyName???}}},
"contact.uuid": ${Contact: %{contactCaption}}
},
"details": {
"registrationOffice": "Registergericht Hamburg",

View File

@ -52,9 +52,9 @@ public class SubscribeToMailinglist extends UseCase<SubscribeToMailinglist> {
{
"type": "SUBSCRIBER",
"mark": ${mailingList},
"anchorUuid": ${Person: %{partnerPersonTradeName}},
"holderUuid": ${Person: %{subscriberGivenName} %{subscriberFamilyName}},
"contactUuid": ${Contact: %{subscriberGivenName} %{subscriberFamilyName}}
"anchor.uuid": ${Person: %{partnerPersonTradeName}},
"holder.uuid": ${Person: %{subscriberGivenName} %{subscriberFamilyName}},
"contact.uuid": ${Contact: %{subscriberGivenName} %{subscriberFamilyName}}
}
"""))
.expecting(CREATED).expecting(JSON);

View File

@ -144,8 +144,8 @@ class HsOfficeSepaMandateControllerAcceptanceTest extends ContextBasedTestWithCl
.contentType(ContentType.JSON)
.body("""
{
"debitorUuid": "%s",
"bankAccountUuid": "%s",
"debitor.uuid": "%s",
"bankAccount.uuid": "%s",
"reference": "temp ref CAT A",
"agreement": "2020-01-02",
"validFrom": "2022-10-13"
@ -186,7 +186,7 @@ class HsOfficeSepaMandateControllerAcceptanceTest extends ContextBasedTestWithCl
.contentType(ContentType.JSON)
.body("""
{
"bankAccountUuid": "%s",
"bankAccount.uuid": "%s",
"reference": "temp ref CAT B",
"validFrom": "2022-10-13"
}
@ -211,8 +211,8 @@ class HsOfficeSepaMandateControllerAcceptanceTest extends ContextBasedTestWithCl
.contentType(ContentType.JSON)
.body("""
{
"debitorUuid": "%s",
"bankAccountUuid": "%s",
"debitor.uuid": "%s",
"bankAccount.uuid": "%s",
"reference": "temp ref CAT C",
"agreement": "2022-10-12",
"validFrom": "2022-10-13",
@ -241,8 +241,8 @@ class HsOfficeSepaMandateControllerAcceptanceTest extends ContextBasedTestWithCl
.contentType(ContentType.JSON)
.body("""
{
"debitorUuid": "%s",
"bankAccountUuid": "%s",
"debitor.uuid": "%s",
"bankAccount.uuid": "%s",
"reference": "temp refCAT D",
"agreement": "2022-10-12",
"validFrom": "2022-10-13",

View File

@ -388,8 +388,8 @@ class RbacGrantControllerAcceptanceTest extends ContextBasedTest {
.body("""
{
"assumed": true,
"grantedRoleUuid": "%s",
"granteeSubjectUuid": "%s"
"grantedRole.uuid": "%s",
"granteeSubject.uuid": "%s"
}
""".formatted(
grantedRole.getUuid(),
@ -424,8 +424,8 @@ class RbacGrantControllerAcceptanceTest extends ContextBasedTest {
.body("""
{
"assumed": true,
"grantedRoleUuid": "%s",
"granteeSubjectUuid": "%s"
"grantedRole.uuid": "%s",
"granteeSubject.uuid": "%s"
}
""".formatted(
grantedRole.getUuid(),

View File

@ -76,8 +76,8 @@ class RbacRoleControllerRestTest {
.andExpect(jsonPath("$[1].roleName", is("rbactest.customer#xxx:OWNER")))
.andExpect(jsonPath("$[2].roleName", is("rbactest.customer#xxx:ADMIN")))
.andExpect(jsonPath("$[2].uuid", is(customerXxxAdmin.getUuid().toString())))
.andExpect(jsonPath("$[2].objectUuid", is(customerXxxAdmin.getObjectUuid().toString())))
.andExpect(jsonPath("$[2].objectTable", is(customerXxxAdmin.getObjectTable().toString())))
.andExpect(jsonPath("$[2].objectIdName", is(customerXxxAdmin.getObjectIdName().toString())));
.andExpect(jsonPath("$[2].['object.uuid']", is(customerXxxAdmin.getObjectUuid().toString())))
.andExpect(jsonPath("$[2].objectTable", is(customerXxxAdmin.getObjectTable())))
.andExpect(jsonPath("$[2].objectIdName", is(customerXxxAdmin.getObjectIdName())));
}
}