@expose("<STR_LIT>", methods=["<STR_LIT:GET>"])<EOL><INDENT>@protect()<EOL>@safe<EOL>@permission_name("<STR_LIT>")<EOL>@rison(get_item_schema)<EOL>@merge_response_func(merge_label_columns, API_LABEL_COLUMNS_RIS_KEY)<EOL>@merge_response_func(merge_show_columns, API_SHOW_COLUMNS_RIS_KEY)<EOL>@merge_response_func(merge_description_columns, API_DESCRIPTION_COLUMNS_RIS_KEY)<EOL>@merge_response_func(merge_show_title, API_SHOW_TITLE_RIS_KEY)<EOL>def get(self, pk, **kwargs):<DEDENT>
item = self.datamodel.get(pk, self._base_filters)<EOL>if not item:<EOL><INDENT>return self.response_404()<EOL><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.show_columns]<EOL>self.set_response_key_mappings(<EOL>_response,<EOL>self.get,<EOL>_args,<EOL>**{API_SELECT_COLUMNS_RIS_KEY: _pruned_select_cols}<EOL>)<EOL>if _pruned_select_cols:<EOL><INDENT>_show_model_schema = self.model2schemaconverter.convert(_pruned_select_cols)<EOL><DEDENT>else:<EOL><INDENT>_show_model_schema = self.show_model_schema<EOL><DEDENT>_response["<STR_LIT:id>"] = pk<EOL>_response[API_RESULT_RES_KEY] = _show_model_schema.dump(item, many=False).data<EOL>self.pre_get(_response)<EOL>return self.response(<NUM_LIT:200>, **_response)<EOL>
Get item from Model
        ---
        get:
          parameters:
          - in: path
            schema:
              type: integer
            name: pk
          - $ref: '#/components/parameters/get_item_schema'
          responses:
            200:
              description: Item from Model
              content:
                application/json:
                  schema:
                    type: object
                    properties:
                      label_columns:
                        type: object
                      show_columns:
                        type: array
                        items:
                          type: string
                      description_columns:
                        type: object
                      show_title:
                        type: string
                      id:
                        type: string
                      result:
                        $ref: '#/components/schemas/{{self.__class__.__name__}}.get'
            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'