1
0

list hosting-assets with debitor, parent and type query-parameters (#52)

Co-authored-by: Michael Hoennig <michael@hoennig.de>
Reviewed-on: https://dev.hostsharing.net/hostsharing/hs.hsadmin.ng/pulls/52
Reviewed-by: Timotheus Pokorra <timotheus.pokorra@hostsharing.net>
This commit is contained in:
Michael Hoennig
2024-05-03 10:28:03 +02:00
parent 1201c16094
commit a93c097f64
9 changed files with 127 additions and 33 deletions

View File

@ -1,18 +1,29 @@
get:
summary: Returns a list of all hosting assets for a specified debitor.
description: Returns the list of all hosting assets for a debitor which are visible to the current user or any of it's assumed roles.
summary: Returns a filtered list of all hosting assets.
description: Returns the list of all hosting assets which match the given filters and are visible to the current user or any of it's assumed roles.
tags:
- hs-hosting-assets
operationId: listAssetsByDebitorUuid
operationId: listAssets
parameters:
- $ref: 'auth.yaml#/components/parameters/currentUser'
- $ref: 'auth.yaml#/components/parameters/assumedRoles'
- name: debitorUuid
in: query
required: true
required: false
schema:
type: string
format: uuid
- name: parentAssetUuid
in: query
required: false
schema:
type: string
format: uuid
- name: type
in: query
required: false
schema:
$ref: 'hs-hosting-asset-schemas.yaml#/components/schemas/HsHostingAssetType'
description: The UUID of the debitor, whose hosting assets are to be listed.
responses:
"200":

View File

@ -97,7 +97,7 @@ $$;
create table RbacObject
(
uuid uuid primary key default uuid_generate_v4(),
serialId serial, -- TODO: we might want to remove this once test data deletion works properly
serialId serial, -- TODO.perf: only needed for reverse deletion of temp test data
objectTable varchar(64) not null,
unique (objectTable, uuid)
);