operationId: updateFormTemplate
summary: Update form template
tags:
  -  form template
parameters:
  - $ref: ../../components/header-parameters/tenant-subdomain.yml
requestBody:
  content:
    application/json:
      schema:
        type: object
        properties:
          fields:
            type: array
            items:
              type: object
              properties:
                id:
                  type: string
                label:
                  type: string
                placeholder:
                  type: string
                isRequired:
                  type: boolean
                isDefault:
                  type: boolean
                span:
                  type: number
                  default: 24
                order:
                  type: number
                type:
                  type: string
                  enum: ['text', 'textArea', 'number', 'date']
              required:
                - label
                - placeholder
                - isRequired
                - isDefault
                - span
                - order
                - type
        required:
          - fields

responses:
  201:
    description: Success
    content:
      application/json:
        schema:
          allOf:
            - $ref: ../../components/schemas/entities/form-template/properties.yml
  400:
    $ref: ../../components/responses/400-bad-request.yml
