Skip to content

Commit

Permalink
refactor: ConditionalSettings reference
Browse files Browse the repository at this point in the history
  • Loading branch information
pvaneveld committed Jun 21, 2024
1 parent 6634895 commit f12db10
Show file tree
Hide file tree
Showing 3 changed files with 147 additions and 139 deletions.
100 changes: 51 additions & 49 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1502,6 +1502,56 @@ components:
description: The numeric id of the original space
required:
- space
ConditionalSettings:
type: object
properties:
modifications:
type: array
description: List of modifications to be applied to the field. Only 1 modification can be applied at a time (hide OR required)
items:
type: object
properties:
display:
type: string
enum:
- hide
required:
type: boolean
rule_match:
description: Define if all or any of the conditions should be met to apply the modifications
type: string
enum:
- any
- all
rule_conditions:
description: Conditional rules to be applied to the field
type: array
items:
type: object
properties:
validated_object:
type: object
properties:
type:
type: string
enum:
- field
field_key:
type: string
field_attr:
type: string
enum:
- value
validation:
type: string
enum:
- empty
- not_empty
- equals
- not_equals
value:
type: string
nullable: true
FieldOption:
type: object
properties:
Expand Down Expand Up @@ -1547,55 +1597,7 @@ components:
type: array
description: Array containing the object with information about conditions set on the field
items:
type: object
properties:
modifications:
type: array
description: List of modifications to be applied to the field. Only 1 modification can be applied at a time (hide OR required)
items:
type: object
properties:
display:
type: string
enum:
- hide
required:
type: boolean
rule_match:
description: Define if all or any of the conditions should be met to apply the modifications
type: string
enum:
- any
- all
rule_conditions:
description: Conditional rules to be applied to the field
type: array
items:
type: object
properties:
validated_object:
type: object
properties:
type:
type: string
enum:
- field
field_key:
type: string
field_attr:
type: string
enum:
- value
validation:
type: string
enum:
- empty
- not_empty
- equals
- not_equals
value:
type: string
nullable: true
$ref: '#/components/schemas/ConditionalSettings'
customize_toolbar:
type: boolean
description: Customize toolbar in richtext or markdown
Expand Down
103 changes: 53 additions & 50 deletions sbmgmt/main.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

83 changes: 43 additions & 40 deletions schemas/components.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -168,46 +168,7 @@ FieldInput:
type: array
description: "Array containing the object with information about conditions set on the field"
items:
type: object
properties:
modifications:
type: array
description: "List of modifications to be applied to the field. Only 1 modification can be applied at a time (hide OR required)"
items:
type: object
properties:
display:
type: string
enum: [hide]
required:
type: boolean
rule_match:
description: "Define if all or any of the conditions should be met to apply the modifications"
type: string
enum: [any, all]
rule_conditions:
description: "Conditional rules to be applied to the field"
type: array
items:
type: object
properties:
validated_object:
type: object
properties:
type:
type: string
enum: [field]
field_key:
type: string
field_attr:
type: string
enum: [value]
validation:
type: string
enum: [empty, not_empty, equals, not_equals]
value:
type: string
nullable: true
$ref: "#/ConditionalSettings"
customize_toolbar:
type: boolean
description: "Customize toolbar in richtext or markdown"
Expand Down Expand Up @@ -363,3 +324,45 @@ FieldOption:
required:
- name
- value

ConditionalSettings:
type: object
properties:
modifications:
type: array
description: "List of modifications to be applied to the field. Only 1 modification can be applied at a time (hide OR required)"
items:
type: object
properties:
display:
type: string
enum: [hide]
required:
type: boolean
rule_match:
description: "Define if all or any of the conditions should be met to apply the modifications"
type: string
enum: [any, all]
rule_conditions:
description: "Conditional rules to be applied to the field"
type: array
items:
type: object
properties:
validated_object:
type: object
properties:
type:
type: string
enum: [field]
field_key:
type: string
field_attr:
type: string
enum: [value]
validation:
type: string
enum: [empty, not_empty, equals, not_equals]
value:
type: string
nullable: true

0 comments on commit f12db10

Please sign in to comment.