Skip to content

Commit 20886fa

Browse files
committed
feat: init openapi project
Signed-off-by: 诺墨 <[email protected]>
0 parents  commit 20886fa

File tree

5 files changed

+1548
-0
lines changed

5 files changed

+1548
-0
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Gitee API V5 SDK for uniapp
2+
3+
用于 uniapp 环境的 Gitee API V5 开发包

openapi-ts-request.config.ts

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import type { GenerateServiceProps } from 'openapi-ts-request'
2+
3+
export default {
4+
schemaPath: 'https://gitee.com/api/v5/doc_json',
5+
serversPath: './src',
6+
requestImportStatement: `import request from 'axios'
7+
import { createUniAppAxiosAdapter } from '@uni-helper/axios-adapter';
8+
request.defaults.baseURL = 'https://gitee.com/api';
9+
request.defaults.adapter = createUniAppAxiosAdapter()
10+
`
11+
} as GenerateServiceProps

package.json

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"name": "gitee-uniapp-sdk-v5",
3+
"version": "1.0.0",
4+
"repository": {
5+
"type": "git",
6+
"url": "https://gitee.com/normal-coder/gitee-uniapp-sdk-v5.git"
7+
},
8+
"description": "Gitee API V5 SDK for uniapp",
9+
"author": {
10+
"name": "诺墨",
11+
"email": "[email protected]"
12+
},
13+
"license": "MIT",
14+
"main": "src/index.ts",
15+
"scripts": {
16+
"generate-openapi": "openapi-ts"
17+
},
18+
"keywords": [
19+
"gitee",
20+
"uniapp",
21+
"sdk",
22+
"OAuth"
23+
],
24+
"devDependencies": {
25+
"openapi-ts-request": "^0.4.9",
26+
"typescript": "^5.5.4"
27+
},
28+
"dependencies": {
29+
"@uni-helper/axios-adapter": "^1.5.2",
30+
"axios": "^1.7.5"
31+
}
32+
}

0 commit comments

Comments
 (0)