fix: correct simulate API docs, reject unknown request fields, and overhaul docs#67
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #61, overhauls the documentation, and bumps the version to 1.2.2.
API / bug fix (#61)
ground.type(API expectsground_type) andexcitations[].real/.imag(API expectsvoltage_real/voltage_imag). The documented payload silently fell backto defaults. Corrected the example.
StrictModelbase (extra="forbid"), so an unknown or misspelled key now returns a clear 422 instead of being silently ignored — directly addressing the "silent API failure" halfof the issue.
Documentation overhaul
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.Release
VERSION, frontend/backend manifests, README badge); changelog section finalized as[1.2.2].Notes
{"ground": {"type": ...}}now raisesextra_forbidden, and an omitted ground still defaults to average. The frontend already sends correct keys onevery path (simulate, optimize, export), so nothing there breaks.
Closes #61