From aeea6ae2d96e686bb4eaf087031840175703a6de Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Mon, 20 Jan 2025 19:52:54 +0100 Subject: [PATCH] Rename root openapi.json to lib-openapi.json To make it less likely to be confused with server/openapi.json. --- .github/workflows/cli-lint.yml | 2 +- .github/workflows/csharp-lint.yml | 2 +- .github/workflows/go-ci.yml | 2 +- .github/workflows/go-lint.yml | 2 +- .github/workflows/java-lint.yml | 2 +- .github/workflows/javascript-lint.yml | 2 +- .github/workflows/javascript-release.yml | 2 +- .github/workflows/kotlin-lint.yml | 2 +- .github/workflows/python-lint.yml | 4 ++-- .github/workflows/python-tests.yml | 4 ++-- .github/workflows/ruby-lint.yml | 2 +- .github/workflows/rust-lint.yml | 2 +- openapi.json => lib-openapi.json | 0 python/scripts/generate_openapi.sh | 4 ++-- regen_openapi.sh | 4 ++-- tools/bump_version.js | 2 +- 16 files changed, 19 insertions(+), 19 deletions(-) rename openapi.json => lib-openapi.json (100%) diff --git a/.github/workflows/cli-lint.yml b/.github/workflows/cli-lint.yml index bcfcaafe0..413fb4fad 100644 --- a/.github/workflows/cli-lint.yml +++ b/.github/workflows/cli-lint.yml @@ -13,7 +13,7 @@ on: - 'svix-cli/**' - 'rust/**' - '.github/workflows/cli-lint.yml' - - 'openapi.json' + - 'lib-openapi.json' # When pushing to a PR, cancel any jobs still running for the previous head commit of the PR concurrency: diff --git a/.github/workflows/csharp-lint.yml b/.github/workflows/csharp-lint.yml index 5ffc09978..27d84b4fd 100644 --- a/.github/workflows/csharp-lint.yml +++ b/.github/workflows/csharp-lint.yml @@ -4,7 +4,7 @@ on: pull_request: paths: - "csharp/**" - - "openapi.json" + - "lib-openapi.json" - '.github/workflows/csharp-lint.yml' jobs: diff --git a/.github/workflows/go-ci.yml b/.github/workflows/go-ci.yml index 020db4802..2ff4026f1 100644 --- a/.github/workflows/go-ci.yml +++ b/.github/workflows/go-ci.yml @@ -6,7 +6,7 @@ on: - "go/**" - "go.sum" - "go.mod" - - "openapi.json" + - "lib-openapi.json" - ".github/workflows/go-ci.yml" jobs: diff --git a/.github/workflows/go-lint.yml b/.github/workflows/go-lint.yml index bd28ecdf3..cd5f763d6 100644 --- a/.github/workflows/go-lint.yml +++ b/.github/workflows/go-lint.yml @@ -3,7 +3,7 @@ on: pull_request: paths: - "go/**" - - "openapi.json" + - "lib-openapi.json" jobs: build: runs-on: ubuntu-24.04 diff --git a/.github/workflows/java-lint.yml b/.github/workflows/java-lint.yml index 9afbfc242..8fb731c48 100644 --- a/.github/workflows/java-lint.yml +++ b/.github/workflows/java-lint.yml @@ -3,7 +3,7 @@ on: pull_request: paths: - "java/**" - - "openapi.json" + - "lib-openapi.json" jobs: dotnet: name: Java Lint diff --git a/.github/workflows/javascript-lint.yml b/.github/workflows/javascript-lint.yml index f9cd60031..64ed2634b 100644 --- a/.github/workflows/javascript-lint.yml +++ b/.github/workflows/javascript-lint.yml @@ -4,7 +4,7 @@ on: pull_request: paths: - "javascript/**" - - "openapi.json" + - "lib-openapi.json" - '.github/workflows/javascript-lint.yml' jobs: diff --git a/.github/workflows/javascript-release.yml b/.github/workflows/javascript-release.yml index cfa50f631..1a06162cb 100644 --- a/.github/workflows/javascript-release.yml +++ b/.github/workflows/javascript-release.yml @@ -5,7 +5,7 @@ on: branches: - main paths: - - 'openapi.json' + - 'lib-openapi.json' - 'javascript/**' - '.github/workflows/javascript-release.yml' workflow_dispatch: diff --git a/.github/workflows/kotlin-lint.yml b/.github/workflows/kotlin-lint.yml index 89404d1d0..053946731 100644 --- a/.github/workflows/kotlin-lint.yml +++ b/.github/workflows/kotlin-lint.yml @@ -4,7 +4,7 @@ on: pull_request: paths: - "kotlin/**" - - "openapi.json" + - "lib-openapi.json" - '.github/workflows/kotlin-lint.yml' jobs: diff --git a/.github/workflows/python-lint.yml b/.github/workflows/python-lint.yml index 1bd8d5f7a..a83f1cf8c 100644 --- a/.github/workflows/python-lint.yml +++ b/.github/workflows/python-lint.yml @@ -5,12 +5,12 @@ on: - main paths: - "python/**" - - "openapi.json" + - "lib-openapi.json" - ".github/workflows/python-lint.yml" pull_request: paths: - "python/**" - - "openapi.json" + - "lib-openapi.json" - ".github/workflows/python-lint.yml" jobs: build: diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index d339645be..ad043c0a1 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -5,13 +5,13 @@ on: - main paths: - "python/**" - - "openapi.json" + - "lib-openapi.json" - "server/**" - ".github/workflows/python-tests.yml" pull_request: paths: - "python/**" - - "openapi.json" + - "lib-openapi.json" - "server/**" - ".github/workflows/python-tests.yml" jobs: diff --git a/.github/workflows/ruby-lint.yml b/.github/workflows/ruby-lint.yml index 58efe1cb8..454a84c29 100644 --- a/.github/workflows/ruby-lint.yml +++ b/.github/workflows/ruby-lint.yml @@ -4,7 +4,7 @@ on: pull_request: paths: - "ruby/**" - - "openapi.json" + - "lib-openapi.json" - '.github/workflows/ruby-lint.yml' jobs: diff --git a/.github/workflows/rust-lint.yml b/.github/workflows/rust-lint.yml index 84511ef9c..7c40f352b 100644 --- a/.github/workflows/rust-lint.yml +++ b/.github/workflows/rust-lint.yml @@ -11,7 +11,7 @@ on: paths: - 'rust/**' - '.github/workflows/rust-lint.yml' - - "openapi.json" + - "lib-openapi.json" # When pushing to a PR, cancel any jobs still running for the previous head commit of the PR concurrency: diff --git a/openapi.json b/lib-openapi.json similarity index 100% rename from openapi.json rename to lib-openapi.json diff --git a/python/scripts/generate_openapi.sh b/python/scripts/generate_openapi.sh index 09f25d857..fded996a7 100755 --- a/python/scripts/generate_openapi.sh +++ b/python/scripts/generate_openapi.sh @@ -10,8 +10,8 @@ else COMMAND="update" fi -openapi-python-client $COMMAND --path ../../openapi.json --custom-template-path=../templates --config ../openapi-generator-config.json +openapi-python-client $COMMAND --path ../../lib-openapi.json --custom-template-path=../templates --config ../openapi-generator-config.json cd internal -touch __init__.py \ No newline at end of file +touch __init__.py diff --git a/regen_openapi.sh b/regen_openapi.sh index 3f30e370d..dfa33886c 100755 --- a/regen_openapi.sh +++ b/regen_openapi.sh @@ -3,7 +3,7 @@ set -exo pipefail if [ -n "$1" ]; then - curl "$1" | python -m json.tool > openapi.json + curl "$1" | python -m json.tool > lib-openapi.json fi cd $(dirname "$0") @@ -11,7 +11,7 @@ mkdir -p .codegen-tmp # OpenAPI version has to be overwritten to avoid broken codegen paths in OpenAPI generator. # Spec version is overwritten to avoid unnecessary diffs on comments. Same for description. jq --indent 4 '.openapi = "3.0.2" | .info.version = "1.1.1" | del(.info.description)' \ - < openapi.json \ + < lib-openapi.json \ > .codegen-tmp/openapi.json # For some languages, write a separate OpenAPI spec file where optional fields diff --git a/tools/bump_version.js b/tools/bump_version.js index 96c1df996..47c6ee15c 100755 --- a/tools/bump_version.js +++ b/tools/bump_version.js @@ -38,7 +38,7 @@ const filesPaths = [ // OpenAPI spec "server/openapi.json", // Cloud OpenAPI spec - not necessary but any other time of updating seems weirder - "openapi.json", + "lib-openapi.json", ]; const rootDir = join(__dirname, "..");