create partner now taking existing contact+person uuids instead of complete (new) objects
This commit is contained in:
@ -32,7 +32,7 @@ components:
|
||||
$ref: './hs-office-contact-schemas.yaml#/components/schemas/HsOfficeContact'
|
||||
- $ref: '#/components/schemas/HsOfficePartnerBase'
|
||||
|
||||
HsOfficePartnerUpdate:
|
||||
HsOfficePartnerPatch:
|
||||
allOf:
|
||||
- type: object
|
||||
properties:
|
||||
@ -43,3 +43,18 @@ components:
|
||||
type: string
|
||||
format: uuid
|
||||
- $ref: '#/components/schemas/HsOfficePartnerBase'
|
||||
|
||||
HsOfficePartnerInsert:
|
||||
allOf:
|
||||
- type: object
|
||||
properties:
|
||||
personUuid:
|
||||
type: string
|
||||
format: uuid
|
||||
contactUuid:
|
||||
type: string
|
||||
format: uuid
|
||||
- required:
|
||||
- personUuid
|
||||
- contactUuid
|
||||
- $ref: '#/components/schemas/HsOfficePartnerBase'
|
||||
|
@ -42,7 +42,7 @@ patch:
|
||||
content:
|
||||
'application/json':
|
||||
schema:
|
||||
$ref: './hs-office-partner-schemas.yaml#/components/schemas/HsOfficePartnerUpdate'
|
||||
$ref: './hs-office-partner-schemas.yaml#/components/schemas/HsOfficePartnerPatch'
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
|
@ -39,7 +39,7 @@ post:
|
||||
content:
|
||||
'application/json':
|
||||
schema:
|
||||
$ref: './hs-office-partner-schemas.yaml#/components/schemas/HsOfficePartner'
|
||||
$ref: './hs-office-partner-schemas.yaml#/components/schemas/HsOfficePartnerInsert'
|
||||
required: true
|
||||
responses:
|
||||
"201":
|
||||
|
@ -156,7 +156,7 @@ grant all privileges on hs_office_contact_rv to restricted;
|
||||
/**
|
||||
Instead of insert trigger function for hs_office_contact_rv.
|
||||
*/
|
||||
create or replace function inserthsOfficeContact()
|
||||
create or replace function insertHsOfficeContact()
|
||||
returns trigger
|
||||
language plpgsql as $$
|
||||
declare
|
||||
@ -173,11 +173,11 @@ $$;
|
||||
/*
|
||||
Creates an instead of insert trigger for the hs_office_contact_rv view.
|
||||
*/
|
||||
create trigger inserthsOfficeContact_Trigger
|
||||
create trigger insertHsOfficeContact_Trigger
|
||||
instead of insert
|
||||
on hs_office_contact_rv
|
||||
for each row
|
||||
execute function inserthsOfficeContact();
|
||||
execute function insertHsOfficeContact();
|
||||
--//
|
||||
|
||||
-- ============================================================================
|
||||
@ -189,7 +189,7 @@ execute function inserthsOfficeContact();
|
||||
|
||||
Checks if the current subject (user / assumed role) has the permission to delete the row.
|
||||
*/
|
||||
create or replace function deletehsOfficeContact()
|
||||
create or replace function deleteHsOfficeContact()
|
||||
returns trigger
|
||||
language plpgsql as $$
|
||||
begin
|
||||
@ -204,11 +204,11 @@ end; $$;
|
||||
/*
|
||||
Creates an instead of delete trigger for the hs_office_contact_rv view.
|
||||
*/
|
||||
create trigger deletehsOfficeContact_Trigger
|
||||
create trigger deleteHsOfficeContact_Trigger
|
||||
instead of delete
|
||||
on hs_office_contact_rv
|
||||
for each row
|
||||
execute function deletehsOfficeContact();
|
||||
execute function deleteHsOfficeContact();
|
||||
--/
|
||||
|
||||
-- ============================================================================
|
||||
|
Reference in New Issue
Block a user