Skip to content

Commit

Permalink
switch from generating openapi client to pulling it in from branch
Browse files Browse the repository at this point in the history
  • Loading branch information
dancoates committed Mar 25, 2024
1 parent ef79c7f commit d5820f1
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 7 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/client-freeze-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Client freeze test
on: push

jobs:
client-freeze-test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/checkout@master
with:
name: populationgenomics/metamist
ref: refs/b142392
path: metamist-legacy-client

- name: "Copy python api files"
run: |
cp -R metamist-legacy-client/api/ metamist/api/
cp -R metamist-legacy-client/metamist/api/ metamist/api/
cp -R metamist-legacy-client/metamist/apis/ metamist/apis/
cp -R metamist-legacy-client/metamist/model/ metamist/model/
cp -R metamist-legacy-client/metamist/models/ metamist/models/
cp metamist-legacy-client/metamist/*.py metamist/
- name: "List"
run: |
ls -la metamist
ls -la metamist/api
ls -la metamist/apis
ls -la metamist/models
ls -la metamist/model
15 changes: 15 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,21 @@ jobs:
-f deploy/api/Dockerfile \
.
- uses: actions/checkout@master
with:
name: populationgenomics/metamist
ref: refs/b142392
path: metamist-legacy-client

- name: "Copy python api files"
run: |
cp -R metamist-legacy-client/api/ metamist/api/
cp -R metamist-legacy-client/metamist/api/ metamist/api/
cp -R metamist-legacy-client/metamist/apis/ metamist/apis/
cp -R metamist-legacy-client/metamist/model/ metamist/model/
cp -R metamist-legacy-client/metamist/models/ metamist/models/
cp metamist-legacy-client/metamist/*.py metamist/
- name: "build deployable API"
run: |
export OPENAPI_COMMAND="java -jar openapi-generator-cli.jar"
Expand Down
7 changes: 0 additions & 7 deletions regenerate_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,13 +344,6 @@ def main():
try:
assert_server_is_accessible()

# Generate the installable Python API
generate_api_and_copy(
'python',
copy_python_files_from,
['--template-dir', 'openapi-templates'],
)

# Generate the Typescript API for React application
generate_api_and_copy(
'typescript-axios',
Expand Down

0 comments on commit d5820f1

Please sign in to comment.