diff --git a/.github/workflows/deploy_docs.yml b/.github/workflows/deploy_docs.yml
index b91bed5..8f788b8 100644
--- a/.github/workflows/deploy_docs.yml
+++ b/.github/workflows/deploy_docs.yml
@@ -17,6 +17,9 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: 3.9
- - run: pip install mkdocs-material
+ - run: |
+ pip install mkdocs-material
+ pip install mkdocs-static-i18n[material]
+ pip install mkdocs-render-swagger-plugin
- run: git pull
- run: mkdocs gh-deploy --config-file ./docs/mkdocs.yml
\ No newline at end of file
diff --git a/docs/docs/assets/documentation.yaml b/docs/docs/assets/documentation.yaml
new file mode 100644
index 0000000..e6846dc
--- /dev/null
+++ b/docs/docs/assets/documentation.yaml
@@ -0,0 +1,59 @@
+openapi: 3.1.0
+info:
+ title: "MineAuth"
+ description: |
+ This is the MineAuth API documentation.
+ This makes user access to self information on minecraft.
+ license:
+ name: CC0-1.0
+ url: "https://creativecommons.org/publicdomain/zero/1.0/"
+ version: "1.0.0"
+
+servers:
+ - url: "http://localhost:8080"
+ description: "Local server"
+ - url: "https://api.example.com"
+ description: "Production server"
+
+components:
+ securitySchemes:
+ oauth2:
+ type: oauth2
+ flows:
+ authorizationCode:
+ authorizationUrl: /oauth2/authorize
+ tokenUrl: /oauth2/token
+ refreshUrl: /oauth2/token
+ scopes:
+ profile: Grants read access for my profile
+ all: Grants read access for my resources
+
+security:
+ - oauth2: [ openid, profile, all ]
+
+paths:
+ /oauth2/userinfo:
+ get:
+ summary: Get user information
+ security:
+ - oauth2: [ profile ]
+ /oauth2/revoke:
+ post:
+ summary: Revoke access token
+ security:
+ - oauth2: [ all ]
+ parameters:
+ - name: token
+ in: query
+ required: true
+ schema:
+ type: string
+ /oauth2/introspect:
+ post:
+ summary: Introspect access token
+ parameters:
+ - name: token
+ in: query
+ required: true
+ schema:
+ type: string
diff --git a/docs/docs/developers/endpoint.md b/docs/docs/developers/endpoint.md
deleted file mode 100644
index a346ec4..0000000
--- a/docs/docs/developers/endpoint.md
+++ /dev/null
@@ -1,22 +0,0 @@
-# Endpoints
-This is an endpoint list for OAuth2.0 and OpenID Connect (OIDC) for Moripa API.
-
-## Endpoints
-### OAuth2.0
-
-- [x] Authorization
- endpoint `/oauth2/authorize` [RFC 6749 4.1.1](https://openid-foundation-japan.github.io/rfc6749.ja.html#code-authz-req)
-- [x] Token
- endpoint `/oauth2/token` [RFC 6749 4.1.3](https://openid-foundation-japan.github.io/rfc6749.ja.html#token-endpoint)
-
-
-### OpenID Connect (OIDC)
-
-- [ ] Discovery endpoint `/.well-known/openid-configuration`
-- [x] JWKs endpoint `/.well-known/jwks.json`
-- [x] UserInfo
- endpoint `/userinfo` [OIDC Core 5.3](https://openid-foundation-japan.github.io/openid-connect-core-1_0.ja.html#UserInfo)
-
-### Plugin
-
-- Plugin endpoint `/api/v1/plugin//*`
\ No newline at end of file
diff --git a/docs/docs/developers/memo.md b/docs/docs/developers/memo.md
deleted file mode 100644
index c00b6a6..0000000
--- a/docs/docs/developers/memo.md
+++ /dev/null
@@ -1,8 +0,0 @@
-# Memo
-
-PKCE (Proof Key for Code Exchange) is an extension to OAuth 2.0 that is used to secure authorization code grants. It is
-used to prevent interception of the authorization code.
-
-plugin/clients 配下に Client の情報を保存する。
-
-To use Client Credentials Grant for service account.
\ No newline at end of file
diff --git a/docs/docs/en/developers/endpoint.md b/docs/docs/en/developers/endpoint.md
new file mode 100644
index 0000000..0908ff9
--- /dev/null
+++ b/docs/docs/en/developers/endpoint.md
@@ -0,0 +1,26 @@
+# Endpoints
+This is an endpoint list for OAuth2.0 and OpenID Connect (OIDC) for Moripa API.
+
+## Endpoints
+### OAuth2.0
+
+- [x] Authorization
+ endpoint `/oauth2/authorize` [RFC 6749 4.1.1](https://datatracker.ietf.org/doc/html/rfc6749.html#section-4.1.1)
+- [x] Token
+ endpoint `/oauth2/token` [RFC 6749 4.1.3](https://datatracker.ietf.org/doc/html/rfc6749.html#section-4.1.3)
+- [ ] Introspection
+ endpoint `/oauth2/introspect` [RFC 7662](https://datatracker.ietf.org/doc/html/rfc7662.html#section-2.1)
+- [ ] Revocation
+ endpoint `/oauth2/revoke` [RFC 7009](https://datatracker.ietf.org/doc/html/rfc7009.html#section-2.1)
+
+
+### OpenID Connect (OIDC)
+
+- [ ] Discovery endpoint `/.well-known/openid-configuration`
+- [x] JWKs endpoint `/.well-known/jwks.json`
+- [x] UserInfo
+ endpoint `/oauth2/userinfo` [OIDC Core 5.3](https://openid-foundation-japan.github.io/openid-connect-core-1_0.ja.html#UserInfo)
+
+### Plugin
+
+- Plugin endpoint `/api/v1/plugin//*`
\ No newline at end of file
diff --git a/docs/docs/developers/record/db.md b/docs/docs/en/developers/record/db.md
similarity index 100%
rename from docs/docs/developers/record/db.md
rename to docs/docs/en/developers/record/db.md
diff --git a/docs/docs/developers/record/file.md b/docs/docs/en/developers/record/file.md
similarity index 100%
rename from docs/docs/developers/record/file.md
rename to docs/docs/en/developers/record/file.md
diff --git a/docs/docs/developers/reference.md b/docs/docs/en/developers/reference.md
similarity index 100%
rename from docs/docs/developers/reference.md
rename to docs/docs/en/developers/reference.md
diff --git a/docs/docs/index.md b/docs/docs/en/index.md
similarity index 93%
rename from docs/docs/index.md
rename to docs/docs/en/index.md
index 01bafcf..f170909 100644
--- a/docs/docs/index.md
+++ b/docs/docs/en/index.md
@@ -1 +1,3 @@
# Welcome to Moripa-API Docs
+
+
diff --git a/docs/docs/en/openAPI.md b/docs/docs/en/openAPI.md
new file mode 100644
index 0000000..d65344c
--- /dev/null
+++ b/docs/docs/en/openAPI.md
@@ -0,0 +1,3 @@
+# OpenAPI
+
+!!swagger ../assets/documentation.yaml!!
\ No newline at end of file
diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml
index 06b5051..d28531f 100644
--- a/docs/mkdocs.yml
+++ b/docs/mkdocs.yml
@@ -10,13 +10,13 @@ theme:
- content.code.copy
palette:
- scheme: default
- primary : green
+ primary: green
accent: light green
toggle:
icon: material/brightness-7
name: Switch to dark mode
- scheme: slate
- primary : green
+ primary: green
accent: light green
toggle:
icon: material/brightness-4
@@ -29,8 +29,20 @@ markdown_extensions:
- pymdownx.tasklist:
custom_checkbox: true
plugins:
+ - render_swagger:
+ allow_arbitrary_locations: true
- search:
- lang: ja
+ lang: en
+ - i18n:
+ docs_structure: folder
+ languages:
+ - locale: en
+ default: true
+ name: English
+ build: true
+ - locale: ja
+ name: 日本語
+ build: true
repo_url: https://github.com/morinoparty/Moripa-API
repo_name: Moripa-API
copyright: No Rights Reserved.