major(fullstack): Add dynamic section spawning, removal of app. form create DTOs,
This commit is contained in:
@@ -46,7 +46,7 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/CreateApplicationFormDto"
|
||||
$ref: "#/components/schemas/ApplicationFormDto"
|
||||
responses:
|
||||
"201":
|
||||
description: Successfully created application form
|
||||
@@ -256,7 +256,7 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/CreateFormElementDto"
|
||||
$ref: "#/components/schemas/FormElementDto"
|
||||
responses:
|
||||
"201":
|
||||
description: Form element successfully added
|
||||
@@ -406,7 +406,7 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/CreateApplicationFormDto"
|
||||
$ref: "#/components/schemas/ApplicationFormDto"
|
||||
responses:
|
||||
"201":
|
||||
description: Successfully created application form template
|
||||
@@ -1088,63 +1088,44 @@ components:
|
||||
ApplicationFormDto:
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
- name
|
||||
- formElementSections
|
||||
- isTemplate
|
||||
- organizationId
|
||||
- createdBy
|
||||
- lastModifiedBy
|
||||
- createdAt
|
||||
- modifiedAt
|
||||
- status
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
format: uuid
|
||||
nullable: true
|
||||
name:
|
||||
type: string
|
||||
formElementSections:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/FormElementSectionDto"
|
||||
isTemplate:
|
||||
type: boolean
|
||||
organizationId:
|
||||
type: string
|
||||
createdBy:
|
||||
$ref: "#/components/schemas/UserDto"
|
||||
lastModifiedBy:
|
||||
$ref: "#/components/schemas/UserDto"
|
||||
createdAt:
|
||||
type: string
|
||||
format: date-time
|
||||
modifiedAt:
|
||||
type: string
|
||||
format: date-time
|
||||
status:
|
||||
$ref: "#/components/schemas/ApplicationFormStatus"
|
||||
|
||||
CreateApplicationFormDto:
|
||||
required:
|
||||
- name
|
||||
- formElementSections
|
||||
- isTemplate
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
formElementSections:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/CreateFormElementSectionDto"
|
||||
isTemplate:
|
||||
type: boolean
|
||||
default: false
|
||||
organizationId:
|
||||
type: string
|
||||
nullable: true
|
||||
createdBy:
|
||||
$ref: "#/components/schemas/UserDto"
|
||||
nullable: true
|
||||
lastModifiedBy:
|
||||
$ref: "#/components/schemas/UserDto"
|
||||
nullable: true
|
||||
createdAt:
|
||||
type: string
|
||||
format: date-time
|
||||
nullable: true
|
||||
modifiedAt:
|
||||
type: string
|
||||
format: date-time
|
||||
nullable: true
|
||||
status:
|
||||
$ref: "#/components/schemas/ApplicationFormStatus"
|
||||
allOf:
|
||||
- $ref: "#/components/schemas/ApplicationFormStatus"
|
||||
nullable: true
|
||||
|
||||
PagedApplicationFormDto:
|
||||
type: object
|
||||
@@ -1249,14 +1230,13 @@ components:
|
||||
FormElementSectionDto:
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
- title
|
||||
- formElementSubSections
|
||||
- applicationFormId
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
format: uuid
|
||||
nullable: true
|
||||
title:
|
||||
type: string
|
||||
shortTitle:
|
||||
@@ -1270,6 +1250,20 @@ components:
|
||||
applicationFormId:
|
||||
type: string
|
||||
format: uuid
|
||||
nullable: true
|
||||
isTemplate:
|
||||
type: boolean
|
||||
default: false
|
||||
description: If true, this section is a template for spawning
|
||||
templateReference:
|
||||
type: string
|
||||
description: Unique reference key for this template section
|
||||
titleTemplate:
|
||||
type: string
|
||||
description: Title template with placeholder (e.g., "Modul{{triggerValue}}")
|
||||
spawnedFromElementReference:
|
||||
type: string
|
||||
description: Reference of the form element that triggered this section
|
||||
|
||||
FormElementSectionSnapshotDto:
|
||||
type: object
|
||||
@@ -1287,38 +1281,26 @@ components:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/FormElementSubSectionSnapshotDto"
|
||||
|
||||
CreateFormElementSectionDto:
|
||||
type: object
|
||||
required:
|
||||
- title
|
||||
- formElementSubSections
|
||||
properties:
|
||||
id:
|
||||
isTemplate:
|
||||
type: boolean
|
||||
default: false
|
||||
templateReference:
|
||||
type: string
|
||||
format: uuid
|
||||
title:
|
||||
titleTemplate:
|
||||
type: string
|
||||
shortTitle:
|
||||
spawnedFromElementReference:
|
||||
type: string
|
||||
description:
|
||||
type: string
|
||||
formElementSubSections:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/CreateFormElementSubSectionDto"
|
||||
|
||||
FormElementSubSectionDto:
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
- title
|
||||
- formElements
|
||||
- formElementSectionId
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
format: uuid
|
||||
nullable: true
|
||||
title:
|
||||
type: string
|
||||
subtitle:
|
||||
@@ -1330,6 +1312,7 @@ components:
|
||||
formElementSectionId:
|
||||
type: string
|
||||
format: uuid
|
||||
nullable: true
|
||||
|
||||
FormElementSubSectionSnapshotDto:
|
||||
type: object
|
||||
@@ -1346,32 +1329,16 @@ components:
|
||||
items:
|
||||
$ref: "#/components/schemas/FormElementSnapshotDto"
|
||||
|
||||
CreateFormElementSubSectionDto:
|
||||
type: object
|
||||
required:
|
||||
- title
|
||||
- formElements
|
||||
properties:
|
||||
title:
|
||||
type: string
|
||||
subtitle:
|
||||
type: string
|
||||
formElements:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/CreateFormElementDto"
|
||||
|
||||
FormElementDto:
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
- options
|
||||
- type
|
||||
- formElementSubSectionId
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
format: uuid
|
||||
nullable: true
|
||||
reference:
|
||||
type: string
|
||||
description: Unique reference key for this form element (e.g., "art_der_massnahme")
|
||||
@@ -1388,8 +1355,15 @@ components:
|
||||
formElementSubSectionId:
|
||||
type: string
|
||||
format: uuid
|
||||
nullable: true
|
||||
visibilityCondition:
|
||||
$ref: "#/components/schemas/FormElementVisibilityCondition"
|
||||
sectionSpawnTrigger:
|
||||
$ref: "#/components/schemas/SectionSpawnTriggerDto"
|
||||
isClonable:
|
||||
type: boolean
|
||||
default: false
|
||||
description: If true, user can add more instances of this element
|
||||
|
||||
FormElementSnapshotDto:
|
||||
type: object
|
||||
@@ -1411,27 +1385,11 @@ components:
|
||||
$ref: "#/components/schemas/FormOptionDto"
|
||||
visibilityCondition:
|
||||
$ref: "#/components/schemas/FormElementVisibilityCondition"
|
||||
|
||||
CreateFormElementDto:
|
||||
type: object
|
||||
required:
|
||||
- options
|
||||
- type
|
||||
properties:
|
||||
reference:
|
||||
type: string
|
||||
title:
|
||||
type: string
|
||||
description:
|
||||
type: string
|
||||
options:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/FormOptionDto"
|
||||
type:
|
||||
$ref: "#/components/schemas/FormElementType"
|
||||
visibilityCondition:
|
||||
$ref: "#/components/schemas/FormElementVisibilityCondition"
|
||||
sectionSpawnTrigger:
|
||||
$ref: "#/components/schemas/SectionSpawnTriggerDto"
|
||||
isClonable:
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
FormOptionDto:
|
||||
type: object
|
||||
@@ -1465,19 +1423,19 @@ components:
|
||||
FormElementVisibilityCondition:
|
||||
type: object
|
||||
required:
|
||||
- conditionType
|
||||
- formElementConditionType
|
||||
- sourceFormElementReference
|
||||
- expectedValue
|
||||
- formElementExpectedValue
|
||||
properties:
|
||||
conditionType:
|
||||
formElementConditionType:
|
||||
$ref: "#/components/schemas/VisibilityConditionType"
|
||||
sourceFormElementReference:
|
||||
type: string
|
||||
description: Reference key of the source form element to check
|
||||
expectedValue:
|
||||
formElementExpectedValue:
|
||||
type: string
|
||||
description: Expected value to compare against the source element's value property
|
||||
operator:
|
||||
formElementOperator:
|
||||
$ref: "#/components/schemas/VisibilityConditionOperator"
|
||||
default: EQUALS
|
||||
|
||||
@@ -1495,6 +1453,24 @@ components:
|
||||
- IS_EMPTY
|
||||
- IS_NOT_EMPTY
|
||||
|
||||
SectionSpawnTriggerDto:
|
||||
type: object
|
||||
required:
|
||||
- templateReference
|
||||
- sectionSpawnConditionType
|
||||
- sectionSpawnOperator
|
||||
properties:
|
||||
templateReference:
|
||||
type: string
|
||||
description: Reference key of the section template to spawn
|
||||
sectionSpawnConditionType:
|
||||
$ref: "#/components/schemas/VisibilityConditionType"
|
||||
sectionSpawnExpectedValue:
|
||||
type: string
|
||||
description: Expected value to trigger spawning
|
||||
sectionSpawnOperator:
|
||||
$ref: "#/components/schemas/VisibilityConditionOperator"
|
||||
|
||||
####### UserDto #######
|
||||
UserDto:
|
||||
type: object
|
||||
|
||||
Reference in New Issue
Block a user