From fb9bf0f03f935c347fb4962fc4d78d1dec9a6bf6 Mon Sep 17 00:00:00 2001 From: ota-meshi Date: Thu, 19 Dec 2024 16:48:28 +0900 Subject: [PATCH 1/3] Use VitePress --- .devcontainer/devcontainer.json | 2 +- .github/workflows/GHPages.yml | 24 +- .github/workflows/ci.yml | 18 + .gitignore | 2 + .vuepress/config.js => .vitepress/config.mjs | 180 +++- .../lib/markdown-it-plugin-header-shift.mjs | 8 +- .vitepress/lib/plantuml.tmlanguage.mjs | 856 ++++++++++++++++++ .../theme}/components/PageInfo.vue | 3 +- .../theme}/components/PageTitle.vue | 27 +- .../theme}/components/sns.js | 0 .vitepress/theme/index.mjs | 21 + .vitepress/theme/style.css | 102 +++ .vscode/settings.json | 6 +- .vuepress/components/HomeWithImg.vue | 31 - .vuepress/styles/index.styl | 41 - README.md | 48 +- documents/common/pandoc_styles/css/style.css | 10 +- ...75\345\220\215\350\246\217\347\264\204.md" | 12 +- .../forAWSResource/{README.md => index.md} | 13 +- .../forGitBranch/git_branch_standards.md | 124 +-- .../forGitBranch/{README.md => index.md} | 13 +- documents/forJava/{README.md => index.md} | 20 +- .../01_\347\224\273\351\235\242/README.md" | 21 - .../UIM01/index.md" | 16 +- .../UIM02/index.md" | 14 +- .../UIM03/index.md" | 18 +- .../UIM04/index.md" | 20 +- .../UIS01/index.md" | 20 +- .../UIS02/index.md" | 28 +- .../UIS03/index.md" | 16 +- .../UIS04/index.md" | 24 +- .../01_\347\224\273\351\235\242/index.md" | 21 + .../docs/02_WebAPI/{README.md => index.md} | 0 .../README.md" | 5 - .../index.md" | 5 + .../future_muscle_partner/docs/README.md | 24 +- .../{README.md => index.md} | 2 +- documents/forMarkdown/{README.md => index.md} | 33 +- .../{README.md => index.md} | 24 +- documents/forSQL/{README.md => index.md} | 26 +- documents/forSlack/{README.md => index.md} | 13 +- index.md | 44 + package.json | 17 +- .../example-resources/erd.a5er | 0 {.vuepress/public => public}/images/JBee.png | Bin .../public => public}/images/JBee100.png | Bin .../public => public}/images/JBeeBlack.png | Bin .../public => public}/images/background3.jpg | Bin public/images/logo-dark.svg | 33 + {.vuepress/public => public}/images/logo.svg | 0 .../public => public}/resources/.gitkeep | 0 51 files changed, 1560 insertions(+), 425 deletions(-) create mode 100644 .github/workflows/ci.yml rename .vuepress/config.js => .vitepress/config.mjs (51%) rename .vuepress/markdown-it-plugin-header-shift.js => .vitepress/lib/markdown-it-plugin-header-shift.mjs (60%) create mode 100644 .vitepress/lib/plantuml.tmlanguage.mjs rename {.vuepress => .vitepress/theme}/components/PageInfo.vue (94%) rename {.vuepress => .vitepress/theme}/components/PageTitle.vue (83%) rename {.vuepress => .vitepress/theme}/components/sns.js (100%) create mode 100644 .vitepress/theme/index.mjs create mode 100644 .vitepress/theme/style.css delete mode 100644 .vuepress/components/HomeWithImg.vue delete mode 100644 .vuepress/styles/index.styl rename documents/forAWSResource/{README.md => index.md} (75%) rename documents/forGitBranch/{README.md => index.md} (77%) rename documents/forJava/{README.md => index.md} (80%) delete mode 100644 "documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/README.md" rename "documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIM01/README.md" => "documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIM01/index.md" (68%) rename "documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIM02/README.md" => "documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIM02/index.md" (75%) rename "documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIM03/README.md" => "documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIM03/index.md" (59%) rename "documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIM04/README.md" => "documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIM04/index.md" (60%) rename "documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIS01/README.md" => "documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIS01/index.md" (58%) rename "documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIS02/README.md" => "documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIS02/index.md" (65%) rename "documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIS03/README.md" => "documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIS03/index.md" (68%) rename "documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIS04/README.md" => "documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIS04/index.md" (65%) create mode 100644 "documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/index.md" rename documents/forMarkdown/future_muscle_partner/docs/02_WebAPI/{README.md => index.md} (100%) delete mode 100644 "documents/forMarkdown/future_muscle_partner/docs/03_\343\203\207\343\203\274\343\202\277/README.md" create mode 100644 "documents/forMarkdown/future_muscle_partner/docs/03_\343\203\207\343\203\274\343\202\277/index.md" rename documents/forMarkdown/future_muscle_partner/{README.md => index.md} (97%) rename documents/forMarkdown/{README.md => index.md} (90%) rename documents/forOpenAPISpecification/{README.md => index.md} (81%) rename documents/forSQL/{README.md => index.md} (80%) rename documents/forSlack/{README.md => index.md} (71%) create mode 100644 index.md rename "documents/forMarkdown/future_muscle_partner/docs/03_\343\203\207\343\203\274\343\202\277/erd.a5er" => public/example-resources/erd.a5er (100%) rename {.vuepress/public => public}/images/JBee.png (100%) rename {.vuepress/public => public}/images/JBee100.png (100%) rename {.vuepress/public => public}/images/JBeeBlack.png (100%) rename {.vuepress/public => public}/images/background3.jpg (100%) create mode 100644 public/images/logo-dark.svg rename {.vuepress/public => public}/images/logo.svg (100%) rename {.vuepress/public => public}/resources/.gitkeep (100%) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index e875e763..080541c1 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -11,7 +11,7 @@ // Set *default* container specific settings.json values on container create. "settings": { "eslint.validate": ["javascript", "javascriptreact", "vue"], - "eslint.workingDirectories": ["./", "./.vuepress"], + "eslint.workingDirectories": ["./", "./.vitepress"], "editor.codeActionsOnSave": { "source.fixAll.eslint": true } diff --git a/.github/workflows/GHPages.yml b/.github/workflows/GHPages.yml index 2024e42d..0585ce53 100644 --- a/.github/workflows/GHPages.yml +++ b/.github/workflows/GHPages.yml @@ -10,41 +10,39 @@ jobs: steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 - with: - node-version: 14 - uses: docker://pandoc/latex:2.9 with: - args: "pandoc ./documents/forJava/Javaコーディング規約.md -s --self-contained --number-sections --toc -t html5 -c ./documents/common/pandoc_styles/css/style.css -o ./.vuepress/public/resources/Javaコーディング規約.html" + args: "pandoc ./documents/forJava/Javaコーディング規約.md -s --self-contained --number-sections --toc -t html5 -c ./documents/common/pandoc_styles/css/style.css -o ./public/resources/Javaコーディング規約.html" - uses: docker://pandoc/latex:2.9 with: - args: "pandoc ./documents/forJava/Javaコーディング規約.md --toc --reference-doc=./documents/common/pandoc_styles/スタイル.docx -s -o ./.vuepress/public/resources/Javaコーディング規約.docx" + args: "pandoc ./documents/forJava/Javaコーディング規約.md --toc --reference-doc=./documents/common/pandoc_styles/スタイル.docx -s -o ./public/resources/Javaコーディング規約.docx" - uses: docker://pandoc/latex:2.9 with: - args: "pandoc ./documents/forSQL/SQLコーディング規約(Oracle).md -s --self-contained --number-sections --toc -t html5 -c ./documents/common/pandoc_styles/css/style.css -o ./.vuepress/public/resources/SQLコーディング規約(Oracle).html" + args: "pandoc ./documents/forSQL/SQLコーディング規約(Oracle).md -s --self-contained --number-sections --toc -t html5 -c ./documents/common/pandoc_styles/css/style.css -o ./public/resources/SQLコーディング規約(Oracle).html" - uses: docker://pandoc/latex:2.9 with: - args: "pandoc ./documents/forSQL/SQLコーディング規約(Oracle).md --toc --reference-doc=./documents/common/pandoc_styles/スタイル.docx -s -o ./.vuepress/public/resources/SQLコーディング規約(Oracle).docx" + args: "pandoc ./documents/forSQL/SQLコーディング規約(Oracle).md --toc --reference-doc=./documents/common/pandoc_styles/スタイル.docx -s -o ./public/resources/SQLコーディング規約(Oracle).docx" - uses: docker://pandoc/latex:2.9 with: - args: "pandoc ./documents/forSQL/SQLコーディング規約(PostgreSQL).md -s --self-contained --number-sections --toc -t html5 -c ./documents/common/pandoc_styles/css/style.css -o ./.vuepress/public/resources/SQLコーディング規約(PostgreSQL).html" + args: "pandoc ./documents/forSQL/SQLコーディング規約(PostgreSQL).md -s --self-contained --number-sections --toc -t html5 -c ./documents/common/pandoc_styles/css/style.css -o ./public/resources/SQLコーディング規約(PostgreSQL).html" - uses: docker://pandoc/latex:2.9 with: - args: "pandoc ./documents/forSQL/SQLコーディング規約(PostgreSQL).md --toc --reference-doc=./documents/common/pandoc_styles/スタイル.docx -s -o ./.vuepress/public/resources/SQLコーディング規約(PostgreSQL).docx" + args: "pandoc ./documents/forSQL/SQLコーディング規約(PostgreSQL).md --toc --reference-doc=./documents/common/pandoc_styles/スタイル.docx -s -o ./public/resources/SQLコーディング規約(PostgreSQL).docx" - uses: docker://pandoc/latex:2.9 with: - args: "pandoc ./documents/forAWSResource/AWSインフラリソース命名規約.md -s --self-contained --number-sections --toc -t html5 -c ./documents/common/pandoc_styles/css/style.css -o ./.vuepress/public/resources/AWSインフラリソース命名規約.html" + args: "pandoc ./documents/forAWSResource/AWSインフラリソース命名規約.md -s --self-contained --number-sections --toc -t html5 -c ./documents/common/pandoc_styles/css/style.css -o ./public/resources/AWSインフラリソース命名規約.html" - uses: docker://pandoc/latex:2.9 with: - args: "pandoc ./documents/forAWSResource/AWSインフラリソース命名規約.md --toc --reference-doc=./documents/common/pandoc_styles/スタイル.docx -s -o ./.vuepress/public/resources/AWSインフラリソース命名規約.docx" + args: "pandoc ./documents/forAWSResource/AWSインフラリソース命名規約.md --toc --reference-doc=./documents/common/pandoc_styles/スタイル.docx -s -o ./public/resources/AWSインフラリソース命名規約.docx" - uses: docker://pandoc/latex:2.9 with: - args: "pandoc ./documents/forOpenAPISpecification/OpenAPI_Specification_2.0.md -s --self-contained --number-sections --toc -t html5 -c ./documents/common/pandoc_styles/css/style.css -o ./.vuepress/public/resources/OpenAPI_Specification_2.0.html" + args: "pandoc ./documents/forOpenAPISpecification/OpenAPI_Specification_2.0.md -s --self-contained --number-sections --toc -t html5 -c ./documents/common/pandoc_styles/css/style.css -o ./public/resources/OpenAPI_Specification_2.0.html" - uses: docker://pandoc/latex:2.9 with: - args: "pandoc ./documents/forOpenAPISpecification/OpenAPI_Specification_2.0.md --toc --reference-doc=./documents/common/pandoc_styles/スタイル.docx -s -o ./.vuepress/public/resources/OpenAPI_Specification_2.0.docx" + args: "pandoc ./documents/forOpenAPISpecification/OpenAPI_Specification_2.0.md --toc --reference-doc=./documents/common/pandoc_styles/スタイル.docx -s -o ./public/resources/OpenAPI_Specification_2.0.docx" - name: Install Packages run: | - npm i --legacy-peer-deps + npm i -f npm i --global mermaid-filter - name: Build all run: | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..2b867e86 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,18 @@ +name: ci + +on: + pull_request: + branches: [master] + +jobs: + deploy-docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + - name: Install Packages + run: | + npm i -f + - name: Build all + run: | + npm run build diff --git a/.gitignore b/.gitignore index e90249d3..09516856 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,5 @@ node_modules # WSL *:Zone.Identifier + +/.vitepress/cache diff --git a/.vuepress/config.js b/.vitepress/config.mjs similarity index 51% rename from .vuepress/config.js rename to .vitepress/config.mjs index d9ce5acc..7d6bf22c 100644 --- a/.vuepress/config.js +++ b/.vitepress/config.mjs @@ -1,78 +1,152 @@ -"use strict"; +import { fileURLToPath } from "url"; +import { defineConfig as defineConfigBase } from "vitepress"; +import { withMermaid } from "vitepress-plugin-mermaid"; +import { Module } from "module"; +import markdownItTaskLists from "markdown-it-task-lists"; +import markdownItFootnote from "markdown-it-footnote"; +import markdownItHeaderShift from "./lib/markdown-it-plugin-header-shift.mjs"; +import * as plantumlLanguage from "./lib/plantuml.tmlanguage.mjs"; +const __filename = fileURLToPath(import.meta.url); +const pkg = Module.createRequire(__filename)("../package.json"); +const repoUrl = pkg.repository.url + .replace(/\.git$/u, "") + .replace(/^git\+/u, ""); + +/** @type {import("vitepress").DefaultTheme.Sidebar} */ const links = { - "/documents/forJava/Javaコーディング規約_for_11.html": [ - "/documents/forJava/", - "/documents/forJava/Javaコーディング規約.html", - "/documents/forJava/Javaコーディング規約_for_11.html", - ], - "/documents/forJava/Javaコーディング規約_for_8.html": [ - "/documents/forJava/", - "/documents/forJava/Javaコーディング規約.html", - "/documents/forJava/Javaコーディング規約_for_8.html", - ], "/documents/forJava/": [ - "/documents/forJava/", - "/documents/forJava/Javaコーディング規約.html", + { text: "Home", link: "/documents/forJava/" }, + { + text: "Javaコーディング規約", + link: "/documents/forJava/Javaコーディング規約.html", + }, + { + text: "For Java11", + link: "/documents/forJava/Javaコーディング規約_for_11.html", + }, + { + text: "For Java8", + link: "/documents/forJava/Javaコーディング規約_for_8.html", + }, ], "/documents/forSQL/": [ - "/documents/forSQL/", - "/documents/forSQL/SQLコーディング規約(Oracle).html", - "/documents/forSQL/SQLコーディング規約(PostgreSQL).html", + { text: "Home", link: "/documents/forSQL/" }, + { + text: "SQLコーディング規約(PostgreSQL)", + link: "/documents/forSQL/SQLコーディング規約(PostgreSQL).html", + }, + { + text: "SQLコーディング規約(Oracle)", + link: "/documents/forSQL/SQLコーディング規約(Oracle).html", + }, ], "/documents/forAWSResource/": [ - "/documents/forAWSResource/", - "/documents/forAWSResource/AWSインフラリソース命名規約.html", + { text: "Home", link: "/documents/forAWSResource/" }, + { + text: "AWSインフラ命名規約", + link: "/documents/forAWSResource/AWSインフラリソース命名規約.html", + }, ], "/documents/forOpenAPISpecification/": [ - "/documents/forOpenAPISpecification/", - "/documents/forOpenAPISpecification/OpenAPI_Specification_2.0.html", - "/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html", + { text: "Home", link: "/documents/forOpenAPISpecification/" }, + { + text: "OpenAPI Specification 2.0規約", + link: "/documents/forOpenAPISpecification/OpenAPI_Specification_2.0.html", + }, + { + text: "OpenAPI Specification 3.0.3規約", + link: "/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html", + }, ], "/documents/forGitBranch/": [ - "/documents/forGitBranch/", - "/documents/forGitBranch/git_branch_standards.html", - "/documents/forGitBranch/merge_develop_to_feature.html", - "/documents/forGitBranch/merge_feature_to_develop.html", - "/documents/forGitBranch/commit_message_rule.html", - "/documents/forGitBranch/vscode_git_ope.html", + { text: "Home", link: "/documents/forGitBranch/" }, + { + text: "Gitブランチフロー規約", + link: "/documents/forGitBranch/git_branch_standards.html", + }, + { + text: "機能ブランチに開発ブランチの変更を取り込む方法", + link: "/documents/forGitBranch/merge_develop_to_feature.html", + }, + { + text: "開発ブランチに機能ブランチの変更を取り込む方法", + link: "/documents/forGitBranch/merge_feature_to_develop.html", + }, + { + text: "コミットメッセージ規約", + link: "/documents/forGitBranch/commit_message_rule.html", + }, + { + text: "VSCode上でのGit操作", + link: "/documents/forGitBranch/vscode_git_ope.html", + }, ], "/documents/forSlack/": [ - "/documents/forSlack/", - "/documents/forSlack/slack_usage_guidelines.html", + { text: "Home", link: "/documents/forSlack/" }, + { + text: "Slack利用ガイドライン", + link: "/documents/forSlack/slack_usage_guidelines.html", + }, ], }; -console.log(links); -module.exports = { - base: "/coding-standards/", +/** + * @typedef {import('vitepress').UserConfig} VitepressConfig + */ +/** + * @param {VitepressConfig} config config + * @returns {VitepressConfig} config + */ +function defineConfig(config) { + return withMermaid(defineConfigBase(config)); +} + +export default defineConfig({ title: "Future Enterprise Coding Standards", description: "フューチャー株式会社が作成するエンタープライズ領域に特化したコーディング規約", - dest: "docs", - serviceWorker: false, + outDir: "docs", + ignoreDeadLinks: "localhostLinks", markdown: { lineNumbers: true, - extendMarkdown: (md) => { - md.use(require("./markdown-it-plugin-header-shift")); - md.use(require("markdown-it-task-lists")); + config(md) { + md.use(markdownItHeaderShift); + md.use(markdownItTaskLists); + md.use(markdownItFootnote); }, - plugins: ["vuepress-plugin-mermaidjs"], + languages: [plantumlLanguage], }, - head: [], locales: { - "/": { + root: { lang: "ja", }, }, - plugins: ["vuepress-plugin-mermaidjs"], + head: [["link", { rel: "icon", href: `/coding-standards/logo.png` }]], + srcExclude: ["./README.md"], + base: "/coding-standards/", themeConfig: { - logo: "/images/logo.svg", - repo: "https://github.com/future-architect/coding-standards", - docsRepo: "https://github.com/future-architect/coding-standards", - docsBranch: "master", - editLinks: true, - lastUpdated: true, + siteTitle: "Future Enterprise Coding Standards", + logo: { + light: "/images/logo.svg", + dark: "/images/logo-dark.svg", + }, + footer: { + copyright: + "©2015 - 2024 Future Enterprise Coding Standards - Future Corporation", + }, + search: { + provider: "local", + options: { + detailedView: true, + }, + }, + editLink: { + pattern: repoUrl + "/edit/master/:path", + }, + outline: { + level: "deep", + }, nav: [ { text: "Java", @@ -167,7 +241,7 @@ module.exports = { }, { text: "サンプルプロジェクト", - link: "/documents/forGitBranch/future_muscle_partner/", + link: "/documents/forMarkdown/future_muscle_partner/", }, ], }, @@ -216,6 +290,14 @@ module.exports = { ], }, ], + sidebar: links, + + socialLinks: [ + { + icon: "github", + link: repoUrl, + }, + ], }, -}; +}); diff --git a/.vuepress/markdown-it-plugin-header-shift.js b/.vitepress/lib/markdown-it-plugin-header-shift.mjs similarity index 60% rename from .vuepress/markdown-it-plugin-header-shift.js rename to .vitepress/lib/markdown-it-plugin-header-shift.mjs index bac617c3..863dc432 100644 --- a/.vuepress/markdown-it-plugin-header-shift.js +++ b/.vitepress/lib/markdown-it-plugin-header-shift.mjs @@ -1,9 +1,9 @@ /** * headerタグを1つづつずらします。 - * Pandocでも利用できるMarkdownファイルにしたいので、`# header`を一つしかつくれないvuepress制約がうまく共存できないため、 - * vuepressではhタグの番号をずらし、無理やり共存できるようにします。 + * Pandocでも利用できるMarkdownファイルにしたいので、`# header`を一つしかつくれないvitepress制約がうまく共存できないため、 + * vitepressではhタグの番号をずらし、無理やり共存できるようにします。 */ -module.exports = function headerSections(md) { +export default function headerSections(md) { function shiftHeaders(state) { state.tokens.forEach((t, i) => { if (t.type.includes("heading")) { @@ -13,4 +13,4 @@ module.exports = function headerSections(md) { } md.core.ruler.push("header_shift", shiftHeaders); -}; +} diff --git a/.vitepress/lib/plantuml.tmlanguage.mjs b/.vitepress/lib/plantuml.tmlanguage.mjs new file mode 100644 index 00000000..138fe206 --- /dev/null +++ b/.vitepress/lib/plantuml.tmlanguage.mjs @@ -0,0 +1,856 @@ +// Copied from https://github.com/qjebbs/vscode-plantuml/blob/7bc1758ed73dc269f5721d78c6c6c01f461d7cb0/syntaxes/plantuml.yaml-tmLanguage +const data = { + author: "jebbs, qjebbs@gmail.com", + comment: "All diagram and styles support.", + fileTypes: ["wsd", "iuml", "pu", "puml", "plantuml"], + name: "plantuml", + scopeName: "source.wsd", + uuid: "ca03e751-04ef-4330-9a6b-2199aae1c418", + patterns: [ + { + comment: "diagram block", + name: "diagram.source.wsd", + begin: "(?i)^\\s*(@start[a-z]+)((\\s+)(.+?))?\\s*$", + beginCaptures: { + 1: { + name: "keyword.control.diagram.source.wsd", + }, + 5: { + name: "entity.name.function.diagram.source.wsd", + }, + }, + end: "(?i)^\\s*(@end[a-z]+)\\s*$", + endCaptures: { + 1: { + name: "keyword.control.diagram.source.wsd", + }, + }, + patterns: [ + { + include: "#Quoted", + }, + { + include: "#Comment", + }, + { + include: "#Style", + }, + { + include: "#Class", + }, + { + include: "#Object", + }, + { + include: "#Activity", + }, + { + include: "#Sequence", + }, + { + include: "#State", + }, + { + include: "#Keywords", + }, + { + include: "#General", + }, + ], + }, + { + include: "#Quoted", + }, + { + include: "#Comment", + }, + { + include: "#Style", + }, + { + include: "#Class", + }, + { + include: "#Object", + }, + { + include: "#Activity", + }, + { + include: "#Sequence", + }, + { + include: "#State", + }, + { + include: "#Keywords", + }, + { + include: "#General", + }, + ], + repository: { + Quoted: { + patterns: [ + { + comment: "quoted definitions", + name: "support.variable.definitions.source.wsd", + begin: "(?i)^\\s*(:)", + end: "(?i)(:)|[\\];|<>/}]?\\s*$", + }, + { + comment: "double quoted", + name: "string.quoted.double.source.wsd", + begin: '"', + end: '"', + }, + ], + }, + Comment: { + patterns: [ + { + comment: "comment line", + name: "comment.line.comment.source.wsd", + begin: "(?i)^\\s*(')", + end: "(?i)\\n", + }, + { + comment: "comment block", + name: "comment.block.source.wsd", + begin: "(?i)\\s*(/')", + end: "(?i)('/)\\s*", + }, + ], + }, + Style: { + patterns: [ + { + comment: "inline style", + match: + "(?i)^\\s*(skinparam)\\s+(\\w+)(<<\\s*.+?\\s*>>)?\\s+([^\\{\\}]+?)\\s*$", + captures: { + 1: { + name: "keyword.other.skinparam.source.wsd", + }, + 2: { + name: "keyword.other.skinparam.keyword.source.wsd", + }, + 3: { + name: "constant.numeric.skinparam.keyword.source.wsd", + }, + 4: { + name: "string.quoted.double.skinparam.value.source.wsd", + }, + }, + }, + { + comment: "style block", + begin: + "(?i)^\\s*(?:(skinparam)(?:\\s+(\\w+?)(<<\\s*.+?\\s*>>)?)?|(\\w+)(<<\\s*.+?\\s*>>)?)\\s*\\{\\s*$", + beginCaptures: { + 1: { + name: "keyword.other.skinparam.source.wsd", + }, + 2: { + name: "keyword.other.skinparam.keyword.source.wsd", + }, + 3: { + name: "constant.numeric.skinparam.keyword.source.wsd", + }, + 4: { + name: "keyword.other.skinparam.keyword.source.wsd", + }, + 5: { + name: "constant.numeric.skinparam.keyword.source.wsd", + }, + }, + end: "^\\s*(?>)?\\s+([^\\{\\}]+?)\\s*$", + captures: { + 1: { + name: "keyword.other.skinparam.keyword.source.wsd", + }, + 2: { + name: "constant.numeric.skinparam.keyword.source.wsd", + }, + 3: { + name: "string.quoted.double.skinparam.value.source.wsd", + }, + }, + }, + { + include: "$self", + }, + ], + }, + ], + }, + Keywords: { + patterns: [ + { + comment: "line begin keywords", + name: "keyword.other.linebegin.source.wsd", + match: + "(?i)^\\s*(switch|case|usecase|actor|object|participant|boundary|control|entity|database|create|component|interface|package|node|folder|frame|cloud|annotation|enum|abstract\\s+class|abstract|class|state|autonumber(\\s+stop|\\s+resume|\\s+inc)?|activate|deactivate|return|destroy|newpage|alt|else|opt|loop|par|break|critical|group|box|rectangle|namespace|partition|agent|artifact|card|circle|collections|file|hexagon|label|person|queue|stack|storage|mainframe|map|repeat|backward|diamond|goto|binary|clock|concise|robust|compact\\s+concise|compact\\s+robust|json|protocol|struct|exception|metaclass|stereotype)\\b", + }, + { + comment: "whole line keywords", + name: "keyword.other.wholeline.source.wsd", + match: + "(?i)^\\s*(endswitch|split( again)?|endif|repeat|start|stop|end|end\\s+fork|end\\s+split|fork( again)?|detach|end\\s+box|top\\s+to\\s+bottom\\s+direction|left\\s+to\\s+right\\s+direction|kill|end\\s+merge|allow(_)?mixing)\\s*$", + }, + { + comment: "other keywords", + name: "keyword.other.other.source.wsd", + match: "(?i)\\b(as|{(static|abstract)\\})\\b", + }, + ], + }, + General: { + patterns: [ + { + comment: "multi-line title, enables ctrl+r jump list.", + begin: "(?i)^\\s*(title)\\s*$", + beginCaptures: { + 1: { + name: "keyword.other.title.source.wsd", + }, + }, + end: "(?i)^\\s*\\b(end\\s+title)\\b", + endCaptures: { + 1: { + name: "keyword.other.title.source.wsd", + }, + }, + patterns: [ + { + match: "(?i)^\\s*(.+?)\\s*$", + captures: { + 1: { + name: "entity.name.function.title.source.wsd", + }, + }, + }, + ], + }, + { + comment: "title, enables ctrl+r jump list.", + match: "(?i)^\\s*(title)\\s+(.+?)\\s*$", + captures: { + 1: { + name: "keyword.other.title.source.wsd", + }, + 2: { + name: "entity.name.function.title.source.wsd", + }, + }, + }, + { + comment: + "scale 1.5, scale 2/3, scale 200 width, scale 200 height, scale 200*100, scale max 300*200", + name: "keyword.other.scale.source.wsd", + match: + "(?i)^\\s*(scale)\\s+((max)\\s+)?(\\d+(\\.?\\d+)?)\\s*((([\\*/])\\s*(\\d+\\.?(\\.?\\d+)?))|(width|height))?\\s*$", + captures: { + 1: { + name: "keyword.other.scale.source.wsd", + }, + 3: { + name: "keyword.other.scale.source.wsd", + }, + 4: { + name: "constant.numeric.scale.source.wsd", + }, + 8: { + name: "keyword.operator.scale.source.wsd", + }, + 9: { + name: "constant.numeric.scale.source.wsd", + }, + 11: { + name: "keyword.other.scale.source.wsd", + }, + }, + }, + { + comment: "inline caption", + match: "(?i)^\\s*(caption)\\s+(.+)\\s*$", + captures: { + 1: { + name: "keyword.other.note.source.wsd", + }, + 2: { + name: "constant.numeric.caption.source.wsd", + }, + }, + }, + { + comment: "inline note", + match: "(?i)^\\s*(note\\s(left|right))\\s*:\\s*(.+)\\s*$", + captures: { + 1: { + name: "keyword.other.note.source.wsd", + }, + 3: { + name: "meta.comment.note.source.wsd", + }, + }, + }, + { + comment: "multiple note", + begin: "(?i)^\\s*(note\\s(left|right))\\s*$", + beginCaptures: { + 1: { + name: "keyword.other.note.source.wsd", + }, + }, + end: "(?i)^\\s*(end\\s*note)", + endCaptures: { + 1: { + name: "keyword.other.note.source.wsd", + }, + }, + patterns: [ + { + name: "meta.comment.multiple.note.source.wsd", + match: ".+?", + }, + ], + }, + { + comment: "inline note of over", + match: + '(?i)^\\s*([rh]?note)(?:\\s+(right|left|top|bottom))?\\s+(?:(?:(of|over)\\s*(?:[^\\s\\w\\d]([\\w\\s]+)[^\\s\\w\\d]|(?:(".+?"|\\w+)(?:,\\s*(".+?"|\\w+))*)))|(on\\s+link))\\s*(#\\w+)?\\s*:\\s*(.+)$', + captures: { + 1: { + name: "keyword.other.noteof.source.wsd", + }, + 2: { + name: "constant.numeric.noteof.source.wsd", + }, + 3: { + name: "keyword.other.noteof.source.wsd", + }, + 4: { + name: "support.variable.noteof.source.wsd", + }, + 5: { + name: "support.variable.noteof.source.wsd", + }, + 6: { + name: "support.variable.noteof.source.wsd", + }, + 7: { + name: "keyword.other.noteof.source.wsd", + }, + 8: { + name: "constant.numeric.noteof.source.wsd", + }, + 9: { + name: "meta.comment.noteof.source.wsd", + }, + }, + }, + { + comment: "multi-line note of over", + begin: + '(?i)^\\s*([rh]?note)(?:\\s+(right|left|top|bottom))?\\s+(?:(?:(of|over)\\s*(?:[^\\s\\w\\d]([\\w\\s]+)[^\\s\\w\\d]|(?:(".+?"|\\w+)(?:,\\s*(".+?"|\\w+))*)))|(on\\s+link))\\s*(#\\w+)?\\s*$', + beginCaptures: { + 1: { + name: "keyword.other.noteof.source.wsd", + }, + 2: { + name: "constant.numeric.noteof.source.wsd", + }, + 3: { + name: "keyword.other.noteof.source.wsd", + }, + 4: { + name: "support.variable.noteof.source.wsd", + }, + 5: { + name: "support.variable.noteof.source.wsd", + }, + 6: { + name: "support.variable.noteof.source.wsd", + }, + 7: { + name: "keyword.other.noteof.source.wsd", + }, + 8: { + name: "constant.numeric.noteof.source.wsd", + }, + }, + end: "(?i)^\\s*(end\\s*[rh]?note)", + endCaptures: { + 1: { + name: "keyword.other.multline.noteof.source.wsd", + }, + }, + patterns: [ + { + name: "meta.comment.multline.noteof.source.wsd", + match: ".+?", + }, + ], + }, + { + comment: "float note, note as", + match: '(?i)^\\s*(note)\\s+(".+?")\\s+(as)\\s+([\\w\\d]+)\\s*$', + captures: { + 1: { + name: "keyword.other.noteas.source.wsd", + }, + 2: { + name: "meta.comment.noteas.source.wsd", + }, + 3: { + name: "keyword.other.noteas.source.wsd", + }, + 4: { + name: "support.variable.noteas.source.wsd", + }, + }, + }, + { + comment: "multi-line header, legend, footer", + begin: + "(?i)^\\s*(?:(center|left|right)\\s+)?(header|legend|footer)\\s*\\n", + beginCaptures: { + 1: { + name: "constant.numeric.header_legend_footer.source.wsd", + }, + 2: { + name: "keyword.other.header_legend_footer.source.wsd", + }, + }, + end: "(?i)^\\s*(end\\s?(header|legend|footer))", + endCaptures: { + 1: { + name: "keyword.other.header_legend_footer.source.wsd", + }, + }, + patterns: [ + { + name: "meta.comment.header_legend_footer.source.wsd", + match: ".+?", + }, + ], + }, + { + comment: "header, legend, footer", + match: + "(?i)^\\s*(?:(center|left|right)\\s+)?(header|legend|footer)\\s+(.+?)\\s*$", + captures: { + 1: { + name: "constant.numeric.header_legend_footer.source.wsd", + }, + 2: { + name: "keyword.other.header_legend_footer.source.wsd", + }, + 3: { + name: "meta.comment.header_legend_footer.source.wsd", + }, + }, + }, + { + comment: "Preprocessings", + name: "entity.name.function.preprocessings.source.wsd", + match: + "(?i)(!includesub|!include|!enddefinelong|!definelong|!define|!startsub|!endsub|!ifdef|!else|!endif|!ifndef|!if|!elseif|!endif|!while|!endwhile|!(unquoted\\s|final\\s)*procedure|!(unquoted\\s|final\\s)*function|!end\\s*(function|procedure)|!return|!import|!includedef|!includeurl|!include_many|!include_once|!log|!dump_memory|!theme|!pragma|!assume\\s+transparent\\s+(dark|light))", + }, + { + comment: "links", + begin: + "(?i)((?:(?:(?:\\s+[ox]|[+*])?(?:<<|<\\|?|\\\\\\\\|\\\\|//|\\}|\\^|#|0|0\\))?)(?=[-.~=]))[-.~=]+(\\[(?:\\#(?:[0-9a-f]{6}|[0-9a-f]{3}|\\w+)(?:[-\\\\/](?:[0-9a-f]{6}|[0-9a-f]{3}|\\w+))?\\b)\\])?(?:(left|right|up|down)(?:[-.~=]))?[-.]*(?:(?:>>|\\|?>|\\\\\\\\|\\\\|//|\\{|\\^|#|0|\\(0)?(?:[ox]\\s+|[+*])?))", + beginCaptures: { + 1: { + name: "keyword.control.note.source.wsd", + }, + 2: { + name: "constant.numeric.link.color.source.wsd", + }, + 3: { + name: "constant.language.link.source.wsd", + }, + }, + end: "$", + patterns: [ + { + include: "#General", + }, + { + comment: "actor and link message", + match: "(?i):([^:]+):\\s*:(.+)$", + captures: { + 1: { + name: "support.variable.actor.link.source.wsd", + }, + 2: { + name: "meta.comment.message.link.source.wsd", + }, + }, + }, + { + comment: "link message", + match: "(?i):(.+)$", + captures: { + 1: { + name: "meta.comment.message.link.source.wsd", + }, + }, + }, + ], + }, + { + comment: "all color names", + match: "(?i)#(?:[0-9a-f]{6}|[0-9a-f]{3}|\\w+)", + name: "constant.numeric.colors.source.wsd", + }, + { + comment: "Variables", + name: "support.variable.source.wsd", + match: "\\b[\\w_]+", + }, + ], + }, + Activity: { + patterns: [ + { + comment: "if", + match: + "(?i)^\\s*(else *if|if)\\s?\\((.+?)\\)\\s?(then)(\\s?\\((.+?)\\))?\\s*$", + captures: { + 1: { + name: "keyword.other.activity.if.source.wsd", + }, + 2: { + name: "string.quoted.double.activity.if.source.wsd", + }, + 3: { + name: "keyword.other.activity.if.source.wsd", + }, + 5: { + name: "meta.comment.activity.if.source.wsd", + }, + }, + }, + { + comment: "else", + match: "(?i)^\\s*(else)(\\s?\\((.+?)\\))?\\s*$", + captures: { + 1: { + name: "keyword.other.activity.else.source.wsd", + }, + 3: { + name: "meta.comment.activity.else.source.wsd", + }, + }, + }, + { + comment: "while is, repeat while is", + match: + "(?i)^\\s*(repeat\\s+)?(while)\\s*\\((.+?)\\)(\\s*(is)(\\s*\\((.+?)\\))?)?\\s*$", + captures: { + 1: { + name: "keyword.other.activity.while.source.wsd", + }, + 2: { + name: "keyword.other.activity.while.source.wsd", + }, + 3: { + name: "string.quoted.double.activity.while.source.wsd", + }, + 5: { + name: "keyword.other.activity.while.source.wsd", + }, + 7: { + name: "meta.comment.activity.while.source.wsd", + }, + }, + }, + { + comment: "endwhile", + match: "(?i)^\\s*(end)\\s?(while)(\\s*\\((.+?)\\))?\\s*$", + captures: { + 1: { + name: "keyword.other.activity.endwhile.source.wsd", + }, + 2: { + name: "keyword.other.activity.endwhile.source.wsd", + }, + 4: { + name: "meta.comment.activity.endwhile.source.wsd", + }, + }, + }, + ], + }, + Sequence: { + patterns: [ + { + comment: "divider", + match: "(?i)^\\s*(={2,})\\s*(.+?)\\s*(={2,})\\s*$", + captures: { + 1: { + name: "keyword.operator.sequence.divider.source.wsd", + }, + 2: { + name: "string.quoted.double.sequence.divider.source.wsd", + }, + 3: { + name: "keyword.operator.sequence.divider.source.wsd", + }, + }, + }, + { + comment: "...", + match: "(?i)^\\s*(\\.{3,})\\s*$", + captures: { + 1: { + name: "keyword.operator.sequence.omission.source.wsd", + }, + }, + }, + { + comment: "inline ref", + match: "(?i)^\\s*(ref\\s+over)\\s+(.+?)\\s*:\\s*(.+)\\s*$", + captures: { + 1: { + name: "keyword.other.sequence.ref.source.wsd", + }, + 2: { + name: "support.variable.sequence.ref.source.wsd", + }, + 3: { + name: "meta.comment.sequence.ref.source.wsd", + }, + }, + }, + { + comment: "multi-line ref", + begin: "(?i)^\\s*(ref\\s+over)\\s+(.+?)\\s*$", + beginCaptures: { + 1: { + name: "keyword.other.sequence.ref.source.wsd", + }, + 2: { + name: "support.variable.sequence.ref.source.wsd", + }, + }, + end: "(?i)end\\s+ref", + endCaptures: { + 0: { + name: "keyword.other.sequence.ref.source.wsd", + }, + }, + patterns: [ + { + name: "meta.comment.sequence.ref.source.wsd", + match: ".+?", + }, + ], + }, + { + comment: "delay", + match: "(?i)^\\s*(\\.{3,})\\s*(.+)\\s*(\\.{3,})\\s*$", + captures: { + 1: { + name: "keyword.operator.sequence.delay.source.wsd", + }, + 2: { + name: "meta.comment.sequence.delay.source.wsd", + }, + 3: { + name: "keyword.operator.sequence.delay.source.wsd", + }, + }, + }, + { + comment: "space", + match: "(?i)(\\|{2,})(\\d+)?(\\|{1,})", + captures: { + 1: { + name: "keyword.operator.sequence.space.source.wsd", + }, + 2: { + name: "constant.numeric.sequence.space.source.wsd", + }, + 3: { + name: "keyword.operator.sequence.space.source.wsd", + }, + }, + }, + ], + }, + State: { + patterns: [ + { + comment: "concurrent", + match: "(?i)^\\s*(-{2,})\\s*$", + captures: { + 1: { + name: "keyword.other.state.concurrent.source.wsd", + }, + }, + }, + ], + }, + Object: { + patterns: [ + { + comment: "add object fields", + match: "(?i)^\\s*([\\w\\d_]+)\\s+:\\s+s*$", + captures: { + 1: { + name: "support.variable.object.addfields.source.wsd", + }, + 2: { + name: "meta.comment.object.addfields.source.wsd", + }, + }, + }, + ], + }, + Class: { + patterns: [ + { + comment: "class group & enum", + begin: + '(?i)^\\s*(enum|abstract\\s+class|abstract|class)\\s+([\\w\\d_\\.]+|"[^"]+")(\\s*(<<.+?>>))?(\\s+(as)\\s+([\\w\\d_\\.]+|"[^"]+")(\\s*(<<.+?>>))?)?(\\s+#(([\\w\\|\\\\\\/\\-]+)))?\\s*\\{\\s*$', + beginCaptures: { + 1: { + name: "keyword.other.class.group.source.wsd", + }, + 2: { + name: "support.variable.class.group.source.wsd", + }, + 4: { + name: "string.quoted.double.class.definition.source.wsd", + }, + 6: { + name: "keyword.other.class.group.source.wsd", + }, + 7: { + name: "support.variable.class.group.source.wsd", + }, + 9: { + name: "string.quoted.double.class.definition.source.wsd", + }, + 10: { + name: "constant.numeric.class.definition.source.wsd", + }, + }, + end: "^\\s*(?>|Stereotypes|class|interface|enum|@unlinked)(\\s+(empty fields|empty attributes|empty methods|empty description|fields|attributes|methods|members|circle))?\\s*$', + captures: { + 1: { + name: "keyword.other.class.hideshow.source.wsd", + }, + 2: { + name: "support.variable.class.hideshow.source.wsd", + }, + 5: { + name: "constant.numeric.class.hideshow.source.wsd", + }, + }, + }, + ], + }, + }, +}; +export const name = data.name; +export const scopeName = data.scopeName; +export const fileTypes = data.fileTypes; +export const patterns = data.patterns; +export const repository = data.repository; diff --git a/.vuepress/components/PageInfo.vue b/.vitepress/theme/components/PageInfo.vue similarity index 94% rename from .vuepress/components/PageInfo.vue rename to .vitepress/theme/components/PageInfo.vue index 50b13a40..207d96fd 100644 --- a/.vuepress/components/PageInfo.vue +++ b/.vitepress/theme/components/PageInfo.vue @@ -60,6 +60,7 @@ export default { }, }, mounted() { + if(import.meta.env.SSR) return; loadScript(); }, }; @@ -70,7 +71,7 @@ export default { display: inline-flex; align-items: flex-end; } -.page-info >>> .hatena-bookmark-button-frame { +.page-info ::v-deep(.hatena-bookmark-button-frame) { margin-left: 4px; } diff --git a/.vuepress/components/PageTitle.vue b/.vitepress/theme/components/PageTitle.vue similarity index 83% rename from .vuepress/components/PageTitle.vue rename to .vitepress/theme/components/PageTitle.vue index 0b5ac473..a5003150 100644 --- a/.vuepress/components/PageTitle.vue +++ b/.vitepress/theme/components/PageTitle.vue @@ -1,5 +1,5 @@ - diff --git a/.vuepress/styles/index.styl b/.vuepress/styles/index.styl deleted file mode 100644 index f70ab3fb..00000000 --- a/.vuepress/styles/index.styl +++ /dev/null @@ -1,41 +0,0 @@ -.theme-default-content:not(.custom), .page-edit, .page-nav - width 88% - max-width 1280px - -input[type="checkbox"] - zoom: 1.4 - -@media print - .navbar, .page-edit .edit-link, .sidebar - display: none - .page - padding-left: 0 - -.print-test - .navbar, .page-edit .edit-link, .sidebar - display: none - .page - padding-left: 0 - -h1, h2 - page-break-before: always - -h1, h2, h3, h4, h5, h6 - page-break-after: avoid - -.navbar .logo - max-width: 150px; - -// for IE -// IEのflex-basisのバグを回避 -// https://github.com/philipwalton/flexbugs#7-flex-basis-doesnt-account-for-box-sizingborder-box -.navbar .links .nav-links - flex-basis: auto - -// IEでinputのheightがline-heightに合わせてくれないバグを回避 -.search-box input - height: 2rem - -.lang-home - .home - max-width 740px \ No newline at end of file diff --git a/README.md b/README.md index a7cce6a1..8cd70cd4 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,34 @@ ---- -home: true -features: - - title: Readability - details: ソースコードの可読性を高く保つことで、保守性・拡張性の高いソフトウェアを作ることができます。 しかし、可読性の指標は複数あり、デベロッパーごとに判断がブレ、それぞれのスタイルで記述すると、ソフトウェア全体で見たときの可読性が下がってしまいます。 本コーディング規約は、コーディング時の判断のブレを防ぎます。 - - title: Enterprise - details: エンタープライズ領域では、社員・パートナーの方々を合わせて、数百人が同時に開発することも珍しくありません。 ちょっとした悩み、失敗も、人数が集まれば大変なコスト・リスクになります。 誰もが引っかかる落とし穴、悩みの種をあらかじめ排除します。 - - title: Performance - details: 時に読みやすいソースコードはパフォーマンス劣化を招くことがあります。 しかし、常にパフォーマンスを優先したソースコードは人間の読めないソースコードになりがちです。 今、書こうとしているソースコードが、どの程度のパフォーマンスになるのか、指標を示すことで、ソフトウェア開発プロジェクトごとに最適なソースコードを選択することができます。 -footer: ©2015 - 2024 Future Enterprise Coding Standards - Future Corporation ---- +# Future Enterprise Coding Standards + +フューチャー株式会社が作成するエンタープライズ領域に特化したコーディング規約 [![GitHub last commit](https://img.shields.io/github/last-commit/future-architect/coding-standards.svg)](https://github.com/future-architect/coding-standards) [![GitHub stars](https://img.shields.io/github/stars/future-architect/coding-standards.svg?style=social&label=Stars&logo=github)](https://github.com/future-architect/coding-standards/stargazers) -| No | コンテンツ | メモ | -| --- | ------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------- | -| 1 | [Java コーディング規約](./documents/forJava/) | | -| 2 | [SQL コーディング規約](./documents/forSQL/) | | -| 3 | [AWS インフラリソース命名規約](./documents/forAWSResource/) | | -| 4 | [OpenAPI Specification 規約](./documents/forOpenAPISpecification/) | | -| 5 | [Gitブランチフロー規約](./documents/forGitBranch/) | | -| 6 | [Markdown設計ドキュメント規約](./documents/forMarkdown/) | | +## Features + +### Readability + +ソースコードの可読性を高く保つことで、保守性・拡張性の高いソフトウェアを作ることができます。 しかし、可読性の指標は複数あり、デベロッパーごとに判断がブレ、それぞれのスタイルで記述すると、ソフトウェア全体で見たときの可読性が下がってしまいます。 本コーディング規約は、コーディング時の判断のブレを防ぎます。 + +### Enterprise + +エンタープライズ領域では、社員・パートナーの方々を合わせて、数百人が同時に開発することも珍しくありません。 ちょっとした悩み、失敗も、人数が集まれば大変なコスト・リスクになります。 誰もが引っかかる落とし穴、悩みの種をあらかじめ排除します。 + +### Performance + +時に読みやすいソースコードはパフォーマンス劣化を招くことがあります。 しかし、常にパフォーマンスを優先したソースコードは人間の読めないソースコードになりがちです。 今、書こうとしているソースコードが、どの程度のパフォーマンスになるのか、指標を示すことで、ソフトウェア開発プロジェクトごとに最適なソースコードを選択することができます。 + +## Coding Standards + +| No | コンテンツ | +| --- | ------------------------------------------------------------------ | +| 1 | [Java コーディング規約](./documents/forJava/) | +| 2 | [SQL コーディング規約](./documents/forSQL/) | +| 3 | [AWS インフラリソース命名規約](./documents/forAWSResource/) | +| 4 | [OpenAPI Specification 規約](./documents/forOpenAPISpecification/) | +| 5 | [Gitブランチフロー規約](./documents/forGitBranch/) | +| 6 | [Markdown設計ドキュメント規約](./documents/forMarkdown/) | --- @@ -28,6 +36,6 @@ footer: ©2015 - 2024 Future Enterprise Coding Standards - Future Corporation --- -# License +## License [![CC-By-4.0](https://licensebuttons.net/l/by/4.0/88x31.png)](https://creativecommons.org/licenses/by/4.0/deed.ja) diff --git a/documents/common/pandoc_styles/css/style.css b/documents/common/pandoc_styles/css/style.css index e7dcdd98..196d30cd 100644 --- a/documents/common/pandoc_styles/css/style.css +++ b/documents/common/pandoc_styles/css/style.css @@ -25,8 +25,14 @@ body { bottom: 0; overflow-y: auto; width: 300px; - transition: width, font-size, opacity 300ms, 300ms, 300ms ease-in-out, - ease-in-out, ease-in-out; + transition: + width, + font-size, + opacity 300ms, + 300ms, + 300ms ease-in-out, + ease-in-out, + ease-in-out; padding-left: 1em; box-sizing: border-box; } diff --git "a/documents/forAWSResource/AWS\343\202\244\343\203\263\343\203\225\343\203\251\343\203\252\343\202\275\343\203\274\343\202\271\345\221\275\345\220\215\350\246\217\347\264\204.md" "b/documents/forAWSResource/AWS\343\202\244\343\203\263\343\203\225\343\203\251\343\203\252\343\202\275\343\203\274\343\202\271\345\221\275\345\220\215\350\246\217\347\264\204.md" index c55f4819..e85565d4 100644 --- "a/documents/forAWSResource/AWS\343\202\244\343\203\263\343\203\225\343\203\251\343\203\252\343\202\275\343\203\274\343\202\271\345\221\275\345\220\215\350\246\217\347\264\204.md" +++ "b/documents/forAWSResource/AWS\343\202\244\343\203\263\343\203\225\343\203\251\343\203\252\343\202\275\343\203\274\343\202\271\345\221\275\345\220\215\350\246\217\347\264\204.md" @@ -7,7 +7,7 @@ meta: content: AWS,命名規約,コーディング規約 --- -# AWSインフラ命名規約 + 本コーディング規約は、世の中のシステム開発プロジェクトのために無償で提供致します。 ただし、掲載内容および利用に際して発生した問題、それに伴う損害については、フューチャー株式会社は一切の責務を負わないものとします。 @@ -834,11 +834,11 @@ IAM グループ用のポリシーを作成する例では、company を含め | Category | Tag Key | Required | Note | | ------------ | ------- | -------- | ------------------------------------------------------------------------ | -| Common | Env | ✅ | 環境識別子 | -| | System | ✅ | システム名 | -| | Name | ✅ | リソースの識別子として機能名などを設定 | -| 費用按分 | Owner | ✅ | リソースの管理主管部署。費用の負担先を想定 | -| | Project | ✅ | 開発担当チーム。どのチームがどれくらい利用したかをトレースするために設定 | +| Common | Env | ✅ | 環境識別子 | +| | System | ✅ | システム名 | +| | Name | ✅ | リソースの識別子として機能名などを設定 | +| 費用按分 | Owner | ✅ | リソースの管理主管部署。費用の負担先を想定 | +| | Project | ✅ | 開発担当チーム。どのチームがどれくらい利用したかをトレースするために設定 | | ツールで利用 | StartAt | | 起動時刻。自動化ツールなどで必要があれば設定 | | | EndAt | | 停止時刻 | diff --git a/documents/forAWSResource/README.md b/documents/forAWSResource/index.md similarity index 75% rename from documents/forAWSResource/README.md rename to documents/forAWSResource/index.md index 29e2a930..3c874230 100644 --- a/documents/forAWSResource/README.md +++ b/documents/forAWSResource/index.md @@ -1,11 +1,14 @@ --- sidebarDepth: 4 author: フューチャー株式会社 -home: true -heroText: AWSインフラ命名規約 -tagline: Future Enterprise Naming Convention Standards for AWS infrastructure resource -pageClass: lang-home -footer: ©2015 - 2023 Future Enterprise Coding Standards - Future Corporation +layout: home +hero: + name: AWSインフラ命名規約 + tagline: Future Enterprise Naming Convention Standards for AWS infrastructure resource + actions: + - theme: brand + text: AWSインフラ命名規約 + link: ./AWSインフラリソース命名規約.md --- 可読性や保守性、拡張性を考慮した [AWS インフラ命名規則](./AWSインフラリソース命名規約.md)です。 diff --git a/documents/forGitBranch/git_branch_standards.md b/documents/forGitBranch/git_branch_standards.md index e222f614..093af59f 100644 --- a/documents/forGitBranch/git_branch_standards.md +++ b/documents/forGitBranch/git_branch_standards.md @@ -7,7 +7,7 @@ meta: content: Git --- -# Gitブランチフロー規約 + 本コーディング規約は、世の中のシステム開発プロジェクトのために無償で提供致します。 @@ -43,14 +43,14 @@ meta: 本規約で想定する、ブランチの種類とその役割を説明する。 -| ブランチ名称 | 役割 | ライフサイクル | 派生元ブランチ | 命名規則 | 直プッシュ | -|-----------|-------------------|---------|------------------|---------------------------------------------------|---------| -| `main` | プロダクション環境との同期 | 永続的 | - | `main` 固定 | ❌️ | -| `feature` | 特定機能の追加/変更 | 短命 | `main`/`develop` | `feature/${チケット番号}`: 詳細は[featureブランチ](#featureブランチ) を参照 | ✅️※1 | -| `develop` | 開発の大元 | 永続的 | `main` | `develop` 固定。複数必要な場合は `develop2` と連番にする | ❌️ | -| `release` | リリース作業用途 | 短命 | `develop` | `release/${yyyymmdd}` や `release/${リリースバージョン}` など | ❌️ | -| `hotfix` | mainブランチに対する即時修正 | 短命 | `main` | `hotfix/${チケット番号}`: featureブランチに準じる | ✅️ | -| `topic` | 複数人での機能開発用途 | 短命 | `feature` | `topic/${チケット番号}`: featureブランチに準じる | ✅️ | +| ブランチ名称 | 役割 | ライフサイクル | 派生元ブランチ | 命名規則 | 直プッシュ | +| ------------ | ---------------------------- | -------------- | ----------------- | --------------------------------------------------------------------------- | ---------- | +| `main` | プロダクション環境との同期 | 永続的 | - | `main` 固定 | ❌️ | +| `feature` | 特定機能の追加/変更 | 短命 | `main`/`develop` | `feature/${チケット番号}`: 詳細は[featureブランチ](#featureブランチ) を参照 | ✅️※1 | +| `develop` | 開発の大元 | 永続的 | `main` | `develop` 固定。複数必要な場合は `develop2` と連番にする | ❌️ | +| `release` | リリース作業用途 | 短命 | `develop` | `release/${yyyymmdd}` や `release/${リリースバージョン}` など | ❌️ | +| `hotfix` | mainブランチに対する即時修正 | 短命 | `main` | `hotfix/${チケット番号}`: featureブランチに準じる | ✅️ | +| `topic` | 複数人での機能開発用途 | 短命 | `feature` | `topic/${チケット番号}`: featureブランチに準じる | ✅️ | ※1: topicブランチを利用する場合は、派生させたfeatureブランチへの直プッシュはNGとなる @@ -136,10 +136,10 @@ featureブランチで実現する機能を複数人で開発する場合に使 本規約で推奨するブランチ戦略は次の2パターンであり、これをベースとして選択する。 -| 名称 | 利用ブランチ | デフォルトブランチ | リリース作業ブランチ | 備考 | -|------------------|-------------------------------------------------------------------------|-----------|-----------|--------------------------------------------------------| -| Lite GitLab Flow
※1 | `main`
`develop`
`feature`
`topic`
`hotfix` | `develop` | `develop` | ・GitLab Flowからreleaseブランチを除いたパターン
・リリース作業時にdevelopマージを止められる場合に利用する | -| GitLab Flow | `main`
`develop`
`release`
`feature`
`topic`
`hotfix`
※2 | `develop` | `release` | ・リリース作業と開発作業が並行して行う必要があるか、
断面を指定して複数テスト環境にデプロイしたい場合に利用する | +| 名称 | 利用ブランチ | デフォルトブランチ | リリース作業ブランチ | 備考 | +| ---------------------- | ----------------------------------------------------------------------------- | ------------------ | -------------------- | ------------------------------------------------------------------------------------------------------------------ | +| Lite GitLab Flow
※1 | `main`
`develop`
`feature`
`topic`
`hotfix` | `develop` | `develop` | ・GitLab Flowからreleaseブランチを除いたパターン
・リリース作業時にdevelopマージを止められる場合に利用する | +| GitLab Flow | `main`
`develop`
`release`
`feature`
`topic`
`hotfix`
※2 | `develop` | `release` | ・リリース作業と開発作業が並行して行う必要があるか、
断面を指定して複数テスト環境にデプロイしたい場合に利用する | - ※1: 特定の呼称はないためLite GitLab FLowと命名する - ※2: 本規約では、本来のGitLab Flowの呼称である `production`を`main`、`pre production`を`release`に言い換えている @@ -148,10 +148,10 @@ featureブランチで実現する機能を複数人で開発する場合に使 各ブランチ戦略ごとに、デプロイメント環境に対応するブランチを整理する。プロダクション環境リリース前には、mainブランチでタグを打つこととする。 -| 名称 | 開発環境 | ステージング環境 | プロダクション環境 | 備考 | -|------------------|---------|----------|-----------|----------------------------------------------------------------------------------------------------------------------------------------| -| Lite GitLab Flow | develop | develop | main | ・開発環境へはdevelopマージをトリガーにCI/CDでデプロイを推奨する
・開発環境へのデプロイ漏れを防ぐため定期的にCI/CDでdevelop断面をリリースすることを推奨する
・動作確認など理由がある場合はfeatureブランチから直接開発環境へのデプロイも許容する
・ステージング環境は日次など定期的なCI/CDによるデプロイを推奨する | -| GitLab Flow | develop | release | main | ・開発環境へはdevelopマージをトリガーにCI/CDでデプロイを推奨する
・検証期間が長引きそうな場合は、PRレビュー承認後にfeatureブランチから開発環境へのデプロイを許容する | +| 名称 | 開発環境 | ステージング環境 | プロダクション環境 | 備考 | +| ---------------- | -------- | ---------------- | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Lite GitLab Flow | develop | develop | main | ・開発環境へはdevelopマージをトリガーにCI/CDでデプロイを推奨する
・開発環境へのデプロイ漏れを防ぐため定期的にCI/CDでdevelop断面をリリースすることを推奨する
・動作確認など理由がある場合はfeatureブランチから直接開発環境へのデプロイも許容する
・ステージング環境は日次など定期的なCI/CDによるデプロイを推奨する | +| GitLab Flow | develop | release | main | ・開発環境へはdevelopマージをトリガーにCI/CDでデプロイを推奨する
・検証期間が長引きそうな場合は、PRレビュー承認後にfeatureブランチから開発環境へのデプロイを許容する | # ブランチ戦略の拡張 @@ -253,10 +253,10 @@ featureブランチでの作業中に、developブランチが更新された場 - b.行単位の紐づけ(該当行の変更なし): レビューコメントが付けられた行とは別の変更を行い、強制プッシュしたときにレビューコメントの紐づけが残るかどうか。GitHubではFile chagedタブで確認 - c.行単位の紐づけ(該当行の変更あり): レビューコメントで付けられた行を修正し、強制プッシュ時の挙動。レビュー対応をしたとみなしレビューコメントのひも付きは解除されているべきである。GitHubではFile chagedタブで確認 -| サービス | a.履歴保持 | b.行単位の紐づけ(該当行の変更なし) | c.行単位の紐づけ(該当行の変更あり) | -|----------------|--------------|---------------------------------|---------------------------------| -| GitHub | 残る | 残る | 消える | -| GitLab | 残る | 残る | 消える | +| サービス | a.履歴保持 | b.行単位の紐づけ(該当行の変更なし) | c.行単位の紐づけ(該当行の変更あり) | +| -------- | ---------- | ------------------------------------ | ------------------------------------ | +| GitHub | 残る | 残る | 消える | +| GitLab | 残る | 残る | 消える | ::: @@ -515,21 +515,21 @@ git config --global alias.br branch ### General -| Category | Item | Value | Memo | -| ------------- | ---- | ----- | ---- | -| General | Require contributors to sign off on web-based commits | チェックなし | 著作権・ライセンス承諾の場合に用いるが、業務アプリ開発では不要 | -| | Default branch | develop | | -| Pull Requests | Allow merge commits | ✅️ | main <- developなどのマージ時に必要 | -| | Allow squash merging | ✅️ | develop <- feature はSquash mergeを推奨 | -| | Allow rebase merging | - | 利用しないため、チェックを外す | -| | Allow suggest updating pull request branches | ✅️ | Pull Request作成後、ベースブランチが更新された場合、ソースブランチの更新を提案してくれる | -| | Automatically delete head branches | ✅️ | マージ後にfeature branchを削除するため有効にする | -| Pushes | Limit how many branches and tags can be updated in a single push | 5 | git push origin –mirrorで誤ってリモートブランチを破壊しないようにする。推奨値の5を設定する | +| Category | Item | Value | Memo | +| ------------- | ---------------------------------------------------------------- | ------------ | ------------------------------------------------------------------------------------------ | +| General | Require contributors to sign off on web-based commits | チェックなし | 著作権・ライセンス承諾の場合に用いるが、業務アプリ開発では不要 | +| | Default branch | develop | | +| Pull Requests | Allow merge commits | ✅️ | main <- developなどのマージ時に必要 | +| | Allow squash merging | ✅️ | develop <- feature はSquash mergeを推奨 | +| | Allow rebase merging | - | 利用しないため、チェックを外す | +| | Allow suggest updating pull request branches | ✅️ | Pull Request作成後、ベースブランチが更新された場合、ソースブランチの更新を提案してくれる | +| | Automatically delete head branches | ✅️ | マージ後にfeature branchを削除するため有効にする | +| Pushes | Limit how many branches and tags can be updated in a single push | 5 | git push origin –mirrorで誤ってリモートブランチを破壊しないようにする。推奨値の5を設定する | ### Access -| Category | Item | Value | Memo | -| ------------------------ | ---- | ----- | ---- | +| Category | Item | Value | Memo | +| ----------------------- | ------------- | ---------- | ----- | | Collaborators and teams | Choose a role | 任意の権限 | ※後述 | - 各ロールの権限については、公式ドキュメントを参照 @@ -545,18 +545,18 @@ git config --global alias.br branch Branch protection rules にdevelop, mainなど永続的なブランチに保護設定を追加する。 -| Category | Item | Value | Memo | -| ------------- | ---- | ----- | ---- | -| Protect matching branches | Require a pull request before merging | ✅️ | プルリクエストを必須とする | -| | Require approvals | ✅️ | レビューを必須とする | -| | Required number of approvals before merging | 1 | 最低1名以上の承認を必須とする | -| | Dismiss stale pull request approvals when new commits are pushed | - | レビュー承認後のPushで再承認を必要とするかだが、レビュー運用上に支障となることも多く、チェックを外す | -| | Require status checks to pass before merging | ✅️ | CIの成功を条件とする | -| | Require branches to be up to date before merging | 任意 | CIパイプラインのワークフロー名を指定 | -| | Require conversation resolution before merging | ✅️ | レビューコメントがすべて解決していることを条件とする | -| | Require signed commits | ✅️ | 署名付きコミットを必須化し、セキュアな設定にする | -| | Require linear history | ✅️/- | mainブランチの場合はOFFとするが、developの場合はSquash mergeを求めるため有効にする | -| | Do not allow bypassing the above settings | ✅️ | パイパスを許容しない | +| Category | Item | Value | Memo | +| ------------------------- | ---------------------------------------------------------------- | ----- | ---------------------------------------------------------------------------------------------------- | +| Protect matching branches | Require a pull request before merging | ✅️ | プルリクエストを必須とする | +| | Require approvals | ✅️ | レビューを必須とする | +| | Required number of approvals before merging | 1 | 最低1名以上の承認を必須とする | +| | Dismiss stale pull request approvals when new commits are pushed | - | レビュー承認後のPushで再承認を必要とするかだが、レビュー運用上に支障となることも多く、チェックを外す | +| | Require status checks to pass before merging | ✅️ | CIの成功を条件とする | +| | Require branches to be up to date before merging | 任意 | CIパイプラインのワークフロー名を指定 | +| | Require conversation resolution before merging | ✅️ | レビューコメントがすべて解決していることを条件とする | +| | Require signed commits | ✅️ | 署名付きコミットを必須化し、セキュアな設定にする | +| | Require linear history | ✅️/- | mainブランチの場合はOFFとするが、developの場合はSquash mergeを求めるため有効にする | +| | Do not allow bypassing the above settings | ✅️ | パイパスを許容しない | developブランチに対し「require linear history」を選択することを推奨することで、「Create a merge commit」が選択できないようにする。 @@ -566,24 +566,24 @@ developブランチに対し「require linear history」を選択することを #### Tags -| Category | Item | Value | Memo | -| ------------- | ---- | ----- | ---- | -| | Protect tags | v[0-9]+.[0-9]+.[0-9] | セマンティックバージョニングに則ったタグのみ、削除を防ぐ | +| Category | Item | Value | Memo | +| -------- | ------------ | -------------------- | -------------------------------------------------------- | +| | Protect tags | v[0-9]+.[0-9]+.[0-9] | セマンティックバージョニングに則ったタグのみ、削除を防ぐ | #### GitHub Actions -| Category | Item | Value | Memo | -| ------------- | ---- | ----- | ---- | -| Actions permissions | Allow asset-taskforce, and select non-asset-taskforce, actions and reusable workflows > Allow actions created by GitHub | ✅️ | | -| | Allow asset-taskforce, and select non-asset-taskforce, actions and reusable workflows > Allow actions Marketplace verified creators | ✅️ | | +| Category | Item | Value | Memo | +| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----- | ---- | +| Actions permissions | Allow asset-taskforce, and select non-asset-taskforce, actions and reusable workflows > Allow actions created by GitHub | ✅️ | | +| | Allow asset-taskforce, and select non-asset-taskforce, actions and reusable workflows > Allow actions Marketplace verified creators | ✅️ | | #### Code security and analysis -| Category | Item | Value | Memo | -| ------------- | ---- | ----- | ---- | -| Dependabot | Dependabot alerts | ✅️ | 依存パッケージのアップデートを検知するため | -| | Dependabot security updates | ✅️ | | -| | Dependabot version updates | ✅️ | | +| Category | Item | Value | Memo | +| ---------- | --------------------------- | ----- | ------------------------------------------ | +| Dependabot | Dependabot alerts | ✅️ | 依存パッケージのアップデートを検知するため | +| | Dependabot security updates | ✅️ | | +| | Dependabot version updates | ✅️ | | ## GitLab推奨設定 @@ -597,11 +597,11 @@ developブランチに対し「require linear history」を選択することを チーム開発において開発環境がWindows/Macなど複数存在することは少なくなく、また、Gitリポジトリ上の改行コードは統一した方が余計な差分が生じず扱いやすくなる。このときよく用いるのが、 `core.autocrlf` という設定である。 -| 名称 | 設定値 | チェックアウト時の挙動 | コミット時の挙動 | -| -- | -- | --- | -- | -| core.autocrlf | true | 改行コードをCRLFに変換 | 改行コードをLFに変換 | -| | input | 何もしない | 改行コードをLFに変換 | -| | false | 何もしない | 何もしない | +| 名称 | 設定値 | チェックアウト時の挙動 | コミット時の挙動 | +| ------------- | ------ | ---------------------- | -------------------- | +| core.autocrlf | true | 改行コードをCRLFに変換 | 改行コードをLFに変換 | +| | input | 何もしない | 改行コードをLFに変換 | +| | false | 何もしない | 何もしない | 特にWindowsでの開発者の作業ミスを防ぐため、 `git config --global core.autocrlf input` のような設定を行うチームも多い。 diff --git a/documents/forGitBranch/README.md b/documents/forGitBranch/index.md similarity index 77% rename from documents/forGitBranch/README.md rename to documents/forGitBranch/index.md index a3855f7f..8319109c 100644 --- a/documents/forGitBranch/README.md +++ b/documents/forGitBranch/index.md @@ -1,11 +1,14 @@ --- sidebarDepth: 4 author: フューチャー株式会社 -home: true -heroText: Gitブランチフロー規約 -tagline: Future Enterprise Standards for Git branch flow -pageClass: lang-home -footer: ©2015 - 2024 Future Enterprise Coding Standards - Future Corporation +layout: home +hero: + name: Gitブランチフロー規約 + tagline: Future Enterprise Standards for Git branch flow + actions: + - theme: brand + text: Gitブランチフロー規約 + link: ./git_branch_standards.md --- # Gitブランチフロー規約 diff --git a/documents/forJava/README.md b/documents/forJava/index.md similarity index 80% rename from documents/forJava/README.md rename to documents/forJava/index.md index d1e1365f..b1ed21dd 100644 --- a/documents/forJava/README.md +++ b/documents/forJava/index.md @@ -1,15 +1,17 @@ --- sidebarDepth: 4 author: フューチャー株式会社 -home: true -heroText: Javaコーディング規約 -tagline: Future Enterprise Coding Standards for Java -actionText: Javaコーディング規約 (for Java17) -actionLink: ./Javaコーディング規約.html -pageClass: lang-home -footer: ©2015 - 2023 Future Enterprise Coding Standards - Future Corporation -layout: HomeWithImg -heroImage: /images/JBee.png +layout: home +hero: + name: Javaコーディング規約 + tagline: Future Enterprise Coding Standards for Java + image: + src: /images/JBee.png + alt: Logo + actions: + - theme: brand + text: Javaコーディング規約 (for Java17) + link: ./Javaコーディング規約.md --- 一般的に行われているコーディング規約から、Stream API やラムダ式、最新の Java17 で追加された構文にも対応しています。 diff --git "a/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/README.md" "b/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/README.md" deleted file mode 100644 index 3f97a395..00000000 --- "a/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/README.md" +++ /dev/null @@ -1,21 +0,0 @@ -# 画面 - -* [Figma URL](https://www.figma.com/design/kLgdi4xdGRpQudMEoZYwvq/%E3%80%90FMP%E3%80%91Future-Muscle-Partner_%E7%94%BB%E9%9D%A2%E3%83%87%E3%82%B6%E3%82%A4%E3%83%B3?node-id=0-1&t=WUJH1mSc5HgzhHcH-1) - -## 標準画面 - -| ID | 論理名 | 備考 | -|--------------|----------|----| -| [UIS01](UIS01) | トップページ | | -| [UIS02](UIS02) | マイページ | | -| [UIS03](UIS03) | トレーナー一覧 | | -| [UIS04](UIS04) | トレーナー詳細 | | - -## モーダル画面 - -| ID | 論理名 | 備考 | -|--------------|----------|----| -| [UIM01](UIM01) | ログイン | | -| [UIM02](UIM02) | トレーナー検索 | | -| [UIM03](UIM03) | カレンダー予約 | | -| [UIM04](UIM04) | 決済 | | diff --git "a/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIM01/README.md" "b/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIM01/index.md" similarity index 68% rename from "documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIM01/README.md" rename to "documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIM01/index.md" index efbb0e43..7340e793 100644 --- "a/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIM01/README.md" +++ "b/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIM01/index.md" @@ -15,11 +15,11 @@ ## イベント概要 -| No | イベント名 | イベント分類 | 処理説明 | -|----|--------|--------|------| -| 1 | 初期表示 | 初期表示 | | -| 2 | ログインする | ボタン押下 | | -| 3 | 会員登録 | ボタン押下 | | +| No | イベント名 | イベント分類 | 処理説明 | +| --- | ------------ | ------------ | -------- | +| 1 | 初期表示 | 初期表示 | | +| 2 | ログインする | ボタン押下 | | +| 3 | 会員登録 | ボタン押下 | | ## イベント詳細 @@ -31,8 +31,8 @@ 利用API: -| ID | URL | Parameter | -|--------|-------------|-------------| +| ID | URL | Parameter | +| ------ | ----------- | ---------------------- | | API001 | POST /login | 入力フォームの値を取得 | 画面表示制御: @@ -42,7 +42,7 @@ - HTTPステータスが500系 - メッセージID(MSG_BIZ_111)表示 - HTTPステータスが200 - - [UIS02](../UIS02)に遷移 + - [UIS02](../UIS02/index.md)に遷移 ### 3. 会員登録 diff --git "a/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIM02/README.md" "b/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIM02/index.md" similarity index 75% rename from "documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIM02/README.md" rename to "documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIM02/index.md" index 9b79850e..d56b5cd1 100644 --- "a/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIM02/README.md" +++ "b/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIM02/index.md" @@ -17,10 +17,10 @@ ## イベント概要 -| No | イベント名 | イベント分類 | 処理説明 | -|----|-------|--------|------| -| 1 | 初期表示 | 初期表示 | | -| 2 | 検索 | ボタン押下 | | +| No | イベント名 | イベント分類 | 処理説明 | +| --- | ---------- | ------------ | -------- | +| 1 | 初期表示 | 初期表示 | | +| 2 | 検索 | ボタン押下 | | ## イベント詳細 @@ -32,8 +32,8 @@ 利用API: -| ID | URL | Parameter | -|--------|---------------|---------------------------| +| ID | URL | Parameter | +| ------ | ------------- | -------------------------------------------------- | | API007 | GET /trainers | モーダルに指定された値をクエリパラメータに設定する | 画面表示制御: @@ -45,4 +45,4 @@ - HTTPステータスが200以外 - メッセージID(MSG_BIZ_111)表示 - HTTPステータスが200 - - [UIS03](../UIS03)に遷移 + - [UIS03](../UIS03/index.md)に遷移 diff --git "a/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIM03/README.md" "b/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIM03/index.md" similarity index 59% rename from "documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIM03/README.md" rename to "documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIM03/index.md" index 4fe2ec4c..27772a51 100644 --- "a/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIM03/README.md" +++ "b/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIM03/index.md" @@ -15,11 +15,11 @@ ## イベント概要 -| No | イベント名 | イベント分類 | 処理説明 | -|----|-------|-----------------|-----------------------------------| -| 1 | 初期表示 | 初期表示 | 指定されたトレーナーと、ログイン中のトレーニーのスケジュールを表示 | -| 2 | 日時設定 | カレンダーを選択 | ドラッグ&ドロップで範囲指定 | -| 3 | 日時指定 | 設定された日時で予約を指定する | | +| No | イベント名 | イベント分類 | 処理説明 | +| --- | ---------- | ------------------------------ | ------------------------------------------------------------------ | +| 1 | 初期表示 | 初期表示 | 指定されたトレーナーと、ログイン中のトレーニーのスケジュールを表示 | +| 2 | 日時設定 | カレンダーを選択 | ドラッグ&ドロップで範囲指定 | +| 3 | 日時指定 | 設定された日時で予約を指定する | | ## イベント詳細 @@ -28,14 +28,14 @@ 起動パラメータ: | Name | Value | Memo | -|------------|-------------------------------|------| +| ---------- | ----------------------------- | ---- | | trainer_id | {"trainer_id":""} | | | trainee_id | {"trainee_id":""} | | 利用API: -| ID | URL | Parameter | -|--------|-------------------------------------|------------| +| ID | URL | Parameter | +| ------ | ----------------------------------- | -------------------- | | API011 | GET /trainers/{trainer_id}/schedule | 初期パラメータを設定 | | API013 | GET /bookings/{trainee_id} | 初期パラメータを設定 | @@ -54,4 +54,4 @@ ### 3. 日時指定 -[UIM04](../UIM04) を起動する。 +[UIM04](../UIM04/index.md) を起動する。 diff --git "a/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIM04/README.md" "b/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIM04/index.md" similarity index 60% rename from "documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIM04/README.md" rename to "documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIM04/index.md" index 02798414..ec63fc21 100644 --- "a/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIM04/README.md" +++ "b/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIM04/index.md" @@ -16,11 +16,11 @@ ## イベント概要 -| No | イベント名 | イベント分類 | 処理説明 | -|----|---------|--------|-----------| -| 1 | 初期表示 | 初期表示 | | -| 2 | 日時指定に戻る | ボタン押下 | UIM003に遷移 | -| 2 | 決済する | ボタン押下 | | +| No | イベント名 | イベント分類 | 処理説明 | +| --- | -------------- | ------------ | ------------ | +| 1 | 初期表示 | 初期表示 | | +| 2 | 日時指定に戻る | ボタン押下 | UIM003に遷移 | +| 2 | 決済する | ボタン押下 | | ## イベント詳細 @@ -29,19 +29,19 @@ 起動パラメータ: | Name | Value | Memo | -|------------|-------------------------------|------| +| ---------- | ----------------------------- | ---- | | trainer_id | {"trainer_id":""} | | -| menu_id | {"menu_id":""} | | +| menu_id | {"menu_id":""} | | 利用API: -| ID | URL | Parameter | -|--------|---------------|---------------------------| +| ID | URL | Parameter | +| ------ | ------------------------ | -------------------- | | APIxxx | トレーニングメニュー取得 | 初期パラメータを設定 | ### 2. 日時指定に戻る -[UIM03](../UIM03)に遷移 +[UIM03](../UIM03/index.md)に遷移 ### 3. 決済 diff --git "a/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIS01/README.md" "b/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIS01/index.md" similarity index 58% rename from "documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIS01/README.md" rename to "documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIS01/index.md" index 2ba94178..93f49b26 100644 --- "a/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIS01/README.md" +++ "b/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIS01/index.md" @@ -15,11 +15,11 @@ ## イベント概要 -| No | イベント名 | イベント分類 | 処理説明 | -|----|-----------|--------|-------------------------------------| -| 1 | 初期表示 | 初期表示 | ログイン済みである場合、「会員登録/ログイン」が「マイページ」に変わる | -| 2 | トレーナーを探す | ボタン押下 | パーソナルトレーナー検索モーダル起動 | -| 3 | 会員登録/ログイン | ボタン押下 | ログインモーダル起動 | +| No | イベント名 | イベント分類 | 処理説明 | +| --- | ------------------ | ------------ | ---------------------------------------------------------------------- | +| 1 | 初期表示 | 初期表示 | ログイン済みである場合、「会員登録/ログイン」が「マイページ」に変わる | +| 2 | トレーナーを探す | ボタン押下 | パーソナルトレーナー検索モーダル起動 | +| 3 | 会員登録/ログイン | ボタン押下 | ログインモーダル起動 | ## イベント詳細 @@ -27,8 +27,8 @@ 起動パラメータ: -| Name | Value | Memo | -|-----------|-------------------------|--------| +| Name | Value | Memo | +| --------- | ----------------------- | ------------ | | userState | {"user_id":""} | ログイン状態 | 初期表示イベント: @@ -38,7 +38,7 @@ 利用API: | ID | URL | Parameter | -|---------|---------------------------|------------------------------| +| ------- | ------------------------- | ---------------------------- | | API-005 | GET /profile/{trainee_id} | trainee_id=userState.user_id | 画面表示制御: @@ -56,8 +56,8 @@ ### 2. トレーナーを探す -[UIM002](../UIM02) 呼び出し +[UIM002](../UIM02/index.md) 呼び出し ### 3. 会員登録/ログイン -[UIM001](../UI001) 呼び出し +[UIM001](../UIM01/index.md) 呼び出し diff --git "a/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIS02/README.md" "b/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIS02/index.md" similarity index 65% rename from "documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIS02/README.md" rename to "documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIS02/index.md" index 2e33e57e..f5d4f208 100644 --- "a/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIS02/README.md" +++ "b/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIS02/index.md" @@ -15,12 +15,12 @@ ## イベント概要 -| No | イベント名 | イベント分類 | 処理説明 | -|----|----------|--------|--------------------------------| -| 1 | 初期表示 | 初期表示 | 初期検索条件に従いAPIを実行し、履歴表示する | -| 2 | トレーナーを探す | ボタン押下 | パーソナルトレーナー検索モーダル起動 | -| 3 | 受講完了確認 | ボタン押下 | 予約済みトレーニングを受講完了に切り替えるためのモーダル起動 | -| 4 | 受講完了 | ボタン押下 | 予約済みトレーニングを完了済みのトレーニングに更新 | +| No | イベント名 | イベント分類 | 処理説明 | +| --- | ---------------- | ------------ | ------------------------------------------------------------ | +| 1 | 初期表示 | 初期表示 | 初期検索条件に従いAPIを実行し、履歴表示する | +| 2 | トレーナーを探す | ボタン押下 | パーソナルトレーナー検索モーダル起動 | +| 3 | 受講完了確認 | ボタン押下 | 予約済みトレーニングを受講完了に切り替えるためのモーダル起動 | +| 4 | 受講完了 | ボタン押下 | 予約済みトレーニングを完了済みのトレーニングに更新 | ## イベント詳細 @@ -28,8 +28,8 @@ 起動パラメータ: -| Name | Value | Memo | -|-----------|-------------------------|--------| +| Name | Value | Memo | +| --------- | ----------------------- | ------------ | | userState | {"user_id":""} | ログイン状態 | 初期表示イベント: @@ -39,7 +39,7 @@ 利用API: | ID | URL | Parameter | -|---------|---------------------------|------------------------------| +| ------- | ------------------------- | ---------------------------- | | API-005 | GET /profile/{trainee_id} | trainee_id=userState.user_id | 画面表示制御: @@ -52,7 +52,7 @@ 利用API: | ID | URL | Parameter | -|--------|----------------------------|------------------------------| +| ------ | -------------------------- | ---------------------------- | | API013 | GET /bookings/{trainee_id} | trainee_id=userState.user_id | 画面表示制御: @@ -64,7 +64,7 @@ ### 2. トレーナーを探す -[UIM002](../UIM002) を起動。 +[UIM002](../UIM02/index.md) を起動。 ### 3. 受講完了確認 @@ -78,8 +78,8 @@ 利用API: -| ID | URL | Parameter | -|---------|----------------------------------|-----------------| +| ID | URL | Parameter | +| ------ | -------------------------------- | ---------------------------- | | API016 | PUT /booking/{booking_id}/status | 選択されたトレーニング予約ID | 画面表示制御: @@ -94,7 +94,7 @@ 利用API: | ID | URL | Parameter | -|---------|----------------------------|------------------------------| +| ------- | -------------------------- | ---------------------------- | | API-012 | GET /bookings/{trainee_id} | trainee_id=userState.user_id | 画面表示制御: diff --git "a/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIS03/README.md" "b/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIS03/index.md" similarity index 68% rename from "documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIS03/README.md" rename to "documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIS03/index.md" index 6cc0529b..7344e0de 100644 --- "a/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIS03/README.md" +++ "b/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIS03/index.md" @@ -16,11 +16,11 @@ ## イベント概要 -| No | イベント名 | イベント分類 | 処理説明 | -|----|---------|--------|-----------------------| -| 1 | 初期表示 | 初期表示 | 検索条件に従いAPIを実行し、一覧表示する | -| 2 | トレーナー詳細 | ボタン押下 | UIS04に遷移 | -| 3 | トレーナー検索 | ボタン押下 | 入力された条件で検索 | +| No | イベント名 | イベント分類 | 処理説明 | +| --- | -------------- | ------------ | --------------------------------------- | +| 1 | 初期表示 | 初期表示 | 検索条件に従いAPIを実行し、一覧表示する | +| 2 | トレーナー詳細 | ボタン押下 | UIS04に遷移 | +| 3 | トレーナー検索 | ボタン押下 | 入力された条件で検索 | ## イベント詳細 @@ -28,8 +28,8 @@ 利用API: -| ID | URL | Parameter | -|--------|---------------|--------------------------------------------| +| ID | URL | Parameter | +| ------ | ------------- | ------------------------------------------------------------------- | | API007 | GET /trainers | favorite_gym_nameなど、各クエリパラメータ指定されたパラメータを設定 | 画面表示制御: @@ -43,7 +43,7 @@ ### 2. トレーナー詳細 -[UIS04](../UIS04)に遷移 +[UIS04](../UIS04/index.md)に遷移 ### 3. トレーナー検索 diff --git "a/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIS04/README.md" "b/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIS04/index.md" similarity index 65% rename from "documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIS04/README.md" rename to "documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIS04/index.md" index be04c6a2..270a3c54 100644 --- "a/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIS04/README.md" +++ "b/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIS04/index.md" @@ -15,10 +15,10 @@ ## イベント概要 -| No | イベント名 | イベント分類 | 処理説明 | -|----|-------------|--------|-------------------------| -| 1 | 初期表示 | 初期表示 | 初期検索条件に従いAPIを実行し、履歴表示する | -| 2 | トレーニングコース決定 | ボタン押下 | 予約のためカレンダーモーダルを起動 | +| No | イベント名 | イベント分類 | 処理説明 | +| --- | ---------------------- | ------------ | ------------------------------------------- | +| 1 | 初期表示 | 初期表示 | 初期検索条件に従いAPIを実行し、履歴表示する | +| 2 | トレーニングコース決定 | ボタン押下 | 予約のためカレンダーモーダルを起動 | ## イベント詳細 @@ -27,13 +27,13 @@ 起動パラメータ: | Name | Value | Memo | -|------------|-------------------------------|------| +| ---------- | ----------------------------- | ---- | | trainer_id | {"trainer_id":""} | | 利用API: -| ID | URL | Parameter | -|--------|---------------|--------------------------------------------| +| ID | URL | Parameter | +| ------ | ---------------------------------- | -------------------- | | API009 | GET /trainers/{trainer_id}/profile | 起動パラメータを設定 | 画面表示制御: @@ -46,8 +46,8 @@ 利用API: -| ID | URL | Parameter | -|--------|----------------------------------|------------| +| ID | URL | Parameter | +| ------ | -------------------------------- | -------------------- | | API008 | GET /trainers/{trainer_id}/menus | 起動パラメータを設定 | 画面表示制御: @@ -61,8 +61,8 @@ 利用API: -| ID | URL | Parameter | -|--------|--------------------------------|------------| +| ID | URL | Parameter | +| ------ | ------------------------------ | -------------------- | | API010 | /trainers/{trainer_id}/reviews | 起動パラメータを設定 | 画面表示制御: @@ -75,4 +75,4 @@ ### 2. トレーニングコース決定 -[UIM03](../UIM03) を起動する。 +[UIM03](../UIM03/index.md) を起動する。 diff --git "a/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/index.md" "b/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/index.md" new file mode 100644 index 00000000..0447d0ef --- /dev/null +++ "b/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/index.md" @@ -0,0 +1,21 @@ +# 画面 + +* [Figma URL](https://www.figma.com/design/kLgdi4xdGRpQudMEoZYwvq/%E3%80%90FMP%E3%80%91Future-Muscle-Partner_%E7%94%BB%E9%9D%A2%E3%83%87%E3%82%B6%E3%82%A4%E3%83%B3?node-id=0-1&t=WUJH1mSc5HgzhHcH-1) + +## 標準画面 + +| ID | 論理名 | 備考 | +| ------------------------- | -------------- | ---- | +| [UIS01](./UIS01/index.md) | トップページ | | +| [UIS02](./UIS02/index.md) | マイページ | | +| [UIS03](./UIS03/index.md) | トレーナー一覧 | | +| [UIS04](./UIS04/index.md) | トレーナー詳細 | | + +## モーダル画面 + +| ID | 論理名 | 備考 | +| ------------------------- | -------------- | ---- | +| [UIM01](./UIM01/index.md) | ログイン | | +| [UIM02](./UIM02/index.md) | トレーナー検索 | | +| [UIM03](./UIM03/index.md) | カレンダー予約 | | +| [UIM04](./UIM04/index.md) | 決済 | | diff --git a/documents/forMarkdown/future_muscle_partner/docs/02_WebAPI/README.md b/documents/forMarkdown/future_muscle_partner/docs/02_WebAPI/index.md similarity index 100% rename from documents/forMarkdown/future_muscle_partner/docs/02_WebAPI/README.md rename to documents/forMarkdown/future_muscle_partner/docs/02_WebAPI/index.md diff --git "a/documents/forMarkdown/future_muscle_partner/docs/03_\343\203\207\343\203\274\343\202\277/README.md" "b/documents/forMarkdown/future_muscle_partner/docs/03_\343\203\207\343\203\274\343\202\277/README.md" deleted file mode 100644 index 7a415556..00000000 --- "a/documents/forMarkdown/future_muscle_partner/docs/03_\343\203\207\343\203\274\343\202\277/README.md" +++ /dev/null @@ -1,5 +0,0 @@ -# テーブル一覧 - -[A5:SQL Mk-2](https://a5m2.mmatsubara.com/) で管理している。 - -- [erd.a5er](erd.a5er) を参照 diff --git "a/documents/forMarkdown/future_muscle_partner/docs/03_\343\203\207\343\203\274\343\202\277/index.md" "b/documents/forMarkdown/future_muscle_partner/docs/03_\343\203\207\343\203\274\343\202\277/index.md" new file mode 100644 index 00000000..1d2d0ff2 --- /dev/null +++ "b/documents/forMarkdown/future_muscle_partner/docs/03_\343\203\207\343\203\274\343\202\277/index.md" @@ -0,0 +1,5 @@ +# テーブル一覧 + +[A5:SQL Mk-2](https://a5m2.mmatsubara.com/) で管理している。 + +- [erd.a5er](https://github.com/future-architect/coding-standards/raw/gh-pages/example-resources/erd.a5er) を参照 diff --git a/documents/forMarkdown/future_muscle_partner/docs/README.md b/documents/forMarkdown/future_muscle_partner/docs/README.md index c88223f9..08b1a375 100644 --- a/documents/forMarkdown/future_muscle_partner/docs/README.md +++ b/documents/forMarkdown/future_muscle_partner/docs/README.md @@ -15,23 +15,23 @@ docs ## 設計書 -- [01_画面](01_画面) -- [02_WebAPI](02_WebAPI) -- [03_データ](03_データ) +- [01_画面](./01_画面/index.md) +- [02_WebAPI](./02_WebAPI/index.md) +- [03_データ](./03_データ/index.md) ## コード体系 機能IDのコード体系は以下に従う。 -| 種別 | 種別 | 例 | 備考 | -|-----|------------|-------------|----------------------| -| UIS | 通常画面 | UIS01、UIS02 | UI Standard から | -| UIM | モーダル画面 | UIM01、UIM02 | UI Mordal から | -| API | Web API | API01、API02 | | -| IFS | システムI/F 送信 | IFS01、IFS02 | InterFace Send から | -| IFR | システムI/F 受信 | IFR01、IFR02 | InterFace Receive から | -| BAT | バッチ | BAT01、BAT02 | BATch から | -| RPT | 帳票 | RPT01、RPT02 | RePorT から | +| 種別 | 種別 | 例 | 備考 | +| ---- | ---------------- | ------------ | ---------------------- | +| UIS | 通常画面 | UIS01、UIS02 | UI Standard から | +| UIM | モーダル画面 | UIM01、UIM02 | UI Mordal から | +| API | Web API | API01、API02 | | +| IFS | システムI/F 送信 | IFS01、IFS02 | InterFace Send から | +| IFR | システムI/F 受信 | IFR01、IFR02 | InterFace Receive から | +| BAT | バッチ | BAT01、BAT02 | BATch から | +| RPT | 帳票 | RPT01、RPT02 | RePorT から | コード体系について補足: diff --git a/documents/forMarkdown/future_muscle_partner/README.md b/documents/forMarkdown/future_muscle_partner/index.md similarity index 97% rename from documents/forMarkdown/future_muscle_partner/README.md rename to documents/forMarkdown/future_muscle_partner/index.md index b57ac093..08606944 100644 --- a/documents/forMarkdown/future_muscle_partner/README.md +++ b/documents/forMarkdown/future_muscle_partner/index.md @@ -33,4 +33,4 @@ ## 設計書 -[docs](docs) を参照。 +[docs](docs/README.md) を参照。 diff --git a/documents/forMarkdown/README.md b/documents/forMarkdown/index.md similarity index 90% rename from documents/forMarkdown/README.md rename to documents/forMarkdown/index.md index cb389212..c943c755 100644 --- a/documents/forMarkdown/README.md +++ b/documents/forMarkdown/index.md @@ -1,11 +1,10 @@ --- sidebarDepth: 4 author: フューチャー株式会社 -home: true -heroText: Markdown設計ドキュメント規約 -tagline: Future Enterprise Markdown Design Document Standards -pageClass: lang-home -footer: ©2015 - 2024 Future Enterprise Coding Standards - Future Corporation +layout: home +hero: + name: 'Markdown設計ドキュメント規約' + tagline: Future Enterprise Markdown Design Document Standards --- Markdown ベースの設計ドキュメントの規約をまとめる。 @@ -129,7 +128,7 @@ diagrams.netの場合は、拡張子は以下のいずれかで作成する。 - Markdown設計書には、Figmaで判断可能な見た目の情報は **記載しない** - Markdown設計書には、Web APIの呼び出しやイベントの定義、パラメータの受け渡し、バリデーションロジックなどを定義する。 -[サンプル設計書](future_muscle_partner)を参考にする。 +[サンプル設計書](./future_muscle_partner/index.md)を参考にする。 ## バックエンド @@ -166,17 +165,17 @@ Web APIについても、プログラム設計書(バッチ、非同期タス #### Web API応答例 -| Parameter | Description | Settings | Note | -|-----------------|-------------|----------|------| -| last_name | 氏名 (姓) | m_user | | -| first_name | 氏名 (名) | m_user | | -| last_name_kana | 氏名カナ (姓) | m_user | | -| first_name_kana | 氏名カナ (名) | m_user | | -| date_of_birth | 生年月日 | m_user_detail | | -| gender_type | 性別区分 | m_user_detail | | -| tel | 電話番号 | m_user_detail | | -| occupation_type | 職業区分 | m_user_detail | | -| zipcode | 郵便番号 | m_user_detail | | +| Parameter | Description | Settings | Note | +| --------------- | ------------- | ------------- | ---- | +| last_name | 氏名 (姓) | m_user | | +| first_name | 氏名 (名) | m_user | | +| last_name_kana | 氏名カナ (姓) | m_user | | +| first_name_kana | 氏名カナ (名) | m_user | | +| date_of_birth | 生年月日 | m_user_detail | | +| gender_type | 性別区分 | m_user_detail | | +| tel | 電話番号 | m_user_detail | | +| occupation_type | 職業区分 | m_user_detail | | +| zipcode | 郵便番号 | m_user_detail | | ※Descriptionは `openapi.yaml` 側の `description` で記載済みであれば、省略すること ※Noteは何かしら加工処理により生み出された項目であれば、計算ロジックを記載する diff --git a/documents/forOpenAPISpecification/README.md b/documents/forOpenAPISpecification/index.md similarity index 81% rename from documents/forOpenAPISpecification/README.md rename to documents/forOpenAPISpecification/index.md index c07ef6de..1e2739ee 100644 --- a/documents/forOpenAPISpecification/README.md +++ b/documents/forOpenAPISpecification/index.md @@ -1,11 +1,17 @@ --- sidebarDepth: 4 author: フューチャー株式会社 -home: true -heroText: OpenAPI Specification規約 -tagline: Future Enterprise Naming Convention Standards for OpenAPI Specification -pageClass: lang-home -footer: ©2015 - 2023 Future Enterprise Coding Standards - Future Corporation +layout: home +hero: + name: 'OpenAPI Specification規約' + tagline: Future Enterprise Naming Convention Standards for OpenAPI Specification + actions: + - theme: brand + text: OAS 3.0.3 規約 + link: ./OpenAPI_Specification_3.0.3.md + - theme: brand + text: OAS 2.0(Swagger 2.0)規約 + link: ./OpenAPI_Specification_2.0.md --- OpenAPI Specification(OAS)の規約を、設計・開発・テスト・可読性・保守性・ツールによるコード生成や静的解析の観点からまとめています。 @@ -38,10 +44,10 @@ OAS は次のように複数のバージョンが存在します。 # OpenAPI Specification Standards -| Version | コーディング規約 | -|---------|--------------------------------------------------------| -| 3.0.3 | [OAS 3.0.3 規約](OpenAPI_Specification_3.0.3.md) | -| 2.0 | [OAS 2.0(Swagger 2.0)規約](OpenAPI_Specification_2.0.md) | +| Version | コーディング規約 | +| ------- | ------------------------------------------------------------ | +| 3.0.3 | [OAS 3.0.3 規約](./OpenAPI_Specification_3.0.3.md) | +| 2.0 | [OAS 2.0(Swagger 2.0)規約](./OpenAPI_Specification_2.0.md) | # Resources diff --git a/documents/forSQL/README.md b/documents/forSQL/index.md similarity index 80% rename from documents/forSQL/README.md rename to documents/forSQL/index.md index 63cf011d..5e22c00c 100644 --- a/documents/forSQL/README.md +++ b/documents/forSQL/index.md @@ -1,11 +1,17 @@ --- sidebarDepth: 4 author: フューチャー株式会社 -home: true -heroText: SQLコーディング規約 -tagline: Future Enterprise Coding Standards for SQL -pageClass: lang-home -footer: ©2015 - 2023 Future Enterprise Coding Standards - Future Corporation +layout: home +hero: + name: SQLコーディング規約 + tagline: Future Enterprise Coding Standards for SQL + actions: + - theme: brand + text: SQLコーディング規約(PostgreSQL) + link: ./SQLコーディング規約(PostgreSQL).md + - theme: brand + text: SQLコーディング規約(Oracle) + link: ./SQLコーディング規約(Oracle).md --- 可読性や保守性、拡張性、SQL 性能を考慮したコーディング規約をまとめています @@ -14,21 +20,21 @@ footer: ©2015 - 2023 Future Enterprise Coding Standards - Future Corporation 次の SQL コーディング規約が利用できます。 -- Oracle 向けのコーディング規約は[こちら](./SQLコーディング規約(Oracle).md)です。 - PostgreSQL 向けのコーディング規約は[こちら](./SQLコーディング規約(PostgreSQL).md)です。 +- Oracle 向けのコーディング規約は[こちら](./SQLコーディング規約(Oracle).md)です。 # Resources 次のリンクから単一ファイルで作成されたコーディング規約を取得できます。\ (これらのファイルは[Pandoc]を利用して作成しています。) -- for Oracle - - [Markdown](https://github.com/future-architect/coding-standards/blob/master/documents/forSQL/SQLコーディング規約(Oracle).md) - - [HTML](https://github.com/future-architect/coding-standards/blob/gh-pages/resources/SQLコーディング規約(Oracle).html) - - [Word](https://github.com/future-architect/coding-standards/raw/gh-pages/resources/SQLコーディング規約(Oracle).docx) - for PostgreSQL - [Markdown](https://github.com/future-architect/coding-standards/blob/master/documents/forSQL/SQLコーディング規約(PostgreSQL).md) - [HTML](https://github.com/future-architect/coding-standards/blob/gh-pages/resources/SQLコーディング規約(PostgreSQL).html) - [Word](https://github.com/future-architect/coding-standards/raw/gh-pages/resources/SQLコーディング規約(PostgreSQL).docx) +- for Oracle + - [Markdown](https://github.com/future-architect/coding-standards/blob/master/documents/forSQL/SQLコーディング規約(Oracle).md) + - [HTML](https://github.com/future-architect/coding-standards/blob/gh-pages/resources/SQLコーディング規約(Oracle).html) + - [Word](https://github.com/future-architect/coding-standards/raw/gh-pages/resources/SQLコーディング規約(Oracle).docx) [pandoc]: https://pandoc.org/ diff --git a/documents/forSlack/README.md b/documents/forSlack/index.md similarity index 71% rename from documents/forSlack/README.md rename to documents/forSlack/index.md index 4cbb8e00..9aaeef27 100644 --- a/documents/forSlack/README.md +++ b/documents/forSlack/index.md @@ -1,11 +1,14 @@ --- sidebarDepth: 4 author: フューチャー株式会社 -home: true -heroText: Slack利用ガイドライン -tagline: Slack Usage Guidelines -pageClass: lang-home -footer: ©2015 - 2024 Future Enterprise Coding Standards - Future Corporation +layout: home +hero: + name: 'Slack利用ガイドライン' + tagline: Slack Usage Guidelines + actions: + - theme: brand + text: Slack利用ガイドライン + link: ./slack_usage_guidelines.md --- # Slack利用ガイドライン diff --git a/index.md b/index.md new file mode 100644 index 00000000..40c86abd --- /dev/null +++ b/index.md @@ -0,0 +1,44 @@ +--- +layout: home +title: Future Enterprise Coding Standards +hero: + name: Future Enterprise Coding Standards + # text: '' + tagline: フューチャー株式会社が作成するエンタープライズ領域に特化したコーディング規約 + actions: + - theme: brand + text: Javaコーディング規約 + link: ./documents/forJava/ + - theme: brand + text: SQL コーディング規約 + link: ./documents/forSQL/ + - theme: alt + text: AWS インフラリソース命名規約 + link: ./documents/forAWSResource + - theme: alt + text: OpenAPI Specification 規約 + link: ./documents/forOpenAPISpecification + - theme: alt + text: Markdown設計ドキュメント規約 + link: ./documents/forMarkdown +features: + - title: Readability + details: ソースコードの可読性を高く保つことで、保守性・拡張性の高いソフトウェアを作ることができます。 しかし、可読性の指標は複数あり、デベロッパーごとに判断がブレ、それぞれのスタイルで記述すると、ソフトウェア全体で見たときの可読性が下がってしまいます。 本コーディング規約は、コーディング時の判断のブレを防ぎます。 + - title: Enterprise + details: エンタープライズ領域では、社員・パートナーの方々を合わせて、数百人が同時に開発することも珍しくありません。 ちょっとした悩み、失敗も、人数が集まれば大変なコスト・リスクになります。 誰もが引っかかる落とし穴、悩みの種をあらかじめ排除します。 + - title: Performance + details: 時に読みやすいソースコードはパフォーマンス劣化を招くことがあります。 しかし、常にパフォーマンスを優先したソースコードは人間の読めないソースコードになりがちです。 今、書こうとしているソースコードが、どの程度のパフォーマンスになるのか、指標を示すことで、ソフトウェア開発プロジェクトごとに最適なソースコードを選択することができます。 +--- + +[![GitHub last commit](https://img.shields.io/github/last-commit/future-architect/coding-standards.svg)](https://github.com/future-architect/coding-standards) +[![GitHub stars](https://img.shields.io/github/stars/future-architect/coding-standards.svg?style=social&label=Stars&logo=github)](https://github.com/future-architect/coding-standards/stargazers) + +--- + +> 他の開発言語のコーディング規約も順次作成中です + +--- + +# License + +[![CC-By-4.0](https://licensebuttons.net/l/by/4.0/88x31.png)](https://creativecommons.org/licenses/by/4.0/deed.ja) diff --git a/package.json b/package.json index df7c593e..f5477af9 100644 --- a/package.json +++ b/package.json @@ -4,13 +4,13 @@ "description": "Future Enterprise Coding Standards", "main": "index.js", "scripts": { + "watch": "vitepress dev . --open", + "build": "vitepress build .", "install": "npm install --global mermaid-filter", - "lint": "eslint . .vuepress --ext .js,.vue", - "watch": "vuepress dev . --debug --no-cache", + "lint": "eslint . .vitepress --ext .js,.vue", "copy": "npm-run-all copy:*", "copy:git": "cp -r documents/forGitBranch/img docs/documents/forGitBranch/img", "copy:markdown": "cp -r documents/forMarkdown/future_muscle_partner/docs/future_muscle_partner_abstract.png docs/documents/forMarkdown/future_muscle_partner/docs/future_muscle_partner_abstract.png", - "build": "vuepress build .", "format": "prettier . --write", "pandoc": "npm-run-all pandoc:*", "pandoc:java-html": "pandoc ./documents/forJava/Javaコーディング規約.md -s --self-contained --number-sections --toc -t html5 -c ./documents/common/pandoc_styles/css/style.css -o ./documents/forJava/Javaコーディング規約.html", @@ -43,17 +43,18 @@ "devDependencies": { "eslint": "^8.0.0", "eslint-config-prettier": "^8.3.0", - "eslint-config-standard": "^16.0.0", + "eslint-config-standard": "^17.1.0", "eslint-plugin-import": "^2.16.0", "eslint-plugin-node": "^11.0.0", "eslint-plugin-promise": "^6.0.0", "eslint-plugin-standard": "^4.0.0", "eslint-plugin-vue": "^9.0.0", + "markdown-it-footnote": "^4.0.0", "markdown-it-task-lists": "^2.1.1", "npm-run-all": "^4.1.5", - "prettier": "^2.4.0", - "vue-github-button": "^1.0.7", - "vuepress": "^1.2.0", - "vuepress-plugin-mermaidjs": "^1.9.1" + "prettier": "^3.4.2", + "vitepress": "^1.5.0", + "vitepress-plugin-mermaid": "^2.0.17", + "vue-github-button": "^3.1.3" } } diff --git "a/documents/forMarkdown/future_muscle_partner/docs/03_\343\203\207\343\203\274\343\202\277/erd.a5er" b/public/example-resources/erd.a5er similarity index 100% rename from "documents/forMarkdown/future_muscle_partner/docs/03_\343\203\207\343\203\274\343\202\277/erd.a5er" rename to public/example-resources/erd.a5er diff --git a/.vuepress/public/images/JBee.png b/public/images/JBee.png similarity index 100% rename from .vuepress/public/images/JBee.png rename to public/images/JBee.png diff --git a/.vuepress/public/images/JBee100.png b/public/images/JBee100.png similarity index 100% rename from .vuepress/public/images/JBee100.png rename to public/images/JBee100.png diff --git a/.vuepress/public/images/JBeeBlack.png b/public/images/JBeeBlack.png similarity index 100% rename from .vuepress/public/images/JBeeBlack.png rename to public/images/JBeeBlack.png diff --git a/.vuepress/public/images/background3.jpg b/public/images/background3.jpg similarity index 100% rename from .vuepress/public/images/background3.jpg rename to public/images/background3.jpg diff --git a/public/images/logo-dark.svg b/public/images/logo-dark.svg new file mode 100644 index 00000000..339af494 --- /dev/null +++ b/public/images/logo-dark.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.vuepress/public/images/logo.svg b/public/images/logo.svg similarity index 100% rename from .vuepress/public/images/logo.svg rename to public/images/logo.svg diff --git a/.vuepress/public/resources/.gitkeep b/public/resources/.gitkeep similarity index 100% rename from .vuepress/public/resources/.gitkeep rename to public/resources/.gitkeep From 529536628d79915ff080f83a81d71f132be81433 Mon Sep 17 00:00:00 2001 From: ota-meshi Date: Thu, 19 Dec 2024 16:49:21 +0900 Subject: [PATCH 2/3] fix ci name --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2b867e86..26615daf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,7 @@ on: branches: [master] jobs: - deploy-docs: + build-docs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 From 535ea35284856f73e53400311d830db50590badc Mon Sep 17 00:00:00 2001 From: ota-meshi Date: Thu, 19 Dec 2024 17:04:02 +0900 Subject: [PATCH 3/3] fix head.meta --- ...75\345\220\215\350\246\217\347\264\204.md" | 7 +- .../forGitBranch/git_branch_standards.md | 7 +- ...63\343\202\260\350\246\217\347\264\204.md" | 7 +- ...202\260\350\246\217\347\264\204_for_11.md" | 7 +- ...\202\260\350\246\217\347\264\204_for_8.md" | 7 +- .../OpenAPI_Specification_2.0.md | 23 ++--- .../OpenAPI_Specification_3.0.3.md | 91 ++++++++++--------- ...\264\204\357\274\210Oracle\357\274\211.md" | 7 +- ...\204\357\274\210PostgreSQL\357\274\211.md" | 7 +- documents/forSlack/slack_usage_guidelines.md | 15 +-- 10 files changed, 94 insertions(+), 84 deletions(-) diff --git "a/documents/forAWSResource/AWS\343\202\244\343\203\263\343\203\225\343\203\251\343\203\252\343\202\275\343\203\274\343\202\271\345\221\275\345\220\215\350\246\217\347\264\204.md" "b/documents/forAWSResource/AWS\343\202\244\343\203\263\343\203\225\343\203\251\343\203\252\343\202\275\343\203\274\343\202\271\345\221\275\345\220\215\350\246\217\347\264\204.md" index e85565d4..2768624f 100644 --- "a/documents/forAWSResource/AWS\343\202\244\343\203\263\343\203\225\343\203\251\343\203\252\343\202\275\343\203\274\343\202\271\345\221\275\345\220\215\350\246\217\347\264\204.md" +++ "b/documents/forAWSResource/AWS\343\202\244\343\203\263\343\203\225\343\203\251\343\203\252\343\202\275\343\203\274\343\202\271\345\221\275\345\220\215\350\246\217\347\264\204.md" @@ -2,9 +2,10 @@ sidebarDepth: 4 title: AWSインフラ命名規約 author: フューチャー株式会社 -meta: - - name: keywords - content: AWS,命名規約,コーディング規約 +head: + - - meta + - name: keywords + content: AWS,命名規約,コーディング規約 --- diff --git a/documents/forGitBranch/git_branch_standards.md b/documents/forGitBranch/git_branch_standards.md index 093af59f..4d26d5c6 100644 --- a/documents/forGitBranch/git_branch_standards.md +++ b/documents/forGitBranch/git_branch_standards.md @@ -2,9 +2,10 @@ sidebarDepth: 4 title: Gitブランチフロー規約 author: フューチャー株式会社 -meta: - - name: keywords - content: Git +head: + - - meta + - name: keywords + content: Git --- diff --git "a/documents/forJava/Java\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204.md" "b/documents/forJava/Java\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204.md" index 5023c6ca..5d4e6bd7 100644 --- "a/documents/forJava/Java\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204.md" +++ "b/documents/forJava/Java\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204.md" @@ -2,9 +2,10 @@ sidebarDepth: 4 title: Javaコーディング規約 author: Future Enterprise Coding Standards -meta: - - name: keywords - content: Javaコーディング規約,Java17,コーディング規約,Java +head: + - - meta + - name: keywords + content: Javaコーディング規約,Java17,コーディング規約,Java --- diff --git "a/documents/forJava/Java\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204_for_11.md" "b/documents/forJava/Java\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204_for_11.md" index cd37facd..8cf3afd3 100644 --- "a/documents/forJava/Java\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204_for_11.md" +++ "b/documents/forJava/Java\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204_for_11.md" @@ -2,9 +2,10 @@ sidebarDepth: 4 title: Javaコーディング規約 for Java11 author: Future Enterprise Coding Standards -meta: - - name: keywords - content: Javaコーディング規約,Java11,コーディング規約,Java,Java9 +head: + - - meta + - name: keywords + content: Javaコーディング規約,Java11,コーディング規約,Java,Java9 --- diff --git "a/documents/forJava/Java\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204_for_8.md" "b/documents/forJava/Java\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204_for_8.md" index 6c44742c..421e5ce2 100644 --- "a/documents/forJava/Java\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204_for_8.md" +++ "b/documents/forJava/Java\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204_for_8.md" @@ -2,9 +2,10 @@ sidebarDepth: 4 title: Javaコーディング規約 for Java8 author: Future Enterprise Coding Standards -meta: - - name: keywords - content: Javaコーディング規約,Java8,コーディング規約,Java +head: + - - meta + - name: keywords + content: Javaコーディング規約,Java8,コーディング規約,Java --- diff --git a/documents/forOpenAPISpecification/OpenAPI_Specification_2.0.md b/documents/forOpenAPISpecification/OpenAPI_Specification_2.0.md index ab911803..b2dbfdad 100644 --- a/documents/forOpenAPISpecification/OpenAPI_Specification_2.0.md +++ b/documents/forOpenAPISpecification/OpenAPI_Specification_2.0.md @@ -2,9 +2,10 @@ sidebarDepth: 4 title: OpenAPI Specification 2.0規約 author: フューチャー株式会社 -meta: - - name: keywords - content: OpenAPI,Swagger,命名規約,コーディング規約 +head: + - - meta + - name: keywords + content: OpenAPI,Swagger,命名規約,コーディング規約 --- @@ -132,14 +133,14 @@ definitions: info オブジェクトには Web API に関するメタデータを記載する。 `title`, `description`, `version` を必須項目とする。 -| フィールド名 | 必須 | 記載内容 | -| -------------- | :--: | -------------------------------- | -| title | ○ | Web API の総称 | -| description | ○ | Web API の簡単な説明 | -| version | ○ | OpenAPI ドキュメントのバージョン | -| termsOfService | | 利用規約の URL | -| contact | | 連絡先情報 | -| license | | ライセンス情報 | +| フィールド名 | 必須 | 記載内容 | +| -------------- | :---: | -------------------------------- | +| title | ○ | Web API の総称 | +| description | ○ | Web API の簡単な説明 | +| version | ○ | OpenAPI ドキュメントのバージョン | +| termsOfService | | 利用規約の URL | +| contact | | 連絡先情報 | +| license | | ライセンス情報 | ### title diff --git a/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.md b/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.md index 719739e9..70147ed3 100644 --- a/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.md +++ b/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.md @@ -2,9 +2,10 @@ sidebarDepth: 4 title: OpenAPI Specification 3.0.3規約 author: フューチャー株式会社 -meta: - - name: keywords - content: OpenAPI,命名規約,コーディング規約 +head: + - - meta + - name: keywords + content: OpenAPI,命名規約,コーディング規約 --- @@ -39,16 +40,16 @@ OpenAPI ドキュメントを構成する要素はオブジェクトと呼ばれ 各オブジェクトの詳細については[公式ドキュメント](https://spec.openapis.org/oas/v3.0.3#openapi-object)を参照されたい。 -| フィールド名 | 必須 | 説明 | -| ------------ | :--: | ----------------------------------------------------------- | -| openapi | ○ | OpenAPI ドキュメントが使用する OpenAPI 仕様のバージョン番号 | -| info | ○ | API に関するメタデータ | -| servers | | API サーバへの接続情報 | -| paths | ○ | API の利用可能なパスと操作方法 | -| components | | 複数の API における共通の定義 | -| security | | API 全体で利用可能なセキュリティ(認証)機構 | -| tags | | 各種 API をグルーピングするためのタグ | -| externalDocs | | 追加の外部ドキュメント | +| フィールド名 | 必須 | 説明 | +| ------------ | :---: | ----------------------------------------------------------- | +| openapi | ○ | OpenAPI ドキュメントが使用する OpenAPI 仕様のバージョン番号 | +| info | ○ | API に関するメタデータ | +| servers | | API サーバへの接続情報 | +| paths | ○ | API の利用可能なパスと操作方法 | +| components | | 複数の API における共通の定義 | +| security | | API 全体で利用可能なセキュリティ(認証)機構 | +| tags | | 各種 API をグルーピングするためのタグ | +| externalDocs | | 追加の外部ドキュメント | # 要素規約 @@ -78,14 +79,14 @@ openapi: 3.0 `title`, `description`, `version` を必須項目とする。 -| フィールド名 | 必須 | 記載内容 | -| -------------- | :--: | -------------------------------- | -| title | ○ | Web API の総称 | -| description | ○ | Web API の簡単な説明 | -| version | ○ | OpenAPI ドキュメントのバージョン | -| termsOfService | | 利用規約の URL | -| contact | | 連絡先情報 | -| license | | ライセンス情報 | +| フィールド名 | 必須 | 記載内容 | +| -------------- | :---: | -------------------------------- | +| title | ○ | Web API の総称 | +| description | ○ | Web API の簡単な説明 | +| version | ○ | OpenAPI ドキュメントのバージョン | +| termsOfService | | 利用規約の URL | +| contact | | 連絡先情報 | +| license | | ライセンス情報 | ### info > title @@ -229,20 +230,20 @@ API の利用可能なエンドポイントと操作方法を記載する。 - HTTP メソッドの配下に定義されるオペレーションオブジェクトは、下記の項目を必須項目とする -| フィールド名 | 必須 | 記載内容 | -|--------------| :--: |------------------------| -| tags | ○ | API の論理的なグループ | -| summary | ○ | API の操作概要 | -| description | ○ | API の振る舞いの詳細や注意点 | -| externalDocs | | API に関する追加の文書 | -| operationId | ○ | API の利用可能なエンドポイントと操作方法 | -| parameters | | API のリクエストパラメータ | -| requestBody | | API のリクエストボディ | -| responses | ○ | API のレスポンス | -| callbacks | | | -| deprecated | | API が非推奨であることの宣言 | -| security | | API のセキュリティ機構 | -| servers | | API に対応する代替サーバ | +| フィールド名 | 必須 | 記載内容 | +| ------------ | :---: | ---------------------------------------- | +| tags | ○ | API の論理的なグループ | +| summary | ○ | API の操作概要 | +| description | ○ | API の振る舞いの詳細や注意点 | +| externalDocs | | API に関する追加の文書 | +| operationId | ○ | API の利用可能なエンドポイントと操作方法 | +| parameters | | API のリクエストパラメータ | +| requestBody | | API のリクエストボディ | +| responses | ○ | API のレスポンス | +| callbacks | | | +| deprecated | | API が非推奨であることの宣言 | +| security | | API のセキュリティ機構 | +| servers | | API に対応する代替サーバ | ### paths > {path} > {method} > tags @@ -618,17 +619,17 @@ API の認証方式を記載する。 API 定義で利用する共通のデータモデルを定義する。定義方針は下記の通りである。 -| フィールド名 | 方針 | -|-----------------|------------------------------------------------| +| フィールド名 | 方針 | +| --------------- | -------------------------------------------------------------------------------------- | | schemas | API 共通的なリソース(例. ユーザや商品など)やエラー等のドメインオブジェクトを定義する | -| responses | API 共通的なレスポンス(例. 異常系(`4xx`, `5xx`)のレスポンス)を定義する | -| parameters | API 共通的なリクエストパラメータ(HTTP ヘッダやクエリパラメータ等)を定義する | -| examples | 原則何も定義しない | -| requestBodies | 原則何も定義せず、リクエストボディは API 個別に定義する | -| headers | API 共通的なレスポンスヘッダを定義する | -| securitySchemes | 標準で用いる API 認証のスキームを定義する | -| links | 原則何も定義しない | -| callbacks | 原則何も定義しない | +| responses | API 共通的なレスポンス(例. 異常系(`4xx`, `5xx`)のレスポンス)を定義する | +| parameters | API 共通的なリクエストパラメータ(HTTP ヘッダやクエリパラメータ等)を定義する | +| examples | 原則何も定義しない | +| requestBodies | 原則何も定義せず、リクエストボディは API 個別に定義する | +| headers | API 共通的なレスポンスヘッダを定義する | +| securitySchemes | 標準で用いる API 認証のスキームを定義する | +| links | 原則何も定義しない | +| callbacks | 原則何も定義しない | ※ リクエストボディやレスポンスボディにおいてオブジェクトがネストする場合、 API 固有のオブジェクトであっても `schemas` に定義する。 これは、定義するオブジェクトの `properties` 配下に更に `type: object` が定義される場合に、生成ツールによってはうまく型が生成されないためである。 diff --git "a/documents/forSQL/SQL\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204\357\274\210Oracle\357\274\211.md" "b/documents/forSQL/SQL\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204\357\274\210Oracle\357\274\211.md" index d249d78b..5d132576 100644 --- "a/documents/forSQL/SQL\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204\357\274\210Oracle\357\274\211.md" +++ "b/documents/forSQL/SQL\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204\357\274\210Oracle\357\274\211.md" @@ -2,9 +2,10 @@ sidebarDepth: 4 title: SQLコーディング規約(Oracle) author: Future Enterprise Coding Standards -meta: - - name: keywords - content: SQLコーディング規約,Oracle,コーディング規約,SQL +head: + - - meta + - name: keywords + content: SQLコーディング規約,Oracle,コーディング規約,SQL --- diff --git "a/documents/forSQL/SQL\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204\357\274\210PostgreSQL\357\274\211.md" "b/documents/forSQL/SQL\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204\357\274\210PostgreSQL\357\274\211.md" index 56a01068..86f0772d 100644 --- "a/documents/forSQL/SQL\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204\357\274\210PostgreSQL\357\274\211.md" +++ "b/documents/forSQL/SQL\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204\357\274\210PostgreSQL\357\274\211.md" @@ -2,9 +2,10 @@ sidebarDepth: 4 title: SQLコーディング規約(PostgreSQL) author: Future Enterprise Coding Standards -meta: - - name: keywords - content: SQLコーディング規約,PostgreSQL,コーディング規約,SQL +head: + - - meta + - name: keywords + content: SQLコーディング規約,PostgreSQL,コーディング規約,SQL --- diff --git a/documents/forSlack/slack_usage_guidelines.md b/documents/forSlack/slack_usage_guidelines.md index 56841aa6..e10537d0 100644 --- a/documents/forSlack/slack_usage_guidelines.md +++ b/documents/forSlack/slack_usage_guidelines.md @@ -2,9 +2,10 @@ sidebarDepth: 4 title: Slack利用ガイドライン author: フューチャー株式会社 -meta: - - name: keywords - content: Slack +head: + - - meta + - name: keywords + content: Slack --- @@ -200,10 +201,10 @@ timesスレッドでメンションを飛ばすと、その後の投稿によっ チャンネルのメッセージ(スレッド先頭の投稿)では、話題を端的に表現する。ただし、返信スレッドの中を確認しないと内容が分からないようなメッセージ(タイトル)は非推奨とする。 -| | メッセージ(スレッド先頭の投稿) | -| :---- | :---- | -| ✅推奨例 | @mirai チケット \#4191 foo bar failed のビルドエラーの解消についての相談です。スタックトレースはスレッド内に記載します | -| ❌非推奨例 | レビュー依頼 | +| | メッセージ(スレッド先頭の投稿) | +| :-------- | :--------------------------------------------------------------------------------------------------------------------- | +| ✅推奨例 | @mirai チケット \#4191 foo bar failed のビルドエラーの解消についての相談です。スタックトレースはスレッド内に記載します | +| ❌非推奨例 | レビュー依頼 | なお、メンションはメッセージ(スレッド先頭)に付けるか、返信スレッド内に付けるかは任意とする。