Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/generating-gateway-api-specs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Whenever new changes are released in the Gateway API, it is important to update the public documentation specs.

1. run `npx @redocly/cli@latest build-docs gateway-api-schema.yaml --output=gateway-api-specs.html`
2. upload generated `gateway-api-specs.html` file to https://github.com/shambupujar/radix-docs/tree/release/static/api-reference
3. Contact with repository owner (Shambu) to deploy them.
41 changes: 41 additions & 0 deletions docs/releasing-new-version.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
General approach to releasing Gateway API:

1. Crate Git release branch `release/v{major.minor.path}` i.e `release/v1.10.6`.
2. Test Gateway and verify that it works correctly.
3. Make sure to update software version numbers.
1. update `VersionPrefix` property in `directory.build.props`
2. update `Version` in [gateway-api-schema.yaml](../src/RadixDlt.NetworkGateway.GatewayApi/gateway-api-schema.yaml) file.
4. Regenerate gateway models by executing [script](../generation/regenerate-gateway-api.py).
```
cd generation/
python regenerate-gateway-api.py
```
5. Regenerate typescript SDK by executing [script](../sdk/typescript/regeneration/generate-typescript-client.py).
```
cd sdk/typescript/regeneration/
python generate-typescript-client.py
```
6. Update [docker-compose.yml](../deployment/docker-compose.yml) image versions pre-emptively (images are still not yet published but to prevent multiple roundtrips to git we can already provide them).
```
cd generation/
python update-docker-compose.py {old_version} {new_version} #i.e python update-docker-compose.py v1.10.6 v1.10.7
```
7. Make sure to commit all changes made in steps 3, 4, 5, 6.
8. Merge the release branch created in step 1. (`release/v{major.minor.path}`) to `main` branch.
9. Create GitHub release `v{major.minor.path}` draft.
1. Create a new tag with `v{major.minor.path}` version on `main` branch.
2. Mark it as pre-release.
10. Publish docker images to repository:
1. https://hub.docker.com/r/radixdlt/babylon-ng-gateway-api
2. https://hub.docker.com/r/radixdlt/babylon-ng-data-aggregator
3. https://hub.docker.com/r/radixdlt/babylon-ng-database-migrations
11. Publish new images to Gateway running on **stokenet** network.
12. Publish API specs docs for **stokenet** network (https://docs.radixdlt.com/api-reference/gateway-api-preview-specs)
13. Verify if it works correctly on **stokenet** network.
14. Publish new images to Gateway running on **mainnet** network.
15. Publish API specs docs for **mainnet** network (available here: https://docs.radixdlt.com/api-reference/gateway-api-specs)
16. Publish typescript SDK created in step 5. to npmjs repository (https://www.npmjs.com/package/@radixdlt/babylon-gateway-api-sdk).
17. Update GitHub release created in step 9 and mark it `Set as the latest release`.
18. Announce release publicly.
19. Merge `main` branch back to `develop`.

16 changes: 16 additions & 0 deletions docs/updating-core-api-dependency.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Gateway API depends on the node’s Core API.

When the Core API schema changes, we need to update the generated Core API client to consume new features. Follow these steps:

1. Copy spec file from [node repository](https://github.com/radixdlt/babylon-node/blob/develop/core-rust/core-api-server/core-api-schema.yaml).
- Rename it to `core-api-spec-copy.yaml`
- Place it in `babylon-gateway\src\RadixDlt.CoreApiSdk\core-api-spec-copy.yaml`
2. Execute [this script](regenerate-core-api.py) to regenerate Core API Client.
```
cd babylon-gateway\generation\
python regenerate-core-api.py
```
3. Ensure the project builds successfully after upgrading the Core API client:
```
dotnet build
```
26 changes: 26 additions & 0 deletions generation/update-docker-compose.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import sys
from pathlib import Path

if len(sys.argv) != 3:
print("Usage: python replace_version.py <old_value> <new_value>")
sys.exit(1)

old_value = sys.argv[1]
new_value = sys.argv[2]

file_path = Path("../deployment/docker-compose.yml")

if not file_path.exists():
print(f"Error: {file_path} not found")
sys.exit(1)

# Read file
content = file_path.read_text(encoding="utf-8")

# Replace text
updated_content = content.replace(old_value, new_value)

# Write back
file_path.write_text(updated_content, encoding="utf-8")

print(f"Replaced '{old_value}' with '{new_value}' in {file_path}")
Loading