Skip to content

feat: infer writable OpenAPI operations - #13

Merged
sabino merged 5 commits into
mainfrom
feat/openapi-writable-imports
Aug 14, 2026
Merged

feat: infer writable OpenAPI operations#13
sabino merged 5 commits into
mainfrom
feat/openapi-writable-imports

Conversation

@sabino

@sabino sabino commented Aug 14, 2026

Copy link
Copy Markdown
Owner

Stacked on #12.

What changed

  • add IMPORT FOREIGN SCHEMA ... OPTIONS (writable 'true')
  • pair GET collections with POST and one-identity item PATCH/PUT/DELETE operations
  • infer row identity, request-only columns, readOnly exclusions, JSON names, and body whitelists from OpenAPI request schemas
  • keep operations read-only whenever a safe identity/body contract cannot be inferred
  • add a control-plane opt-in and display each discovered table's INSERT/UPDATE/DELETE capabilities
  • preserve the writable flag in redacted portable bundles and SQL previews
  • ship a reviewable GoRest.in CRUD contract and a manual disposable-user validation where SQL performs INSERT/GET/PATCH/PUT/DELETE with unconditional API-side cleanup
  • keep the default HTTP User-Agent synchronized with the package version
  • release the stack as v0.4.0 with a 0.3.2 to 0.4.0 extension upgrade path

Why

The native mutation callbacks in #12 are deliberately explicit. This layer makes them easy to configure from a compatible OpenAPI document without hiding the generated PostgreSQL contract or guessing when an API is ambiguous.

Validation

  • deterministic real-PostgreSQL CRUD added to the PG14-18 matrix
  • control-plane discovery/import/export integration extended for writable sources
  • live GoRest.in probe confirmed generated-ID recovery through the documented email filter and complete cleanup
  • cargo fmt --all -- --check
  • Python, JavaScript, shell, YAML, native package, and native installer checks
  • full native and control-plane builds delegated to this PR's GitHub Actions under local disk pressure

Important boundary

HTTP side effects cannot be rolled back with PostgreSQL. Multi-row writes are per-row and can partially succeed. POST/PATCH are not retried automatically, and the current callback adapter does not support RETURNING.

@sabino
sabino force-pushed the feat/openapi-writable-imports branch 2 times, most recently from 9e4bee3 to 24012f7 Compare August 14, 2026 07:05
@sabino
sabino force-pushed the feat/openapi-writable-imports branch from 60ac117 to cbcadab Compare August 14, 2026 07:17
@sabino
sabino changed the base branch from feat/writable-native-core to main August 14, 2026 07:32
@sabino
sabino marked this pull request as ready for review August 14, 2026 07:35
@sabino
sabino merged commit 58fbd0f into main Aug 14, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant