Skip to content

Commit 695636c

Browse files
authored
Merge pull request #67 from hotdata-dev/openapi-update-26135341240
chore: regenerate client from updated OpenAPI spec
2 parents 981fbc8 + c17c63e commit 695636c

7 files changed

Lines changed: 67 additions & 21 deletions

File tree

.gitlab-ci.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# NOTE: This file is auto generated by OpenAPI Generator.
2+
# URL: https://openapi-generator.tech
3+
#
4+
# ref: https://docs.gitlab.com/ee/ci/README.html
5+
# ref: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml
6+
7+
stages:
8+
- test
9+
10+
.pytest:
11+
stage: test
12+
script:
13+
- pip install -r requirements.txt
14+
- pip install -r test-requirements.txt
15+
- pytest --cov=hotdata
16+
17+
pytest-3.9:
18+
extends: .pytest
19+
image: python:3.9-alpine
20+
pytest-3.10:
21+
extends: .pytest
22+
image: python:3.10-alpine
23+
pytest-3.11:
24+
extends: .pytest
25+
image: python:3.11-alpine
26+
pytest-3.12:
27+
extends: .pytest
28+
image: python:3.12-alpine
29+
pytest-3.13:
30+
extends: .pytest
31+
image: python:3.13-alpine

.openapi-generator/FILES

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,4 @@ requirements.txt
293293
setup.cfg
294294
test-requirements.txt
295295
test/__init__.py
296-
test/test_load_managed_table_request.py
297-
test/test_load_managed_table_response.py
298296
tox.ini

docs/ResultsApi.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,18 @@ Retrieve a persisted query result by ID. The response format for the `ready` sta
1919
|-----------------------|------------------------------------------------------------------------------|
2020
| `ready` + JSON | 200 `application/json``GetResultResponse` with `columns`, `rows`, etc. |
2121
| `ready` + Arrow | 200 `application/vnd.apache.arrow.stream` — schema, RecordBatches, EOS |
22+
| `ready` + CSV | 200 `text/csv; charset=utf-8` — single header row, streamed batch-by-batch |
23+
| `ready` + Markdown | 200 `text/markdown; charset=utf-8` — GitHub-flavored pipe table, streamed |
24+
| `ready` + Parquet | 200 `application/vnd.apache.parquet` — raw parquet bytes (no conversion) |
2225
| `pending`/`processing`| 202 `application/json` `{status, result_id}` + `Retry-After` |
2326
| `failed` | 409 `application/json` `{status, result_id, error_message}` |
2427
| not found | 404 `application/json` (`ApiErrorResponse`) |
2528

26-
`?format=arrow` (or `?format=json`) takes precedence over `Accept`. Use `?offset=N&limit=M` to slice the result; `offset` defaults to 0 and `limit` is unbounded by default. Both must be non-negative; invalid values return 400. When a finite `limit` doesn't reach the end of the result, a `Link` header with `rel="next"` points at the following page.
29+
`?format=` accepts `arrow`, `json`, `csv`, `md`, `parquet` and takes precedence over `Accept`. `markdown` is accepted as a runtime alias for `md` (the OpenAPI enum lists only `md` to keep the SDK shape clean). Use `?offset=N&limit=M` to slice the result; `offset` defaults to 0 and `limit` is unbounded by default. Both must be non-negative; invalid values return 400. When a finite `limit` doesn't reach the end of the result, a `Link` header with `rel="next"` points at the following page. `?offset`/`?limit` are ignored for `format=parquet` since that path returns the underlying file unchanged.
2730

28-
Ready responses (both formats) carry `X-Total-Row-Count` (full result row count from parquet metadata, independent of offset/limit). The Arrow path streams end-to-end with no spawned task between the parquet reader and the wire — clients can disconnect at any time and the server stops reading.
31+
Ready responses (Arrow, CSV, Markdown, JSON) carry `X-Total-Row-Count` (full result row count from parquet metadata, independent of offset/limit). The streaming paths run end-to-end with no spawned task between the parquet reader and the wire — clients can disconnect at any time and the server stops reading.
32+
33+
IEEE special floats (`±Inf`, `NaN`) have no canonical JSON representation. For cross-format consistency the JSON, CSV, and Markdown paths emit them as `null` / empty cells, and JSON `nullable[]` is widened to match. The Arrow IPC and Parquet bodies are binary round-trip formats and preserve the raw IEEE values; callers cross-checking a result across CSV and Parquet should not byte-compare those slots.
2934

3035
### Example
3136

@@ -75,7 +80,7 @@ with hotdata.ApiClient(configuration) as api_client:
7580
id = 'id_example' # str | Result ID
7681
offset = 56 # int | Rows to skip (default: 0) (optional)
7782
limit = 56 # int | Maximum rows to return (default: unbounded) (optional)
78-
format = hotdata.ResultsFormatQuery() # ResultsFormatQuery | `arrow` or `json` — overrides the `Accept` header. (optional)
83+
format = hotdata.ResultsFormatQuery() # ResultsFormatQuery | `arrow`, `json`, `csv`, `md`, or `parquet` — overrides the `Accept` header. `markdown` is also accepted at runtime as an alias for `md`, but is not in the OpenAPI enum to keep the SDK shape clean. (optional)
7984

8085
try:
8186
# Get result
@@ -96,7 +101,7 @@ Name | Type | Description | Notes
96101
**id** | **str**| Result ID |
97102
**offset** | **int**| Rows to skip (default: 0) | [optional]
98103
**limit** | **int**| Maximum rows to return (default: unbounded) | [optional]
99-
**format** | [**ResultsFormatQuery**](.md)| `arrow` or `json` — overrides the `Accept` header. | [optional]
104+
**format** | [**ResultsFormatQuery**](.md)| `arrow`, `json`, `csv`, `md`, or `parquet` — overrides the `Accept` header. `markdown` is also accepted at runtime as an alias for `md`, but is not in the OpenAPI enum to keep the SDK shape clean. | [optional]
100105

101106
### Return type
102107

@@ -109,13 +114,13 @@ Name | Type | Description | Notes
109114
### HTTP request headers
110115

111116
- **Content-Type**: Not defined
112-
- **Accept**: application/json, application/vnd.apache.arrow.stream
117+
- **Accept**: application/json, application/vnd.apache.arrow.stream, text/csv, text/markdown, application/vnd.apache.parquet
113118

114119
### HTTP response details
115120

116121
| Status code | Description | Response headers |
117122
|-------------|-------------|------------------|
118-
**200** | Result data. JSON callers receive &#x60;GetResultResponse&#x60;. Arrow callers receive an Arrow IPC stream — a sequence of IPC messages: schema header, then RecordBatch messages, then EOS. | * Link - RFC 5988 &#x60;Link&#x60; header with &#x60;rel&#x3D;\&quot;next\&quot;&#x60; pointing at the next page when a finite &#x60;limit&#x60; does not reach the end of the result. <br> * X-Total-Row-Count - Total rows in the full result, ignoring offset/limit. Present only when status is &#x60;ready&#x60;. <br> |
123+
**200** | Result data. The body depends on the negotiated format: JSON callers receive &#x60;GetResultResponse&#x60;; Arrow callers receive an Arrow IPC stream; CSV callers receive comma-separated text (LF-terminated, double-quote escaped, RFC 4180-style quoting but not RFC 4180-strict on line endings); Markdown callers receive a single GitHub-flavored pipe table; Parquet callers receive the raw parquet bytes from object storage. Non-finite floats (&#x60;±Inf&#x60;, &#x60;NaN&#x60;) render as &#x60;null&#x60; (JSON) or empty cells (CSV, Markdown) for cross-format consistency. &#x60;Accept&#x60; is treated as a flat content-type list — &#x60;q&#x3D;&#x60; quality values are ignored; use &#x60;?format&#x3D;&#x60; to disambiguate. | * Link - RFC 5988 &#x60;Link&#x60; header with &#x60;rel&#x3D;\&quot;next\&quot;&#x60; pointing at the next page when a finite &#x60;limit&#x60; does not reach the end of the result. <br> * X-Total-Row-Count - Total rows in the full result, ignoring offset/limit. Present only when status is &#x60;ready&#x60;. <br> |
119124
**202** | Result is still being computed (&#x60;pending&#x60; or &#x60;processing&#x60;). Poll the same URL. | * Retry-After - Suggested seconds before the next poll. <br> |
120125
**400** | Invalid offset, limit, or format. | - |
121126
**404** | Result not found. | - |

docs/ResultsFormatQuery.md

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

3-
Schema for the `?format=` query parameter on `GET /v1/results/{id}`. Documents the canonical values accepted (`arrow`, `json`). The handler's negotiator (`negotiate_results_format`) is intentionally permissive — case-insensitive, with unknown values falling through to the `Accept` header — so this enum only declares the spec-level contract for clients and SDK generators.
3+
Schema for the `?format=` query parameter on `GET /v1/results/{id}`. Documents the canonical values that SDKs should treat as a closed set (`arrow`, `json`, `csv`, `md`, `parquet`). The runtime handler's negotiator (`negotiate_results_format`) additionally accepts `markdown` as an alias for `md` — case-insensitive, with unknown values falling through to the `Accept` header — but `markdown` is intentionally NOT listed in this enum so SDK generators emit a single canonical `Markdown` (or equivalent) variant rather than two distinct ones for the same logical format.
44

55
## Enum
66

77
* `ARROW` (value: `'arrow'`)
88

99
* `JSON` (value: `'json'`)
1010

11+
* `CSV` (value: `'csv'`)
12+
13+
* `MD` (value: `'md'`)
14+
15+
* `PARQUET` (value: `'parquet'`)
16+
1117
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1218

1319

0 commit comments

Comments
 (0)