parameters: (self, **kwargs)
return_statement: return self._envelope_list(self._dump(objects, kwargs, many=True),
                                     pagination_metadata)
docstring: ---
            tags: [{tag_name}]
            summary: "Get a list of {class_model}."
            responses:
              200:
                description: Ok
                content:
                  application/json:
                    schema: {schema_class}
docstring_summary: ---
            tags: [{tag_name}]
            summary: "Get a list of {class_model}."
            responses:
              200:
                description: Ok
                content:
                  application/json:
                    schema: {schema_class}
docstring_tokens: --- tags : [ { tag_name } ] summary : Get a list of { class_model } . responses : 200 : description : Ok content : application / json : schema : { schema_class }
function: def index(self, **kwargs):
          """
            ---
            tags: [{tag_name}]
            summary: "Get a list of {class_model}."
            responses:
              200:
                description: Ok
                content:
                  application/json:
                    schema: {schema_class}
          """
          query = self._filter_query(self._get_eagerloaded_query(**kwargs))
          order_field = self._get_order_field(**kwargs)
          if order_field is not None:
              if isinstance(order_field, tuple):
                  query = query.order_by(*order_field)
              else:
                  query = query.order_by(order_field)
  
          objects, pagination_metadata = self._paginate(query)
          return self._envelope_list(self._dump(objects, kwargs, many=True),
                                     pagination_metadata)
function_tokens: def index ( self , * * kwargs ) : query = self . _filter_query ( self . _get_eagerloaded_query ( * * kwargs ) ) order_field = self . _get_order_field ( * * kwargs ) if order_field is not None : if isinstance ( order_field , tuple ) : query = query . order_by ( * order_field ) else : query = query . order_by ( order_field ) objects , pagination_metadata = self . _paginate ( query ) return self . _envelope_list ( self . _dump ( objects , kwargs , many = True ) , pagination_metadata )