d282885cc9
Co-authored-by: Michael Hoennig <michael@hoennig.de> Reviewed-on: https://dev.hostsharing.net/hostsharing/hs.hsadmin.ng/pulls/208 Reviewed-by: Timotheus Pokorra <timotheus.pokorra@hostsharing.net> Co-authored-by: Michael Hoennig <michael.hoennig@hostsharing.net> Co-committed-by: Michael Hoennig <michael.hoennig@hostsharing.net>
125 lines
4.2 KiB
YAML
125 lines
4.2 KiB
YAML
|
|
components:
|
|
|
|
schemas:
|
|
|
|
CurrentLoginUser:
|
|
type: object
|
|
properties:
|
|
subject:
|
|
$ref: '../rbac/rbac-subject-schemas.yaml#/components/schemas/RbacSubject'
|
|
person:
|
|
$ref: '../hs-office/hs-office-person-schemas.yaml#/components/schemas/HsOfficePerson'
|
|
globalAdmin:
|
|
type: boolean
|
|
|
|
Profile:
|
|
type: object
|
|
properties:
|
|
uuid:
|
|
type: string
|
|
format: uuid
|
|
person:
|
|
$ref: '../hs-office/hs-office-person-schemas.yaml#/components/schemas/HsOfficePerson'
|
|
nickname:
|
|
type: string
|
|
pattern: '^[a-z][a-z0-9]{1,8}-[a-z0-9]{1,10}$' # TODO.spec: pattern for login nickname
|
|
emailAddress:
|
|
type: string
|
|
smsNumber:
|
|
type: string
|
|
totpSecrets:
|
|
type: array
|
|
items:
|
|
type: string
|
|
phonePassword:
|
|
type: string
|
|
active:
|
|
type: boolean
|
|
globalUid:
|
|
type: number
|
|
globalGid:
|
|
type: number
|
|
scopes:
|
|
type: array
|
|
items:
|
|
$ref: 'scope-schemas.yaml#/components/schemas/Scope'
|
|
required:
|
|
- uuid
|
|
- active
|
|
- scopes
|
|
additionalProperties: false
|
|
|
|
ProfilePatch:
|
|
type: object
|
|
properties:
|
|
emailAddress:
|
|
type: string
|
|
nullable: true
|
|
smsNumber:
|
|
type: string
|
|
nullable: true
|
|
totpSecrets:
|
|
type: array
|
|
items:
|
|
type: string
|
|
password:
|
|
type: string
|
|
minLength: 8
|
|
description: plaintext password or valid hash
|
|
phonePassword:
|
|
type: string
|
|
nullable: true
|
|
active:
|
|
type: boolean
|
|
scopes:
|
|
type: array
|
|
items:
|
|
$ref: 'scope-schemas.yaml#/components/schemas/Scope'
|
|
additionalProperties: false
|
|
|
|
ProfileInsert:
|
|
type: object
|
|
properties:
|
|
person.uuid:
|
|
type: string
|
|
format: uuid
|
|
person:
|
|
$ref: '../hs-office/hs-office-person-schemas.yaml#/components/schemas/HsOfficePersonInsert'
|
|
nickname:
|
|
type: string
|
|
pattern: '^[a-z][a-z0-9]{1,8}-[a-z0-9]{1,10}$' # TODO.spec: pattern for login nickname
|
|
emailAddress:
|
|
type: string
|
|
smsNumber:
|
|
type: string
|
|
active:
|
|
type: boolean
|
|
globalUid:
|
|
type: number
|
|
globalGid:
|
|
type: number
|
|
password:
|
|
type: string
|
|
minLength: 8
|
|
description: plaintext password or valid hash
|
|
phonePassword:
|
|
type: string
|
|
totpSecrets:
|
|
type: array
|
|
items:
|
|
type: string
|
|
scopes:
|
|
type: array
|
|
items:
|
|
$ref: 'scope-schemas.yaml#/components/schemas/Scope'
|
|
required:
|
|
- nickname
|
|
- active
|
|
# soon we might need to be able to use this:
|
|
# https://community.smartbear.com/discussions/swaggerostools/defining-conditional-attributes-in-openapi/222410
|
|
# For now we just describe the conditionally required properties:
|
|
description:
|
|
Either `person.uuid` or `person` need to be given.
|
|
additionalProperties: false
|