Skip to content

fix: correct simulate API docs, reject unknown request fields, and overhaul docs#67

Merged
EA1FUO merged 4 commits into
mainfrom
fix/api-validation-and-docs-overhaul
Jun 1, 2026
Merged

fix: correct simulate API docs, reject unknown request fields, and overhaul docs#67
EA1FUO merged 4 commits into
mainfrom
fix/api-validation-and-docs-overhaul

Conversation

@EA1FUO

@EA1FUO EA1FUO commented Jun 1, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes #61, overhauls the documentation, and bumps the version to 1.2.2.

API / bug fix (#61)

  • The README documented the simulate request with the wrong keys — ground.type (API expects ground_type) and excitations[].real/.imag (API expects voltage_real/voltage_imag). The documented payload silently fell back
    to defaults. Corrected the example.
  • Hardened the simulate request models with a StrictModel base (extra="forbid"), so an unknown or misspelled key now returns a clear 422 instead of being silently ignored — directly addressing the "silent API failure" half
    of the issue.

Documentation overhaul

  • Trimmed the 660-line README to a focused quick-start front page.
  • Moved the detailed content into a new docs/ folder: usage (templates, features, shortcuts), development (setup, architecture, structure, stack), deployment (Pages/WASM + production), and api (endpoints +
    configuration), with a docs/ index and cross-page nav.
  • Refreshed the landing page: live badges (stars, Docker pulls, Pages deploy), a value-prop hook, a prominent "Launch the live demo" button, and a mobile-support highlight.

Release

  • Bumped version to 1.2.2 (VERSION, frontend/backend manifests, README badge); changelog section finalized as [1.2.2].

Notes

  • Verified the strict validation in a throwaway container: valid requests parse, {"ground": {"type": ...}} now raises extra_forbidden, and an omitted ground still defaults to average. The frontend already sends correct keys on
    every path (simulate, optimize, export), so nothing there breaks.

Closes #61

EA1FUO added 4 commits June 1, 2026 17:07
The README API reference documented the simulate body with keys the API
does not accept — ground.type (vs ground_type) and excitations[].real/.imag
(vs voltage_real/voltage_imag) — so the documented payload silently fell
back to defaults. Corrected the example to match the API.

Also add a StrictModel base (extra="forbid") for the simulate request
models so an unknown or misspelled key now returns a 422 validation error
instead of being silently ignored and replaced by a default.

Closes #61
Trim the 660-line README to a quick-start front page and move the detailed
content into a new docs/ folder: usage (templates, features, shortcuts),
development (setup, architecture, structure, stack), deployment (Pages/WASM
and production), and api (endpoints + configuration). Add a docs/ index page
and cross-page nav so the guides stay one click away, and point the README's
Contributing section at the existing CONTRIBUTING.md.
…emo CTA

Swap the static shields for live GitHub stars, Docker pulls, and Pages
deploy-status badges; add a short value-prop hook (free / no install /
runs on your phone, vs the classic desktop tools); turn the demo link
into a prominent button; and surface mobile support in the highlights.
@EA1FUO EA1FUO merged commit a7347e8 into main Jun 1, 2026
2 checks passed
@EA1FUO EA1FUO deleted the fix/api-validation-and-docs-overhaul branch June 1, 2026 15:29
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.

Ground Parameter Key Mismatch and Silent API Failure

1 participant