feat: add openapi-generators for sdk's

This commit is contained in:
dni ⚡
2025-04-09 07:36:15 +02:00
parent 5714848434
commit c820456500
5 changed files with 1633 additions and 12 deletions

2
.gitignore vendored
View File

@@ -42,6 +42,8 @@ lnbits/static/bundle.min.css.old
lnbits/static/bundle-components.min.js.old
lnbits/upgrades
docker
generated
openapi.json*
# Nix
*result*

View File

@@ -99,9 +99,13 @@ openapi:
curl -s http://0.0.0.0:5003/openapi.json | poetry run openapi-spec-validator --errors=all -
# kill -9 %1
bak:
# LNBITS_DATABASE_URL=postgres://postgres:postgres@0.0.0.0:5432/postgres
#
generate:
rm -rf generated
mkdir generated
rm -f openapi.json
wget localhost:5000/openapi.json
npm run generate
rm openapi.json
sass:
npm run sass

7
openapitools.json Normal file
View File

@@ -0,0 +1,7 @@
{
"$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json",
"spaces": 2,
"generator-cli": {
"version": "7.12.0"
}
}

1620
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -10,9 +10,11 @@
"vendor_minify_css": "./node_modules/.bin/minify ./lnbits/static/bundle.css > ./lnbits/static/bundle.min.css",
"vendor_minify_js": "./node_modules/.bin/minify ./lnbits/static/bundle.js > ./lnbits/static/bundle.min.js",
"vendor_minify_components": "./node_modules/.bin/minify ./lnbits/static/bundle-components.js > ./lnbits/static/bundle-components.min.js",
"bundle": "npm run sass && npm run vendor_copy && npm run vendor_json && npm run vendor_bundle_css && npm run vendor_bundle_js && npm run vendor_bundle_components && npm run vendor_minify_css && npm run vendor_minify_js && npm run vendor_minify_components"
"bundle": "npm run sass && npm run vendor_copy && npm run vendor_json && npm run vendor_bundle_css && npm run vendor_bundle_js && npm run vendor_bundle_components && npm run vendor_minify_css && npm run vendor_minify_js && npm run vendor_minify_components",
"generate": "openapi-generator-cli generate -i openapi.json -g typescript-fetch -o ./generated"
},
"devDependencies": {
"@openapitools/openapi-generator-cli": "^2.18.4",
"concat": "^1.0.3",
"minify": "^9.2.0",
"prettier": "^3.3.3",
@@ -23,10 +25,10 @@
"axios": "^1.8.2",
"chart.js": "^4.4.4",
"moment": "^2.30.1",
"nostr-tools": "^2.7.2",
"qrcode.vue": "^3.4.1",
"quasar": "2.17.0",
"showdown": "^2.1.0",
"nostr-tools": "^2.7.2",
"underscore": "^1.13.7",
"vue": "3.5.8",
"vue-i18n": "^10.0.6",