1
Fork 0
mirror of https://github.com/thegeneralist01/twitter-openapi synced 2026-01-11 15:40:26 +01:00

update task.json

Signed-off-by: ふぁ <yuki@yuki0311.com>
This commit is contained in:
ふぁ 2023-07-31 17:11:02 +09:00
parent 112a13efc3
commit f5bcb8a9f7
No known key found for this signature in database
GPG key ID: 83A8A5E74872A8AA
2 changed files with 40 additions and 5 deletions

6
.vscode/launch.json vendored
View file

@ -2,7 +2,7 @@
"version": "0.2.0", "version": "0.2.0",
"configurations": [ "configurations": [
{ {
"name": "Python: Build", "name": "build",
"type": "python", "type": "python",
"request": "launch", "request": "launch",
"program": "tools/build.py", "program": "tools/build.py",
@ -10,13 +10,13 @@
"justMyCode": true "justMyCode": true
}, },
{ {
"name": "Python: Test OpenAPI Serialize", "name": "test",
"type": "python", "type": "python",
"request": "launch", "request": "launch",
"program": "test/python/test_serialize.py", "program": "test/python/test_serialize.py",
"console": "integratedTerminal", "console": "integratedTerminal",
"justMyCode": false, "justMyCode": false,
"preLaunchTask": "build", "preLaunchTask": "build-task",
"env": { "env": {
"ERROR_UNCATCHED": "True" "ERROR_UNCATCHED": "True"
} }

39
.vscode/tasks.json vendored
View file

@ -2,9 +2,44 @@
"version": "2.0.0", "version": "2.0.0",
"tasks": [ "tasks": [
{ {
"label": "build", "label": "build-task",
"type": "shell", "type": "shell",
"command": "python3 tools/build.py && java -jar openapi-generator-cli.jar generate -c test/python/openapi-generator-config.yaml -g python && python3 -m pip install ./python_generated" "linux": {
"command": [
"python3 tools/build.py;",
"java -jar openapi-generator-cli.jar generate -c test/python/openapi-generator-config.yaml -g python;",
"python3 -m pip install ./python_generated;"
]
},
"windows": {
"command": [
".venv/Scripts/activate;",
"python tools/build.py;",
"java -jar openapi-generator-cli.jar generate -c test/python/openapi-generator-config.yaml -g python;",
"python -m pip install ./python_generated;"
]
}
},
{
"label": "init-venv",
"type": "shell",
"runOptions": {
"runOn": "folderOpen"
},
"linux": {
"command": [
"python3 -m venv .venv;",
".venv/bin/python3 -m pip install -r requirements.txt;",
"wget https://github.com/fa0311/openapi-generator/releases/download/twitter_openapi_python_1.2.0/openapi-generator-cli.jar -O openapi-generator-cli.jar;"
]
},
"windows": {
"command": [
"python -m venv .venv;",
".venv/Scripts/python -m pip install -r requirements.txt;",
"Invoke-WebRequest https://github.com/fa0311/openapi-generator/releases/download/twitter_openapi_python_1.2.0/openapi-generator-cli.jar -OutFile openapi-generator-cli.jar;"
]
}
} }
] ]
} }