@expose("<STR_LIT:/>", methods=["<STR_LIT:GET>"])<EOL><INDENT>@protect()<EOL>@safe<EOL>@permission_name("<STR_LIT>")<EOL>@rison(get_list_schema)<EOL>@merge_response_func(merge_order_columns, API_ORDER_COLUMNS_RIS_KEY)<EOL>@merge_response_func(merge_label_columns, API_LABEL_COLUMNS_RIS_KEY)<EOL>@merge_response_func(merge_description_columns, API_DESCRIPTION_COLUMNS_RIS_KEY)<EOL>@merge_response_func(merge_list_columns, API_LIST_COLUMNS_RIS_KEY)<EOL>@merge_response_func(merge_list_title, API_LIST_TITLE_RIS_KEY)<EOL>def get_list(self, **kwargs):<DEDENT>
_response = dict()<EOL>_args = kwargs.get("<STR_LIT>", {})<EOL>select_cols = _args.get(API_SELECT_COLUMNS_RIS_KEY, [])<EOL>_pruned_select_cols = [col for col in select_cols if col in self.list_columns]<EOL>self.set_response_key_mappings(<EOL>_response,<EOL>self.get_list,<EOL>_args,<EOL>**{API_SELECT_COLUMNS_RIS_KEY: _pruned_select_cols}<EOL>)<EOL>if _pruned_select_cols:<EOL><INDENT>_list_model_schema = self.model2schemaconverter.convert(_pruned_select_cols)<EOL><DEDENT>else:<EOL><INDENT>_list_model_schema = self.list_model_schema<EOL><DEDENT>joined_filters = self._handle_filters_args(_args)<EOL>order_column, order_direction = self._handle_order_args(_args)<EOL>page_index, page_size = self._handle_page_args(_args)<EOL>query_select_columns = _pruned_select_cols or self.list_columns<EOL>count, lst = self.datamodel.query(<EOL>joined_filters,<EOL>order_column,<EOL>order_direction,<EOL>page=page_index,<EOL>page_size=page_size,<EOL>select_columns=query_select_columns,<EOL>)<EOL>pks = self.datamodel.get_keys(lst)<EOL>_response[API_RESULT_RES_KEY] = _list_model_schema.dump(lst, many=True).data<EOL>_response["<STR_LIT>"] = pks<EOL>_response["<STR_LIT:count>"] = count<EOL>self.pre_get_list(_response)<EOL>return self.response(<NUM_LIT:200>, **_response)<EOL>
Get list of items from Model
        ---
        get:
          parameters:
          - $ref: '#/components/parameters/get_list_schema'
          responses:
            200:
              description: Items from Model
              content:
                application/json:
                  schema:
                    type: object
                    properties:
                      label_columns:
                        type: object
                      list_columns:
                        type: array
                        items:
                          type: string
                      description_columns:
                        type: object
                      list_title:
                        type: string
                      ids:
                        type: array
                        items:
                          type: string
                      order_columns:
                        type: array
                        items:
                          type: string
                      result:
                          type: array
                          items:
                            $ref: '#/components/schemas/{{self.__class__.__name__}}.get_list'  # noqa
            400:
              $ref: '#/components/responses/400'
            401:
              $ref: '#/components/responses/401'
            422:
              $ref: '#/components/responses/422'
            500:
              $ref: '#/components/responses/500'