Add workflow for api gen and refactor genration script (#60)

* update gitignore

* add first version of api generation flow

* try to run flow

* testing flow

* update gen flow

* switch flow to macOS

* fix

* add npm install

* test workflow

* Update API pages

* test workflow with current main

* refactor parser

* merge examples and schema functions

* merge examples and schema functions

* merge parameters as well

* revert template to single class component

* update account

* finalizing

* update with the newest version of openapi

* full flow

* update

* add docker command

* split flow in two jobs

* remove testing trigger

---------

Co-authored-by: GitHub Actions <no-reply@github.com>
This commit is contained in:
pascal-fischer
2023-06-05 09:35:54 +02:00
committed by GitHub
parent 33b3153723
commit f33b4df3dd
20 changed files with 481 additions and 5928 deletions

View File

@@ -5,7 +5,7 @@
"scripts": {
"dev": "next dev",
"build": "next build",
"gen": "swagger-codegen generate -i generator/openapi.yml -l openapi -o generator/api.json && npx ts-node generator/index.ts gen --input generator/api.json/openapi.json --output src/pages/ipa/resources",
"gen": "swagger-codegen generate -i https://raw.githubusercontent.com/netbirdio/netbird/main/management/server/http/api/openapi.yml -l openapi -o generator/openapi && npx ts-node generator/index.ts gen --input generator/openapi/openapi.json --output src/pages/ipa/resources",
"start": "next start",
"lint": "next lint"
},