add missing debitorNumberPrefix to OpenAPI - not patchable, though

This commit is contained in:
Michael Hoennig 2024-01-19 14:09:23 +01:00
parent d4785b472c
commit 06a39c421e
3 changed files with 16 additions and 0 deletions

View File

@ -9,6 +9,11 @@ components:
uuid:
type: string
format: uuid
debitorNumberPrefix:
type: integer
format: int8
minimum: 10000
maximum: 99999
person:
$ref: './hs-office-person-schemas.yaml#/components/schemas/HsOfficePerson'
contact:
@ -86,6 +91,11 @@ components:
HsOfficePartnerInsert:
type: object
properties:
debitorNumberPrefix:
type: integer
format: int8
minimum: 10000
maximum: 99999
personUuid:
type: string
format: uuid
@ -95,6 +105,7 @@ components:
details:
$ref: '#/components/schemas/HsOfficePartnerDetailsInsert'
required:
- debitorNumberPrefix
- personUuid
- contactUuid
- details

View File

@ -180,6 +180,7 @@ call generateRbacIdentityView('hs_office_partner', $idName$
call generateRbacRestrictedView('hs_office_partner',
'(select idName from hs_office_person_iv p where p.uuid = target.personUuid)',
$updates$
debitorNumberPrefix = new.debitorNumberPrefix,
personUuid = new.personUuid,
contactUuid = new.contactUuid
$updates$);

View File

@ -125,6 +125,7 @@ class HsOfficePartnerControllerAcceptanceTest {
.contentType(ContentType.JSON)
.body("""
{
"debitorNumberPrefix": "12345",
"contactUuid": "%s",
"personUuid": "%s",
"details": {
@ -166,6 +167,7 @@ class HsOfficePartnerControllerAcceptanceTest {
.contentType(ContentType.JSON)
.body("""
{
"debitorNumberPrefix": "12345",
"contactUuid": "%s",
"personUuid": "%s",
"details": {}
@ -193,6 +195,7 @@ class HsOfficePartnerControllerAcceptanceTest {
.contentType(ContentType.JSON)
.body("""
{
"debitorNumberPrefix": "12345",
"contactUuid": "%s",
"personUuid": "%s",
"details": {}
@ -294,6 +297,7 @@ class HsOfficePartnerControllerAcceptanceTest {
.contentType(ContentType.JSON)
.body("""
{
"debitorNumerPrefix": "12345",
"contactUuid": "%s",
"personUuid": "%s",
"details": {