ganechi
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Backlogシステム仕様書 > コーディングを行う単位となる個々のプログラム・モジュールの仕様を詳細に記述する > ここの「関数・クラスの各メソッドのインターフェース・機能」に記載した関数・メソッド以外は実装しては **いけない** > 実際のコーディングの粒度で設計を行う :::info BacklogのWikiに変更を反映させてください! ::: [TOC] # 1. ディレクトリ構造 ## 1-1. Backlog 既存のコードに修正・新規作成する部分を明記 ``` Backlog ├─ backlog_api │ ├─ __init__.py │ ├─ backlog_api.py : BacklogAPIを呼び出す実体,各HTTPリクエスト処理 │ ├─ exceptions.py : エラーレスポンスの一覧 │ ├─ git_repositories.py : GitリポジトリのAPI │ ├─ pull_request.py : プルリクエストのAPI │ ├─ space.py : スペースのAPI │ ├─ project.py (修正) : プロジェクトのAPI │ ├─ shared_files.py (修正) : 共有ファイルのAPI │ ├─ team.py (新規) : チームのAPI │ ├─ user.py (新規) : ユーザのAPI │ ├─ wiki.py (新規) : WikiのAPI │ ├─ issue.py (新規) : 課題のAPI │ └─ utils │ ├─ __init__.py │ ├─ download_file.py : requests.Responseからファイルをダウンロード │ ├─ check_type.py : 型判定エラー (List or Turple でない) │ ├─ read_file_or_str.py : 型判定エラー (File or Str でない) │ └─ urljoin.py : ├─ test │ ├─ __init__.py │ ├─ test_backlog_api.py : backlog_api.pyのテスト │ ├─ test_git_repositories.py : GitリポジトリのAPIのテスト │ ├─ test_pull_request.py : プルリクエストのAPIのテスト │ ├─ test_space.py : スペースのAPIのテスト │ ├─ test_project.py (修正) : プロジェクトのAPIのテスト │ ├─ test_shared_files.py (修正) : 共有ファイルのAPIのテスト │ ├─ test_team.py (新規) : チームのAPIのテスト │ ├─ test_user.py (新規) : ユーザのAPIのテスト │ ├─ test_wiki.py (新規) : WikiのAPIのテスト │ ├─ test_issue.py (新規) : 課題のAPIのテスト │ ├─ test_utils │ │ ├─ __init__.py │ │ ├─ test_check_type.py : check_type.pyのテスト │ │ ├─ test_read_file_or_str.py : read_file_or_str.pyのテスト │ │ └─ test_urljoin.py : urljoin.pyのテスト │ ├─ utils │ │ ├─ __init__.py │ │ ├─ get_config_path.py │ │ └─ get_repositories_name.py │ ├─ sample_backlog_api │ │ ├─ unittest_backlog_api_a.csv │ │ └─ unittest_backlog_api_b.csv │ └─ sample_read_file_or_str │ ├─ a.txt │ └─ b.txt ├─ .flake8 ├─ .gitignore ├─ .mypy.ini ├─ README.md ├─ requirements.tst └─ test.sh ``` ## 1-2. Module-Backlog ITチームで新規実装、Backlogリポジトリをサブモジュールとして読み込み ``` Module-Backlog ├─ Backlog (submodule,上記参照) ├─ config │ ├─ __init__.py │ ├─ asgi.py : │ ├─ settings.py : 全体の設定 │ ├─ urls.py : 全体のルーティング定義 │ └─ wsgi.py : デプロイ用ファイル ├─ users │ ├─ __init__.py │ ├─ apps.py : 構成設定 │ ├─ serializers.py : シリアライザ定義、viewのクエリをpythonのデータ型に変換、バリデーション │ ├─ urls.py : ルーティング定義、 │ └─ views.py : ビュー定義、実際の処理 ├─ projects │ ├─ __init__.py │ ├─ apps.py │ ├─ serializers.py │ ├─ urls.py │ └─ views.py ├─ teams │ ├─ __init__.py │ ├─ apps.py │ ├─ serializers.py │ ├─ urls.py │ └─ views.py ├─ wikis │ ├─ __init__.py │ ├─ apps.py │ ├─ serializers.py │ ├─ urls.py │ └─ views.py ├─ issues │ ├─ __init__.py │ ├─ apps.py │ ├─ serializers.py │ ├─ urls.py │ └─ views.py ├─ files │ ├─ __init__.py │ ├─ apps.py │ ├─ serializers.py │ ├─ urls.py │ └─ views.py ├─ webhook │ ├─ __init__.py │ ├─ apps.py │ ├─ serializers.py │ ├─ urls.py │ └─ views.py ├─ test │ ├─ users │ │ ├─ __init__.py │ │ ├─ test_views.py : views.pyのテスト │ │ └─ test_serializers.py : test_serializers,pyのテスト │ ├─ projects │ │ ├─ __init__.py │ │ ├─ test_views.py │ │ └─ test_serializers.py │ ├─ teams │ │ ├─ __init__.py │ │ ├─ test_views.py │ │ └─ test_serializers.py │ ├─ wikis │ │ ├─ __init__.py │ │ ├─ test_views.py │ │ └─ test_serializers.py │ ├─ issues │ │ ├─ __init__.py │ │ ├─ test_views.py │ │ └─ test_serializers.py │ ├─ files │ │ ├─ __init__.py │ │ ├─ test_views.py │ │ └─ test_serializers.py │ └─ webhook │ ├─ __init__.py │ ├─ test_views.py │ └─ test_serializers.py ├─ requirements.txt └─ manage.py ``` # 2. [Backlog] 関数・クラスの各メソッドのインターフェース・機能 ## 2-1. space ### BacklogSpaceAPI クラス #### 本体設計 Location: `Backlog/backlog_api/space.py`(既存) | メソッド | 引数 | 戻り値 | 機能 | | --- | --- | --- | --- | | get_space(既) | | スペース情報(Dict) | スペース情報を取得する | | get_recent_updates(既) | activity_type_id(Sequence[int])<br>min_id(int)<br>max_id(int)<br>count(int)<br>order(str) | 更新情報の一覧(List[Dict]) | 最近の更新の一覧を取得する | | post_attachment | filepath(str)<br> | 送信結果(Dict) | 添付ファイルを送信する | #### 対応するテストの設計 Location: `Backlog/test/test_project.py` 継承: `unittest.TestCase` | テスト名 | テスト関数 | テスト内容 | | --- | --- | --- | | test_get_space(既) | get_space | 出力の型(Dict),内容(ITチーム) | | test_get_recent_updatesr(既) | get_recent_updates | 出力の型(List) | | test_get_project_team | get_project_team | 出力の型(List) | ## 2-2. project ### BacklogProjectsAPI クラス #### 本体設計 Location: `Backlog/backlog_api/project.py`(既存) | メソッド | 引数 | 戻り値 | 機能 | | --- | --- | --- | --- | | get_project_list(既) | archived<br>all_ | プロジェクト一覧(List[Dict]) | プロジェクトの一覧を取得する | | get_project(既) | | プロジェクト情報(Dict) | プロジェクトの情報を取得する | | get_project_user | | ユーザー一覧(List[Dict]) | プロジェクトに参加しているユーザーの一覧を取得する | | get_project_team | | チーム一覧(List[Dict]) | プロジェクトに参加しているチームの一覧を取得する | | get_project_activity | | 最近の活動一覧(List[Dict]) | プロジェクトの最近の活動の一覧を取得する | #### 対応するテストの設計 Location: `Backlog/test/test_project.py` 継承: `unittest.TestCase` | テスト名 | テスト関数 | テスト内容 | | --- | --- | --- | | test_get_project_list(既) | get_project_list(既) | 出力の型(List) | | test_get_project(既) | get_project(既) | 出力の型(Dict),内容(ITチーム) | | test_get_project_user | get_project_user | 出力の型(List) | | test_get_project_team | get_project_team | 出力の型(List) | | test_get_project_activity | get_project_activity | 出力の型(List) | ## 2-3. team ### BacklogTeamsAPI #### 本体設計 Location: `Backlog/backlog_api/team.py` | メソッド | 引数 | 戻り値 | 機能 | | --- | --- | --- | --- | | get_team_list | | チーム一覧(List[Dict]) | チームの一覧を取得する | | get_team | teamID | チーム情報(Dict) | チームの情報を取得する | | get_team_user | teamID | ユーザー情報(List[Dict]) | チームに参加しているユーザーの一覧を取得する | #### 対応するテストの設計 Location: `Backlog/test/test_team.py` 継承: `unittest.TestCase` | テスト名 | テスト関数 | テスト内容 | | --- | --- | --- | | test_get_team_list | get_team_list | 出力の型(List) | | test_get_team | get_team | 出力の型(Dict),内容(ITチーム) | | test_get_team_user | get_team_user | 出力の型(List) | ## 2-4. user ### BacklogUsersAPI #### 本体設計 Location: `Backlog/backlog_api/user.py` | メソッド | 引数 | 戻り値 | 機能 | | --- | --- | --- | --- | | get_user_list | | ユーザー一覧(List[Dict]) | ユーザーの一覧を取得する | | get_user | userID | ユーザー情報(Dict) | ユーザーの情報を取得する | | get_user_activity | userID | 最近の活動の一覧(List[Dict]) | ユーザーの最近の活動の一覧を取得する | #### 対応するテストの設計 Location: `Backlog/test/test_user.py` 継承: `unittest.TestCase` | テスト名 | テスト関数 | テスト内容 | | --- | --- | --- | | test_get_user_list | get_user_list | 出力の型(List) | | test_get_user_list | get_user | 出力の型(Dict),内容(ITチームBot) | | test_get_user_list | get_user_activity | 出力の型(List) | ## 2-5. SharedFile ### BacklogSharedFileAPI #### 本体設計 Location: `Backlog/backlog_api/shared_files.py` | メソッド | 引数 | 戻り値 | 機能 | | --- | --- | --- | --- | | get_list_of_shared_files(既) | dirpath(str)<br>params(Optional[Dict]) | 共有ファイル一覧(List[Dict]) | 共有ファイルの一覧を取得する | | get_file(既) | file_id(int)<br>download_dir(str)<br>save_as_filename(bool)<br>overwrite(bool)<br>chunk_size(int)<br>params(Optional[Dict]) | ダウンロードされたファイルのパス(str) | 共有ファイルのダウンロードを行う | #### 対応するテストの設計 Location: `Backlog/test/test_shared_files.py` 継承: `unittest.TestCase` | テスト名 | テスト関数 | テスト内容 | | --- | --- | --- | | test_get_list_of_shared_files(既) | get_list_of_shared_files | 出力の型(List) | | test_request_get_file(既) | get_file | レスポンス(200) | | test_get_file(既) | get_file | 出力の型(Dict),内容(13991389) | | test_download_shared_file_different_size(既) | get_file | 出力 | ## 2-6. Wiki ### BacklogWikisAPI ##### 本体設計 | メソッド | 引数 | 戻り値 | 機能 | | --- | --- | --- | --- | | get_wiki_list | project_id_or_key(int)<br>keyword(str) | wiki_list(List[Wiki_for_list]) | Wikiページ一覧の取得 | | post_wiki | new_wiki(Wiki) | new_wiki(Wiki) | Wikiページの追加 | | get_wiki | wiki_id(int) | wiki(Wiki) | Wikiページ情報の取得 | | patch_wiki | wiki_id(int)<br>wiki_name(str)<br>wiki_content(str)<br>mail(boolean) | wiki(Wiki) | Wikiページ情報の更新 | | delete_wiki | wiki_id(int) | wiki(Wiki) | Wikiページの削除 | | get_wiki_attachment_list | wiki_id(int) | attachment_file_list(List[attachment_file_for_list]) | Wiki添付ファイル一覧の取得 | | post_wiki_attachment | Content-Type:application/x-www-form-urlencoded(再度考える必要あり) | attachment_new(attachment_file) | Wiki添付ファイルの追加 | | get_wiki_attachment | wiki_id(int)<br>attachment_id(int) | Content-Type:application/octet-stream<br>Content-Disposition:attachment;filename="attachment.doc" | Wiki添付ファイルのダウンロード | | delete_wiki_attachment | wiki_id(int)<br>attachment_id(int) | attachment_file(AttachmentFile) | Wiki添付ファイルの削除 | | get_wiki_shared_file_list | wiki_id(int) | shared_file_list(List[SharedFile]) | Wiki共有ファイル一覧の取得 | | post_wiki_sharefile | wiki_id(int)<br>shared_file_id(int) | shared_file(SharedFile) | Wikiに共有ファイルをリンク | | delete_wiki_sharefile | wiki_id(int)<br>shared_file_id(int) | shared_file(SharedFile) | Wiki共有ファイルの削除 | | get_wiki_history | wiki_id(int)<br>min_id(int)<br>max_id(int)<br>count(Optional[int])<br>order(Optional[str]) | wiki_hisrory(List[WikiHistory]) | Wikiページ更新履歴一覧の取得 | | get_wiki_count | project_id_or_key(int) | wiki_count(int) | Wikiページ数の取得 | | get_wiki_tags | project_id_or_key(int) | wiki_tags(List[Tag]) | Wikiページタグ一覧の取得 | ##### 対応するテスト設計 | メソッド | 内容 | | --- | --- | | test_get_wiki_list | get_wiki_listのテスト | | test_post_wiki | post_wikiのテスト | | test_get_wiki | get_wikiのテスト | | test_patch_wiki | patch_wikiのテスト | | test_delete_wiki | delete_wikiのテスト | | test_get_wiki_attachment_list | get_wiki_attachment_listのテスト | | test_post_wiki_attachment | post_wiki_attachmentのテスト | | test_get_wiki_attachment | get_wiki_attachmentのテスト | | test_delete_wiki_attachme| delete_wiki_attachmentのテスト | | test_get_wiki_sharefile_list | get_wiki_sharefile_listのテスト | | test_post_wiki_sharefile | post_wiki_sharefileのテスト | | test_delete_wiki_sharefile | delete_wiki_sharefileのテスト | | test_get_wiki_history | get_wiki_historyのテスト | | test_get_wiki_count | get_wiki_countのテスト | | test_get_wiki_tags | get_wiki_tagsのテスト | # 3. [Module-Backlog] 関数・クラスの各メソッドのインターフェース・機能 ## 3-1v. projects - Views Location: `projects/views.py` TestLocation: `test/projects/test_views.py` 継承: `django.test.Client` ### ProjectListView #### 本体設計 | メソッド | 引数 | 戻り値 | 機能 | | --- | --- | --- | --- | | get | | List[Dict] | プロジェクトの一覧を取得する | #### 対応するテストの設計 | テスト名 | テスト関数 | テスト内容 | | --- | --- | --- | | test_get | get | 出力の型(List) | ### ProjectView #### 本体設計 | メソッド | 引数 | 戻り値 | 機能 | | --- | --- | --- | --- | | get | 科目コード | Dict | プロジェクトの情報を取得する | #### 対応するテストの設計 | テスト名 | テスト関数 | テスト内容 | | --- | --- | --- | | test_get | get | 出力の型(Dict),内容(ITチーム) | ### ProjectUserListView #### 本体設計 | メソッド | 引数 | 戻り値 | 機能 | | --- | --- | --- | --- | | get | 科目コード | List[Dict] | プロジェクトに参加しているユーザーの一覧を取得する | #### 対応するテストの設計 | テスト名 | テスト関数 | テスト内容 | | --- | --- | --- | | test_get | get | 出力の型(List) | ### ProjectTeamListView #### 本体設計 | メソッド | 引数 | 戻り値 | 機能 | | --- | --- | --- | --- | | get | 科目コード | List[Dict] | プロジェクトに参加しているチームの一覧を取得する | #### 対応するテストの設計 | テスト名 | テスト関数 | テスト内容 | | --- | --- | --- | | test_get | get | 出力の型(List) | ## 3-1s. projects - Serializers Location: `projects/serializers.py` TestLocation: `test/projects/test_serializers.py` 継承: `serializers.Serializer` ### ModuleProjectSerializer #### 本体設計 | メソッド | 引数 | 戻り値 | 機能 | | --- | --- | --- | --- | #### 対応するテストの設計 | テスト名 | テスト関数 | テスト内容 | | --- | --- | --- | | test_get_selializer | | ModuleProjectSerializerの.data, is_valid()のテスト | ## 3-2v. teams - Views Location: `teams/views.py` TestLocation: `test/teams/test_views.py` 継承: `serializers.Serializer` ### TeamListView #### 本体設計 | メソッド | 引数 | 戻り値 | 機能 | | --- | --- | --- | --- | | get | | List[Dict] | チームの一覧を取得する | #### 対応するテストの設計 | テスト名 | テスト関数 | テスト内容 | | --- | --- | --- | | test_get | get | 出力の型(List) | ### TeamView #### 本体設計 | メソッド | 引数 | 戻り値 | 機能 | | --- | --- | --- | --- | | get | 科目コード | Dict | チームの情報を取得する | #### 対応するテストの設計 | テスト名 | テスト関数 | テスト内容 | | --- | --- | --- | | test_get | get | 出力の型(Dict),内容(ITチーム) | ### TeamUserView #### 本体設計 | メソッド | 引数 | 戻り値 | 機能 | | --- | --- | --- | --- | | get | 科目コード | List[Dict] | チームに参加しているユーザーの一覧を取得する | #### 対応するテストの設計 | テスト名 | テスト関数 | テスト内容 | | --- | --- | --- | | test_get | get | 出力の型(List) | ## 3-2s. teams - Serializers Location: `teams/serializers.py` TestLocation: `test/teams/test_serializers.py` 継承: `django.test.SimpleTestCase` ### ModuleTeamSerializer #### 本体設計 | メソッド | 引数 | 戻り値 | 機能 | | --- | --- | --- | --- | #### 対応するテストの設計 | テスト名 | テスト関数 | テスト内容 | | --- | --- | --- | | test_get_selializer | | ModuleTeamSerializerの.data, is_valid()のテスト | ## 3-3v. users - Views Location: `users/views.py` TestLocation: `test/users/test_views.py` 継承: `django.test.Client` ### UserListView #### 本体設計 | メソッド | 引数 | 戻り値 | 機能 | | --- | --- | --- | --- | | get | | List[Dict] | ユーザーの一覧を取得する | #### 対応するテストの設計 | テスト名 | テスト関数 | テスト内容 | | --- | --- | --- | | test_get | get | 出力の型(List) | ### UserView #### 本体設計 | メソッド | 引数 | 戻り値 | 機能 | | --- | --- | --- | --- | | get | NagaseID | Dict | ユーザーの情報を取得する | #### 対応するテストの設計 | テスト名 | テスト関数 | テスト内容 | | --- | --- | --- | | test_get | get | 出力の型(Dict),内容(ITチームBot) | ### UserActivityView #### 本体設計 | メソッド | 引数 | 戻り値 | 機能 | | --- | --- | --- | --- | | get | NagaseID | List[Dict] | ユーザーの最近の活動の一覧を取得する | #### 対応するテストの設計 | テスト名 | テスト関数 | テスト内容 | | --- | --- | --- | | test_get | get | 出力の型(List) | #### 対応するテストの設計 ## 3-3s. users - Serializers Location: `users/serializers.py` TestLocation: `test/users/test_serializers.py` 継承: `django.test.SimpleTestCase` ### ModuleUserSerializer #### 本体設計 | メソッド | 引数 | 戻り値 | 機能 | | --- | --- | --- | --- | #### 対応するテストの設計 | テスト名 | テスト関数 | テスト内容 | | --- | --- | --- | | test_get_selializer | | ModuleUserSerializerの.data, is_valid()のテスト | ## 3-4v. issues - Views Location: `issues/views.py` TestLocation: `test/issues/test_views.py` 継承: `django.test.Client` ### IssueView #### 本体設計 | メソッド | 引数 | 戻り値 | 機能 | | --- | --- | --- | --- | | get_issue_list | parameters(dict) | issue_list(List[dict]) | 課題の一覧を取得する | | post_issue_list | parameter_list(List[dict]) | issue_list(List[Dict]) | 新しい課題を追加する | | get_issue | issue_id(int) | issue(dict) | 課題の情報を取得する | | patch_issue | issue_id(int), parameters(dict) | issue(dict) | 課題の情報を更新する | | delete_issue | issue_id(int) | issue(dict) | 課題を削除する | #### 対応するテストの設計 | テスト名 | テスト関数 | テスト内容 | | --- | --- | --- | | test_get | get | 出力とエラーのチェック | | test_get_issue_list | get_issue_list | 出力とエラーのチェック | | test_post_issue_list | post_issue_list | 出力とエラーのチェック | | test_get_issue | get_issue | 出力とエラーのチェック | | test_patch_issue | patch_issue | 出力とエラーのチェック | | test_delete_issue | delete_issue | 出力とエラーのチェック | ### IssueCommentView #### 本体設計 | メソッド | 引数 | 戻り値 | 機能 | | --- | --- | --- | --- | | get_issue_comment_list | issue_id(int), parameters(dict) | issue_comment_list(List[dict]) | 課題に登録されているコメントの一覧を取得する | | post_issue_comment_list | issue_id(int), parameters(List[dict]) | issue_comment_list(List[dict]) | 課題に新しいコメントを追加する | | get_issue_comment | issue_id(int), issue_comment_id(int) | issue_comment(dict) | 課題のコメントの情報を取得する | | patch_issue_comment | issue_id(int), issue_comment_id(int), parameters(dict) | issue_comment(dict) | 課題のコメントの情報を更新する | | delete_issue_comment | issue_id(int), issue_comment_id(int) | issue_comment(dict) | 課題のコメントを削除する | #### 対応するテストの設計 | テスト名 | テスト関数 | テスト内容 | | --- | --- | --- | | test_get | get | 出力とエラーのチェック | | test_get_issue_comment_list | get_issue_comment_list | 出力とエラーのチェック | | test_post_issue_comment_list | post_issue_comment_list | 出力とエラーのチェック | | test_get_issue_comment | get_issue_comment | 出力とエラーのチェック | | test_patch_issue_comment | patch_issue_comment | 出力とエラーのチェック | | test_delete_issue_comment | delete_issue_comment | 出力とエラーのチェック | ## 3-4s. Issue - Serializers Location: `issues/serializers.py` TestLocation: `test/issues/test_serializers.py` 継承: `django.test.SimpleTestCase` ### ModuleIssueSerializer #### 本体設計 | メソッド | 引数 | 戻り値 | 機能 | | --- | --- | --- | --- | #### 対応するテストの設計 | テスト名 | テスト関数 | テスト内容 | | --- | --- | --- | | test_get_selializer | | ModuleIssueSerializerの.data, is_valid()のテスト | ## 3-5v. File - Views Location: `file/views.py` TestLocation: `test/file/test_views.py` 継承: `django.test.Client` ### FileFoldersView #### 本体設計 | メソッド | 引数 | 戻り値 | 機能 | | --- | --- | --- | --- | | get_folder | path(str) | foler(dict) | フォルダの情報を取得する | | get_folder_content | path(str) | gziped_folder(file) | フォルダを取得する | | patch_folder | path(str), parameters(dict) | folder(dict) | フォルダの内容を更新する | | delete_folder | path(str) | folder(dict) | フォルダを削除する | #### 対応するテストの設計 | テスト名 | テスト関数 | テスト内容 | | --- | --- | --- | | test_get_folder | get_folder | 出力とエラーのチェック | | test_get_folder_content | get_folder_content | 出力とエラーのチェック | | test_patch_folder | patch | 出力とエラーのチェック | | test_delete_folder | delete | 出力とエラーのチェック | ### FileFilesView #### 本体設計 | メソッド | 引数 | 戻り値 | 機能 | | --- | --- | --- | --- | | get_file | path(str) | file(dict) | ファイルの情報を取得する | | get_file_content | path(str) | gziped_file(file) | ファイルを取得する | | patch_file | path(str), file(dict) | file(dict) | ファイルの内容を更新する | | delete_file | path(str) | file(dict) | ファイルを削除する | #### 対応するテストの設計 | テスト名 | テスト関数 | テスト内容 | | --- | --- | --- | | test_get_files | get | 出力とエラーのチェック | | test_get_files_content | get_content | 出力とエラーのチェック | | test_files_patch | patch | 出力とエラーのチェック | | test_files_delete | delete | 出力とエラーのチェック | ## 3-5s. File - Serializers Location: `file/serializers.py` TestLocation: `test/file/test_serializers.py` 継承: `django.test.SimpleTestCase` ### ModuleFileSerializer #### 本体設計 | メソッド | 引数 | 戻り値 | 機能 | | --- | --- | --- | --- | #### 対応するテストの設計 | テスト名 | テスト関数 | テスト内容 | | --- | --- | --- | | test_get_selializer | | ModuleFileSerializerの.data, is_valid()のテスト | ## 3-6v. IssueWebhook - Views Location: `webhook/views.py` TestLocation: `test/webhook/test_views.py` 継承: `django.test.Client` ### IssueWebhookView #### 本体設計 | メソッド | 引数 | 戻り値 | 機能 | | --- | --- | --- | --- | | get | parameters(dict) | webhook_list(List[Dict]) | webhookの一覧を取得する | | post | parameter_list(List[Dict]) | webhook_list(List[Dict]) | 課題にwebhookを追加する | | get_webhook | webhook_id(int) | webhook(dict) | webhookの一覧を取得する | | patch_webhook | webhook_id(int), parameters(dict) | webhook(dict) | webhookの内容を更新する | | delete_webhook | webhook_id(int) | webhook(dict) | webhookを削除する | #### 対応するテストの設計 | テスト名 | テスト関数 | テスト内容 | | --- | --- | --- | | test_get | get | 出力とエラーのチェック | | test_post | post | 出力とエラーのチェック | | test_get_webhook | get_webhook | 出力とエラーのチェック | | test_patch_webhook | patch_webhook | 出力とエラーのチェック | | test_delete_webhook | delete_webhook | 出力とエラーのチェック | | test_get_webhook | get_webhook | 出力とエラーのチェック | | test_patch_webhook | patch_webhook | 出力とエラーのチェック | | test_delete_webhook | delete_webhook | 出力とエラーのチェック | ## 3-6s. IssueWebhook - Serializers Location: `webhook/serializers.py` TestLocation: `test/webhook/test_serializers.py` 継承: `django.test.SimpleTestCase` ### ModuleWebhookSerializer #### 本体設計 | メソッド | 引数 | 戻り値 | 機能 | | --- | --- | --- | --- | #### 対応するテストの設計 | テスト名 | テスト関数 | テスト内容 | | --- | --- | --- | | test_get_selializer | | ModuleWebhookSerializerの.data, is_valid()のテスト | ## 3-7v. Wikis - Views Location: `wikis/views.py` TestLocation: `test/wikis/test_views.py` 継承: `django.test.Client` ### WikiListView #### 本体設計 | メソッド | 引数 | 戻り値 | 機能 | | --- | --- | --- | --- | | get | project_id_or_key(int)<br>keyword(str) | wiki_list(List[Wiki_for_list]) | Wikiページ一覧の取得 | #### 対応するテスト設計 | メソッド | 機能 | | --- | --- | | test_get | WikiListViewのgetのテスト | ### WikiView #### 本体設計 | メソッド | 引数 | 戻り値 | 機能 | | --- | --- | --- | --- | | post | new_wiki(Wiki) | new_wiki(Wiki) | Wikiページの追加 | | get | wiki_id(int) | wiki(Wiki) | Wikiページ情報の取得 | | patch | wiki_id(int)<br>wiki_name(str)<br>wiki_content(str)<br>mail(boolean) | wiki(Wiki) | Wikiページ情報の更新 | | delete | wiki_id(int) | wiki(Wiki) | Wikiページの削除 | #### 対応するテスト設計 | メソッド | 機能 | | --- | --- | | test_get | WikiViewのgetのテスト | | test_post | WikiViewのpostのテスト | | test_patch | WikiViewのpatchのテスト | | test_delete | WikiViewのdeleteのテスト | ### WikiAttachmentListView #### 本体設計 | メソッド | 引数 | 戻り値 | 機能 | | --- | --- | --- | --- | | get | wiki_id(int) | attachment_file_list(List[attachment_file_for_list]) | Wiki添付ファイル一覧の取得 | | post | Content-Type:application/x-www-form-urlencoded(再度考える必要あり) | attachment_new(attachment_file) | Wiki添付ファイルの追加 | #### 対応するテスト設計 | メソッド | 機能 | | --- | --- | | test_get | WikiAttachmentListViewのgetのテスト | | test_post | WikiAttachmentListViewのpostのテスト | ### WikiAttachmentView #### 本体設計 | メソッド | 引数 | 戻り値 | 機能 | | --- | --- | --- | --- | | get | wiki_id(int)<br>attachment_id(int) | Content-Type:application/octet-stream<br>Content-Disposition:attachment;filename="attachment.doc" | Wiki添付ファイルのダウンロード | | delete | wiki_id(int)<br>attachment_id(int) | attachment_file(AttachmentFile) | Wiki添付ファイルの削除 | #### 対応するテスト設計 | メソッド | 機能 | | --- | --- | | test_get | WikiAttachmentViewのgetのテスト | | test_delete | WikiAttachmentViewのdeleteのテスト | ### WikiSharedFileListView #### 本体設計 | メソッド | 引数 | 戻り値 | 機能 | | --- | --- | --- | --- | | get | wiki_id(int) | shared_file_list(List[SharedFile]) | Wiki共有ファイル一覧の取得 | #### 対応するテスト設計 | メソッド | 機能 | | --- | --- | | test_get | WikiSharedFileListViewのgetのテスト | ### WikiSharedFileView #### 本体設計 | メソッド | 引数 | 戻り値 | 機能 | | --- | --- | --- | --- | | post | wiki_id(int)<br>shared_file_id(int) | shared_file(SharedFile) | Wikiに共有ファイルをリンク | | delete | wiki_id(int)<br>shared_file_id(int) | shared_file(SharedFile) | Wiki共有ファイルの削除 | #### 対応するテスト設計 | メソッド | 機能 | | --- | --- | | test_post | WikiSharedFileViewのpostのテスト | | test_delete | WikiSharedFileViewのdeleteのテスト | ### WikiHistoryView #### 本体設計 | メソッド | 引数 | 戻り値 | 機能 | | --- | --- | --- | --- | | get | wiki_id(int)<br>min_id(int)<br>max_id(int)<br>count(Optional[int])<br>order(Optional[str]) | wiki_hisrory(List[WikiHistory]) | Wikiページ更新履歴一覧の取得 | #### 対応するテスト設計 | メソッド | 機能 | | --- | --- | | test_get | WikiHistoryViewのgetのテスト | ### WikiCountView #### 本体設計 | メソッド | 引数 | 戻り値 | 機能 | | --- | --- | --- | --- | | get | project_id_or_key(int) | wiki_count(int) | Wikiページ数の取得 | #### 対応するテスト設計 | メソッド | 機能 | | --- | --- | | test_get | WikiCountViewのgetのテスト | ### WikiTagsView #### 本体設計 | メソッド | 引数 | 戻り値 | 機能 | | --- | --- | --- | --- | | get | project_id_or_key(int) | wiki_tags(List[Tag]) | Wikiページタグ一覧の取得 | #### 対応するテスト設計 | メソッド | 機能 | | --- | --- | | test_get | WikiTagsViewのgetのテスト | ## 3-7s. Wikis - Serializers Location: `wikis/serializers.py` TestLocation: `test/wikis/test_serializers.py` 継承: `django.test.SimpleTestCase` ### ModuleWikisSerializer #### 本体設計 | メソッド | 引数 | 戻り値 | 機能 | | --- | --- | --- | --- | #### 対応するテストの設計 | テスト名 | テスト関数 | テスト内容 | | --- | --- | --- | | test_get_selializer | | ModuleWikisSerializerの.data, is_valid()のテスト | ### ModuleWikisSerializer #### 本体設計 | メソッド | 引数 | 戻り値 | 機能 | | --- | --- | --- | --- | #### 対応するテストの設計 | テスト名 | テスト関数 | テスト内容 | | --- | --- | --- | | test_get_selializer | | ModuleWikisSerializerの.data, is_valid()のテスト | ### ModuleWikisSerializer #### 本体設計 | メソッド | 引数 | 戻り値 | 機能 | | --- | --- | --- | --- | #### 対応するテストの設計 | テスト名 | テスト関数 | テスト内容 | | --- | --- | --- | | test_get_selializer | | ModuleWikisSerializerの.data, is_valid()のテスト | # 4. システム概要 ## 4-1. システム構成図 ![クラス図](https://i.imgur.com/jSoUwNb.png) ## 4-2. API仕様書 * https://n-contents.backlog.com/git/CT_48/Reference/blob/master/Module-Backlog/openapi.yml # 5. 用語集 | 用語 | 説明 | | --- | --- | | Backlog | プロジェクト管理ツール<br>https://n-contents.backlog.com/ | | Backlog API | nulab(開発元)が公式に提供するBacklogのAPI<br>https://developer.nulab.com/ja/docs/backlog |

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully