-
Notifications
You must be signed in to change notification settings - Fork 407
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #471 from tokuhirom/openapi-prototype
Openapi
- Loading branch information
Showing
388 changed files
with
16,255 additions
and
1,525 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Generate OpenAPI based code | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
tests: | ||
name: Generate OpenAPI based code | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Setup | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- name: Update submodules | ||
run: git submodule update --remote --recursive | ||
- uses: actions/setup-node@v3 | ||
id: setup_node_id | ||
with: | ||
node-version: 18 | ||
- name: actions/setup-java@v3 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: 17 | ||
architecture: x64 | ||
|
||
# Generate codes | ||
- run: | | ||
python3 generate-code.py | ||
# Run tests | ||
- run: npm run test | ||
- run: | | ||
diff=$(git --no-pager diff --name-only) | ||
echo "DIFF_IS_EMPTY=$([[ -z "$diff" ]] && echo 'true' || echo 'false')" >> $GITHUB_ENV | ||
echo "CURRENT_DATETIME=$(date +'%Y%m%d%H%M%S')" >> $GITHUB_ENV | ||
- if: ${{ env.DIFF_IS_EMPTY != 'true' }} | ||
run: | | ||
git config user.name github-actions | ||
git config user.email github-actions@github.com | ||
git checkout -b update-diff-${{ env.CURRENT_DATETIME }} | ||
git add lib/** | ||
git commit --allow-empty -m "Codes are generated by openapi" | ||
git push origin update-diff-${{ env.CURRENT_DATETIME }} | ||
gh pr create -B ${{ github.ref_name }} -t "Codes are generated by openapi" -b "" --label "line-openapi-update" | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,3 +65,5 @@ test/helpers/request.json | |
|
||
# IDE | ||
.idea/ | ||
|
||
git_push.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "line-openapi"] | ||
path = line-openapi | ||
url = git@github.com:line/line-openapi.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# openapi-generator generated files. | ||
lib/channel-access-token/ | ||
lib/insight/ | ||
lib/liff/ | ||
lib/manage-audience/ | ||
lib/messaging-api/ | ||
lib/module/ | ||
lib/module-attach/ | ||
lib/shop/ | ||
lib/webhook/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
/.vuepress/.cache/ | ||
/.vuepress/.temp/ | ||
/apidocs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,89 +1,84 @@ | ||
import { defaultTheme } from 'vuepress' | ||
import {defaultTheme} from 'vuepress' | ||
|
||
export default { | ||
base: "/line-bot-sdk-nodejs/", | ||
head: [ | ||
["link", { rel: "icon", href: "/favicon.ico" }] | ||
], | ||
title: "line-bot-sdk-nodejs", | ||
description: "Node.js SDK for LINE Messaging API", | ||
theme: defaultTheme({ | ||
// default theme config | ||
navbar: [ | ||
{ | ||
text: "Introduction", | ||
link: "/" | ||
}, | ||
{ | ||
text: "Getting Started", | ||
link: "/getting-started" | ||
}, | ||
{ | ||
text: "Guide", | ||
link: "/guide" | ||
}, | ||
{ | ||
text: "API Reference", | ||
link: "/api-reference" | ||
|
||
}, | ||
{ | ||
text: "Contributing", | ||
link: "/CONTRIBUTING" | ||
}, | ||
{ | ||
text: "LINE Developers", | ||
link: "https://developers.line.biz/en/" | ||
}, | ||
{ | ||
text: "GitHub", | ||
link: "https://github.com/line/line-bot-sdk-nodejs/" | ||
}, | ||
base: "/line-bot-sdk-nodejs/", | ||
head: [ | ||
["link", {rel: "icon", href: "/favicon.ico"}] | ||
], | ||
sidebar: [ | ||
{ | ||
title: "Introduction", | ||
collapsable: false, | ||
children: [ | ||
"", | ||
] | ||
}, | ||
{ | ||
title: "Getting Started", | ||
collapsable: false, | ||
children: [ | ||
"/getting-started/requirements", | ||
"/getting-started/install", | ||
"/getting-started/basic-usage", | ||
] | ||
}, | ||
{ | ||
title: "Guide", | ||
collapsable: false, | ||
children: [ | ||
"/guide/webhook", | ||
"/guide/client", | ||
"/guide/typescript", | ||
] | ||
}, | ||
{ | ||
title: "API Reference", | ||
collapsable: false, | ||
children: [ | ||
"/api-reference/client", | ||
"/api-reference/validate-signature", | ||
"/api-reference/middleware", | ||
"/api-reference/exceptions", | ||
"/api-reference/message-and-event-objects", | ||
] | ||
}, | ||
{ | ||
title: "Contributing", | ||
collapsable: false, | ||
children: [ | ||
"/CONTRIBUTING", | ||
title: "line-bot-sdk-nodejs", | ||
description: "Node.js SDK for LINE Messaging API", | ||
theme: defaultTheme({ | ||
// default theme config | ||
navbar: [ | ||
{ | ||
text: "Introduction", | ||
link: "/" | ||
}, | ||
{ | ||
text: "Getting Started", | ||
link: "/getting-started" | ||
}, | ||
{ | ||
text: "Guide", | ||
link: "/guide" | ||
}, | ||
{ | ||
text: "API Reference", | ||
link: "/apidocs/modules.html" | ||
}, | ||
{ | ||
text: "Contributing", | ||
link: "/CONTRIBUTING" | ||
}, | ||
{ | ||
text: "LINE Developers", | ||
link: "https://developers.line.biz/en/" | ||
}, | ||
{ | ||
text: "GitHub", | ||
link: "https://github.com/line/line-bot-sdk-nodejs/" | ||
}, | ||
], | ||
sidebar: [ | ||
{ | ||
title: "Introduction", | ||
collapsable: false, | ||
children: [ | ||
"", | ||
] | ||
}, | ||
{ | ||
title: "Getting Started", | ||
collapsable: false, | ||
children: [ | ||
"/getting-started/requirements", | ||
"/getting-started/install", | ||
"/getting-started/basic-usage", | ||
] | ||
}, | ||
{ | ||
title: "Guide", | ||
collapsable: false, | ||
children: [ | ||
"/guide/webhook", | ||
"/guide/client", | ||
"/guide/typescript", | ||
] | ||
}, | ||
{ | ||
title: "API Reference", | ||
collapsable: false, | ||
children: [ | ||
"/apidocs/modules.html" | ||
] | ||
}, | ||
{ | ||
title: "Contributing", | ||
collapsable: false, | ||
children: [ | ||
"/CONTRIBUTING", | ||
] | ||
}, | ||
] | ||
}, | ||
] | ||
}), | ||
}), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.