Repository navigation
Releases: codybrom/openapi-fdw
Release list
v0.2.0
v0.1.4
Robustness & validation
- Type coercion for injected parameters — Path and query param values injected into result rows are now coerced to the target column type (bool, int, float, date, timestamp, etc.) instead of always returning strings.
- Auth mutual exclusivity — Setting both
api_keyandbearer_tokennow returns a clear error instead of silently emitting duplicate auth headers. - Strict option validation — Invalid
headersJSON, non-string header values, and non-numericpage_sizevalues now produce errors instead of being silently ignored.
Schema generation (IMPORT FOREIGN SCHEMA)
- Full-path table naming — Tables are now named using the full endpoint path (
/v1/users→v1_users) to avoid collisions between endpoints like/v1/usersand/v2/users. - Smarter
rowid_column— Prefersid, falls back to the first non-jsonb scalar column, or omits entirely. No longer defaults toattrs. include_attrsoption — New server option to omit theattrsjsonb column from generated tables. Setinclude_attrs 'false'on the server.- Deduplicate
attrs— Theattrscolumn is no longer appended if the OpenAPI schema already defines a property namedattrs.
Pagination
- Relative URL handling — Query-only pagination links (
?page=2) now correctly resolve againstbase_url + endpointinstead of justbase_url. - Broader auto-detection — Added
next_urlfield variants (/pagination/next_url,/links/next_url, etc.) to the auto-detection list.
Full Changelog: v0.1.3...v0.1.4
v0.1.3
Performance
- Avoid cloning JSON response data — Row extraction now uses
pointer_mut+Value::take()to move data out of the parsed JSON response instead of cloning every array element. This eliminates duplicate allocations for large responses (e.g. 100 GeoJSON features with geometry).
Tests
- Added 14 unit tests covering
json_to_rows,extract_data(all code paths: response_path, direct array, auto-detect wrapper keys, single object fallback), ownership verification, andto_camel_case.
Full Changelog: v0.1.2...v0.1.3
v0.1.2
Fixes
-
Prefer WHERE clause value for query/path param columns — When a column is used as a query or path parameter, the FDW now injects the WHERE clause value directly into result rows instead of using the API response value. This fixes a case mismatch issue where APIs accept one casing (e.g.
?status=actual) but return another (e.g."Actual"), which caused PostgreSQL's post-filter to drop all rows. (Fixes #2) -
Inject query param values back into result rows — Query parameters extracted from WHERE clauses are now stored and injected back into rows when the API response doesn't contain the field. Previously, query-param-only columns (like
region_type) would be null, causing PostgreSQL's post-filter to drop all rows. (Fixes #1)
Full Changelog: v0.1.0...v0.1.2
v0.1.1
Full Changelog: v0.1.0...v0.1.1
Full Changelog: v0.1.0...v0.1.1
v0.1.0
Full Changelog: https://github.com/codybrom/openapi-fdw/commits/v0.1.0