Skip to content

Commit

Permalink
Rename root openapi.json to lib-openapi.json (#1653)
Browse files Browse the repository at this point in the history
  • Loading branch information
svix-jplatte authored Jan 20, 2025
2 parents 88c0496 + aeea6ae commit 6676cce
Show file tree
Hide file tree
Showing 16 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cli-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/csharp-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
paths:
- "csharp/**"
- "openapi.json"
- "lib-openapi.json"
- '.github/workflows/csharp-lint.yml'

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/go-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- "go/**"
- "go.sum"
- "go.mod"
- "openapi.json"
- "lib-openapi.json"
- ".github/workflows/go-ci.yml"

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/go-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
pull_request:
paths:
- "go/**"
- "openapi.json"
- "lib-openapi.json"
jobs:
build:
runs-on: ubuntu-24.04
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/java-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
pull_request:
paths:
- "java/**"
- "openapi.json"
- "lib-openapi.json"
jobs:
dotnet:
name: Java Lint
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/javascript-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
paths:
- "javascript/**"
- "openapi.json"
- "lib-openapi.json"
- '.github/workflows/javascript-lint.yml'

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/javascript-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- main
paths:
- 'openapi.json'
- 'lib-openapi.json'
- 'javascript/**'
- '.github/workflows/javascript-release.yml'
workflow_dispatch:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/kotlin-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
paths:
- "kotlin/**"
- "openapi.json"
- "lib-openapi.json"
- '.github/workflows/kotlin-lint.yml'

jobs:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/python-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ruby-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
paths:
- "ruby/**"
- "openapi.json"
- "lib-openapi.json"
- '.github/workflows/ruby-lint.yml'

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rust-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions python/scripts/generate_openapi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
touch __init__.py
4 changes: 2 additions & 2 deletions regen_openapi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
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")
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
Expand Down
2 changes: 1 addition & 1 deletion tools/bump_version.js
Original file line number Diff line number Diff line change
Expand Up @@ -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, "..");
Expand Down

0 comments on commit 6676cce

Please sign in to comment.