TD-253: Add frontend codegen (#7)

This commit is contained in:
Rinat Arsaev 2022-04-07 14:16:44 +03:00 committed by GitHub
parent a4c2ada576
commit 03e1014b0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 2458 additions and 8370 deletions

22
.github/workflows/frontend-pr.yml vendored Normal file
View File

@ -0,0 +1,22 @@
name: 'Frontend: PR'
on:
pull_request:
branches: ['*']
jobs:
configured:
uses: valitydev/action-frontend/.github/workflows/configured.yml@v0.1
check:
name: Check
runs-on: ubuntu-latest
needs: configured
if: needs.configured.outputs.exists == 'true'
steps:
- uses: actions/checkout@v3
- uses: valitydev/action-frontend/setup@v0.1
- run: npm ci
- name: Build
run: npm run build
- name: Codegen
run: npm run codegen

26
.github/workflows/frontend-publish.yml vendored Normal file
View File

@ -0,0 +1,26 @@
name: 'Frontend: Publish'
on:
push:
branches: ['master', 'main']
jobs:
configured:
uses: valitydev/action-frontend/.github/workflows/configured.yml@v0.1
publish:
name: Publish
runs-on: ubuntu-latest
needs: configured
if: needs.configured.outputs.exists == 'true'
steps:
- uses: actions/checkout@v3
- uses: valitydev/action-frontend/setup@v0.1
- run: npm ci
- name: Build
run: npm run build
- name: Codegen
run: npm run codegen
- uses: valitydev/action-frontend/publish@v0.1
with:
npm-token: ${{ secrets.NPM_TOKEN }}
directory: ./lib

3
.gitignore vendored
View File

@ -58,3 +58,6 @@ web_deploy/
# Gradle:
.idea/gradle.xml
.idea/libraries
# Frontend
/lib

4
.gitmodules vendored
View File

@ -1,4 +0,0 @@
[submodule "build_utils"]
path = build_utils
url = git@github.com:rbkmoney/build_utils.git
branch = master

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": "5.4.0"
}
}

10748
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,28 +1,26 @@
{
"name": "swag-messages",
"version": "0.2.0",
"private": true,
"name": "@vality/swag-messages",
"version": "1.0.0",
"scripts": {
"build": "node ./scripts/build.js",
"swagger": "swagger-repo",
"validate": "swagger-repo validate",
"start": "gulp serve"
"start": "gulp serve",
"codegen": "vality-openapi generate ./web_deploy/swagger.json"
},
"devDependencies": {
"bower": "^1.8.8",
"@vality/openapi-generator-cli": "0.1.1-fbfe66e.0",
"connect": "^3.7.0",
"cors": "^2.8.5",
"deploy-to-gh-pages": "^1.3.7",
"express": "^4.17.1",
"gulp": "^4.0.2",
"gulp-connect": "^5.7.0",
"gulp-util": "^3.0.8",
"json-merge-patch": "^0.2.3",
"npm": "^6.13.0",
"portfinder": "^1.0.25",
"redoc-cli": "^0.10.2",
"shelljs": "^0.8.3",
"swagger-repo": "^2.0.0-rc.15",
"swagger-ui": "^3.24.2",
"express": "^4.17.1",
"redoc-cli": "^0.10.2"
"swagger-ui": "^3.24.2"
}
}