@api.post("{{ path }}", status_code=201, response_model={{ model_name }}CreateOneResponseModel)
{{ 'async ' if is_async else '' }}def insert_one(response: Response,
                           request_body=Depends({{ model_name }}CreateOneRequestBodyModel),
                           session=Depends(db_session)):
    insert_arg_dict: Union[list, dict] = request_body.__dict__
    if not isinstance(insert_arg_dict, list):
        insert_arg_dict = [insert_arg_dict]
    model = {{ model_name }}
    insert_arg_dict: list[dict] = [clean_input_fields(model=model, param=insert_arg)
                                   for insert_arg in insert_arg_dict]
    new_inserted_data = []
    if isinstance(insert_arg_dict, list):
        for i in insert_arg_dict:
            new_inserted_data.append(model(**i))
    session.add_all(new_inserted_data)
    try:
        {{ 'await ' if is_async else '' }}session.flush()
    except IntegrityError as e:
        err_msg, = e.orig.args
        if 'unique constraint' not in err_msg.lower():
            raise e
        result = Response(status_code=HTTPStatus.CONFLICT, headers={"x-total-count": str(0)})
        return result
    inserted_data, = new_inserted_data
    result = parse_obj_as({{ model_name }}CreateOneResponseModel, inserted_data)
    response.headers["x-total-count"] = str(1)
    return result
