mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-12 11:15:12 +00:00
Generate typesafe typescript and go clients, examples (#194)
This commit is contained in:
9
.github/workflows/publish.yml
vendored
9
.github/workflows/publish.yml
vendored
@@ -52,6 +52,7 @@ jobs:
|
||||
working-directory: services
|
||||
run: |
|
||||
sudo npm install -g openapi-to-postmanv2
|
||||
sudo npm install -g prettier
|
||||
openapi2postmanv2 -h
|
||||
|
||||
- name: Generate openapi spec and publish the api
|
||||
@@ -65,7 +66,13 @@ jobs:
|
||||
env:
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
run: |
|
||||
go run cmd/clients/main.go .
|
||||
cd cmd/clients;
|
||||
go install;
|
||||
cd ../..;
|
||||
clients .
|
||||
cd clients/ts;
|
||||
npm install
|
||||
npm run build
|
||||
|
||||
# publish to github first under micro/services
|
||||
# .npmrc has settings for it
|
||||
|
||||
2
.github/workflows/tests.yml
vendored
2
.github/workflows/tests.yml
vendored
@@ -21,7 +21,7 @@ jobs:
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
steps:
|
||||
- name: Set up Go 1.13
|
||||
- name: Set up Go 1.15
|
||||
uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: 1.15
|
||||
|
||||
Reference in New Issue
Block a user