code: def put(self, pk):
          
          item = self.datamodel.get(pk, self._base_filters)
          if not request.is_json:
              return self.response(400, **{"message": "Request is not JSON"})
          if not item:
              return self.response_404()
          try:
              data = self._merge_update_item(item, request.json)
              item = self.edit_model_schema.load(data, instance=item)
          except ValidationError as err:
              return self.response_422(message=err.messages)
          # This validates custom Schema with custom validations
          if isinstance(item.data, dict):
              return self.response_422(message=item.errors)
          self.pre_update(item.data)
          try:
              self.datamodel.edit(item.data, raise_exception=True)
              self.post_update(item)
              return self.response(
                  200,
                  **{
                      API_RESULT_RES_KEY: self.edit_model_schema.dump(
                          item.data, many=False
                      ).data
                  }
              )
          except IntegrityError as e:
              return self.response_422(message=str(e.orig))
docs: POST item to Model
          ---
          put:
            parameters:
            - in: path
              schema:
                type: integer
              name: pk
            requestBody:
              description: Model schema
              required: true
              content:
                application/json:
                  schema:
                    $ref: '#/components/schemas/{{self.__class__.__name__}}.put'
            responses:
              200:
                description: Item changed
                content:
                  application/json:
                    schema:
                      type: object
                      properties:
                        result:
                          $ref: '#/components/schemas/{{self.__class__.__name__}}.put'
              400:
                $ref: '#/components/responses/400'
              401:
                $ref: '#/components/responses/401'
              404:
                $ref: '#/components/responses/404'
              422:
                $ref: '#/components/responses/422'
              500:
                $ref: '#/components/responses/500'