mirror of
https://github.com/valitydev/swag-url-shortener.git
synced 2024-11-06 01:15:19 +00:00
TD-253: Add frontend codegen (#11)
This commit is contained in:
parent
d04a8e5b49
commit
f780d07c93
22
.github/workflows/frontend-pr.yml
vendored
Normal file
22
.github/workflows/frontend-pr.yml
vendored
Normal 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
26
.github/workflows/frontend-publish.yml
vendored
Normal 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
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -36,3 +36,5 @@ node_modules
|
|||||||
# CI
|
# CI
|
||||||
.wercker
|
.wercker
|
||||||
|
|
||||||
|
# Frontend
|
||||||
|
/lib
|
10
openapitools.json
Normal file
10
openapitools.json
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json",
|
||||||
|
"spaces": 2,
|
||||||
|
"generator-cli": {
|
||||||
|
"version": "6.0.0-20220330.230127-109",
|
||||||
|
"repository": {
|
||||||
|
"downloadUrl": "https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/6.0.0-SNAPSHOT/openapi-generator-cli-${versionName}.jar"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
4242
package-lock.json
generated
4242
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
22
package.json
22
package.json
@ -1,8 +1,15 @@
|
|||||||
{
|
{
|
||||||
"name": "RBKmoney-openapi-spec",
|
"name": "@vality/swag-url-shortener",
|
||||||
"version": "0.0.1",
|
"version": "0.1.0",
|
||||||
"dependencies": {
|
"scripts": {
|
||||||
"bower": "^1.7.7",
|
"build": "node ./scripts/build.js",
|
||||||
|
"swagger": "swagger-repo",
|
||||||
|
"test": "swagger-repo validate",
|
||||||
|
"start": "gulp serve",
|
||||||
|
"codegen": "vality-openapi generate ./web_deploy/swagger.json"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@vality/openapi-generator-cli": "0.1.1-fbfe66e.0",
|
||||||
"connect": "^3.4.1",
|
"connect": "^3.4.1",
|
||||||
"cors": "^2.7.1",
|
"cors": "^2.7.1",
|
||||||
"deploy-to-gh-pages": "^1.1.0",
|
"deploy-to-gh-pages": "^1.1.0",
|
||||||
@ -13,12 +20,5 @@
|
|||||||
"shelljs": "^0.7.0",
|
"shelljs": "^0.7.0",
|
||||||
"swagger-repo": "^1.0.0",
|
"swagger-repo": "^1.0.0",
|
||||||
"swagger-ui": "^2.1.4"
|
"swagger-ui": "^2.1.4"
|
||||||
},
|
|
||||||
"private": true,
|
|
||||||
"scripts": {
|
|
||||||
"build": "node ./scripts/build.js",
|
|
||||||
"swagger": "swagger-repo",
|
|
||||||
"test": "swagger-repo validate",
|
|
||||||
"start": "gulp serve"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user