Skip to content

Commit 210d655

Browse files
committed
feat: migrate to com.qtsurfer:api-client 0.2.0 via JitPack custom domain
- Maven coordinates: com.github.QTSurfer:api-client-java -> com.qtsurfer:api-client - Java packages renamed: net.qtsurfer.api.client -> com.qtsurfer.api.client - OpenAPI generator output updated to com.qtsurfer.api.client.{api,model,invoker} - CI: release job added, tags now without v prefix (0.2.0 instead of v0.2.0)
1 parent 4da1f6b commit 210d655

7 files changed

Lines changed: 59 additions & 26 deletions

File tree

.github/workflows/ci.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: CI
33
on:
44
push:
55
branches: [main]
6+
tags: ['[0-9]*.[0-9]*.[0-9]*']
67
pull_request:
78
branches: [main]
89

@@ -17,3 +18,27 @@ jobs:
1718
distribution: 'temurin'
1819
cache: 'maven'
1920
- run: mvn -B verify
21+
22+
release:
23+
needs: build
24+
runs-on: ubuntu-latest
25+
if: startsWith(github.ref, 'refs/tags/')
26+
permissions:
27+
contents: write
28+
steps:
29+
- uses: actions/checkout@v4
30+
- name: Extract changelog for ${{ github.ref_name }}
31+
id: changelog
32+
run: |
33+
VERSION="${GITHUB_REF_NAME}"
34+
NOTES=$(awk "/^## \[$VERSION\]/{found=1; next} found && /^## \[/{exit} found{print}" CHANGELOG.md)
35+
echo "notes<<EOF" >> "$GITHUB_OUTPUT"
36+
echo "$NOTES" >> "$GITHUB_OUTPUT"
37+
echo "EOF" >> "$GITHUB_OUTPUT"
38+
- name: Create GitHub Release
39+
env:
40+
GH_TOKEN: ${{ github.token }}
41+
run: |
42+
gh release create "$GITHUB_REF_NAME" \
43+
--title "$GITHUB_REF_NAME" \
44+
--notes "${{ steps.changelog.outputs.notes }}"

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
# Changelog
22

3-
All notable changes to `net.qtsurfer:api-client` are documented here.
3+
All notable changes to `com.qtsurfer:api-client` are documented here.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
88

9+
## [0.2.0] — 2026-05-17
10+
11+
### Changed
12+
13+
- Maven coordinates migrated to `com.qtsurfer:api-client` via JitPack custom domain (`git.qtsurfer.com`). Consumers should replace `com.github.QTSurfer:api-client-java:v0.1.x` with `com.qtsurfer:api-client:0.2.0`.
14+
- Java packages renamed from `net.qtsurfer.api.client` to `com.qtsurfer.api.client` throughout.
15+
- Tags no longer use the `v` prefix (e.g. `0.2.0` instead of `v0.2.0`); CI release workflow updated accordingly.
16+
917
## [0.1.1] — 2026-04-15
1018

1119
### Fixed

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
</p>
1313

1414
<p align="center">
15-
<code>net.qtsurfer:api-client</code> · <code>com.github.QTSurfer:api-client-java</code>
15+
<code>com.qtsurfer:api-client</code> · <code>com.qtsurfer:api-client</code>
1616
</p>
1717

1818
---
1919

20-
Intentionally thin: one method per endpoint, 1:1 with the spec. For workflow orchestration (polling, retries, domain objects, unified errors), use [`net.qtsurfer:sdk`](https://github.com/QTSurfer/sdk-java).
20+
Intentionally thin: one method per endpoint, 1:1 with the spec. For workflow orchestration (polling, retries, domain objects, unified errors), use [`com.qtsurfer:sdk`](https://github.com/QTSurfer/sdk-java).
2121

2222
- **Zero HTTP runtime deps**`java.net.http.HttpClient` (JDK built-in) + Jackson for JSON.
2323
- **Spec-driven** — generated sources fetched from [`QTSurfer/qtsurfer-api`](https://github.com/QTSurfer/qtsurfer-api) on every build.
@@ -39,29 +39,29 @@ Add the JitPack repository and the dependency:
3939
</repositories>
4040

4141
<dependency>
42-
<groupId>com.github.QTSurfer</groupId>
42+
<groupId>com.qtsurfer</groupId>
4343
<artifactId>api-client-java</artifactId>
44-
<version>v0.1.2</version>
44+
<version>0.2.0</version>
4545
</dependency>
4646
```
4747

4848
For Gradle:
4949

5050
```gradle
5151
repositories { maven { url 'https://jitpack.io' } }
52-
dependencies { implementation 'com.github.QTSurfer:api-client-java:v0.1.2' }
52+
dependencies { implementation 'com.qtsurfer:api-client:0.2.0' }
5353
```
5454

5555
### Via Maven Central (future)
5656

57-
Once published to Central, the coordinate will be `net.qtsurfer:api-client:0.1.2`.
57+
Once published to Central, the coordinate will be `com.qtsurfer:api-client:0.1.2`.
5858

5959
## Quick start
6060

6161
```java
62-
import net.qtsurfer.api.client.api.ExchangeApi;
63-
import net.qtsurfer.api.client.invoker.ApiClient;
64-
import net.qtsurfer.api.client.model.Exchange;
62+
import com.qtsurfer.api.client.api.ExchangeApi;
63+
import com.qtsurfer.api.client.invoker.ApiClient;
64+
import com.qtsurfer.api.client.model.Exchange;
6565

6666
import java.util.List;
6767

@@ -83,15 +83,15 @@ List<Exchange> result = exchanges.getExchanges();
8383
| `StrategyApi` | `postStrategy(body, xCompileAsync)`, `getStrategyStatus(strategyId)` |
8484
| `BacktestingApi` | `prepareBacktesting`, `getPreparationStatus`, `executeBacktesting`, `cancelExecution`, `getExecutionResult` |
8585

86-
All generated model types (`Exchange`, `InstrumentDetail`, `JobState`, `BacktestJobResult`, `ResultMap`, `ResponseError`, …) live under `net.qtsurfer.api.client.model`.
86+
All generated model types (`Exchange`, `InstrumentDetail`, `JobState`, `BacktestJobResult`, `ResultMap`, `ResponseError`, …) live under `com.qtsurfer.api.client.model`.
8787

8888
### Binary downloads (`/exchange/{ex}/tickers|klines/{base}/{quote}`)
8989

9090
These endpoints return raw [Lastra](https://github.com/QTSurfer/lastra-java) bytes (default) or Parquet (`format=parquet`). The auto-generated `ExchangeApi.getExchangeTickersHour` / `getExchangeKlinesHour` methods are unusable for binary payloads — openapi-generator's `native` library decodes the body as UTF-8 and feeds it to Jackson, which corrupts the bytes. Use `ExchangeBinaryDownloads` instead:
9191

9292
```java
93-
import net.qtsurfer.api.client.binary.ExchangeBinaryDownloads;
94-
import net.qtsurfer.api.client.binary.ExchangeBinaryDownloads.Format;
93+
import com.qtsurfer.api.client.binary.ExchangeBinaryDownloads;
94+
import com.qtsurfer.api.client.binary.ExchangeBinaryDownloads.Format;
9595

9696
ExchangeBinaryDownloads downloads = new ExchangeBinaryDownloads(client);
9797
try (var in = downloads.getTickersHour("binance", "BTC", "USDT", "2026-01-15T10")) {

pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
55
<modelVersion>4.0.0</modelVersion>
66

7-
<groupId>net.qtsurfer</groupId>
7+
<groupId>com.qtsurfer</groupId>
88
<artifactId>api-client</artifactId>
9-
<version>0.1.2</version>
9+
<version>0.2.0</version>
1010
<packaging>jar</packaging>
1111

1212
<name>QTSurfer API Client</name>
@@ -120,9 +120,9 @@
120120
<generatorName>java</generatorName>
121121
<library>native</library>
122122
<output>${generated.sources.dir}</output>
123-
<apiPackage>net.qtsurfer.api.client.api</apiPackage>
124-
<modelPackage>net.qtsurfer.api.client.model</modelPackage>
125-
<invokerPackage>net.qtsurfer.api.client.invoker</invokerPackage>
123+
<apiPackage>com.qtsurfer.api.client.api</apiPackage>
124+
<modelPackage>com.qtsurfer.api.client.model</modelPackage>
125+
<invokerPackage>com.qtsurfer.api.client.invoker</invokerPackage>
126126
<generateApiTests>false</generateApiTests>
127127
<generateModelTests>false</generateModelTests>
128128
<generateApiDocumentation>false</generateApiDocumentation>

src/main/java/net/qtsurfer/api/client/binary/ExchangeBinaryDownloads.java renamed to src/main/java/com/qtsurfer/api/client/binary/ExchangeBinaryDownloads.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
package net.qtsurfer.api.client.binary;
1+
package com.qtsurfer.api.client.binary;
22

3-
import net.qtsurfer.api.client.invoker.ApiClient;
4-
import net.qtsurfer.api.client.invoker.ApiException;
3+
import com.qtsurfer.api.client.invoker.ApiClient;
4+
import com.qtsurfer.api.client.invoker.ApiException;
55

66
import java.io.IOException;
77
import java.io.InputStream;

src/test/java/net/qtsurfer/api/client/ClientSmokeTest.java renamed to src/test/java/com/qtsurfer/api/client/ClientSmokeTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
package net.qtsurfer.api.client;
1+
package com.qtsurfer.api.client;
22

3-
import net.qtsurfer.api.client.invoker.ApiClient;
3+
import com.qtsurfer.api.client.invoker.ApiClient;
44
import org.junit.jupiter.api.Test;
55

66
import static org.junit.jupiter.api.Assertions.assertEquals;

src/test/java/net/qtsurfer/api/client/binary/ExchangeBinaryDownloadsTest.java renamed to src/test/java/com/qtsurfer/api/client/binary/ExchangeBinaryDownloadsTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
package net.qtsurfer.api.client.binary;
1+
package com.qtsurfer.api.client.binary;
22

33
import com.sun.net.httpserver.HttpExchange;
44
import com.sun.net.httpserver.HttpServer;
5-
import net.qtsurfer.api.client.invoker.ApiClient;
6-
import net.qtsurfer.api.client.invoker.ApiException;
5+
import com.qtsurfer.api.client.invoker.ApiClient;
6+
import com.qtsurfer.api.client.invoker.ApiException;
77
import org.junit.jupiter.api.AfterEach;
88
import org.junit.jupiter.api.BeforeEach;
99
import org.junit.jupiter.api.Test;

0 commit comments

Comments
 (0)