Skip to content

0.84.0

Choose a tag to compare

@b10x-bot b10x-bot released this 03 Nov 05:24
· 81 commits to main since this release
b89faaa

Generated servers refuse what their OpenAPI refuses, and generated UIs call their binding's routes.
4 added, 4 changed, 8 fixed.

Changed

  • ess generate ui --target react|tui and ess ui run --tui take --http <binding> (and --refines <binding>) with --model: the generated route table carries the method and path the ess-http/1 binding declares for each view and command, and the field or parameter each path variable carries, so a generated UI calls the routes the server ess generate synthesize --http writes for the same binding serves. A view or command the document names that the binding does not route, or a command it reads as form or query, is refused naming it and the binding's file. Without --http, and with a binding that restates the derived routes, the generated bytes are unchanged (#713, story:a-generated-ui-calls-the-routes-its-http-binding-serves).
  • The React runtime of a project generated with --http refuses a path variable whose value is . or .., as it refuses an empty one, so a request never resolves to another route (story:a-generated-ui-calls-the-routes-its-http-binding-serves).
  • A command the --http binding serves on get is sent by both runtimes without a body; one whose path does not carry every input field is refused by ess generate ui and ess ui run, naming the command, the fields and the binding (story:a-generated-ui-calls-the-routes-its-http-binding-serves).
  • A path variable whose command input field is renamed on the wire is filled from the field's wire name or its model name, whichever a bind sends; the route table carries the model name as path_aliases (story:a-generated-ui-calls-the-routes-its-http-binding-serves).
  • An authored act whose outcome: names a branch that declares no error also requires that no error came back (expect_no_error after its expect_outcome), so a target that answers the success branch under its own name with an error fails the step; it matched the outcome name alone and passed. A refusing branch is unchanged. expect_no_error needs ess-conformance/11, which every suite the CLI writes already states (a synthesized or authored suite ess-conformance/34 or above, a coverage suite ess-conformance/35 or above), so no suite format moves; a library caller assembling an authored suite by hand from SuiteProvenance::of (ess-conformance/4) calls select_fresh_format_for, admits it and runs it with Runner::run_admitted, as the CLI does (Runner::run refuses a suite at ess-conformance/5 or above). The committed billing suite's two authored scenarios move their bytes (story:authored-success-step-asserts-no-error).
  • The generated Rust codecs, which the Rust server reads a request with, refuse at decode, before anything is stored, a Timestamp that is not an RFC 3339 date-time (at the top level, in an Optional, a List, a struct field and a map key) and a member a closed JSON object does not declare (a command's input, a struct without undeclared_fields: ignored, a union branch); the server answers 400, or the binding's refusals.malformed, naming the member's path, where it stored the value or dropped the member (#707). It is the default and not an opt-in, because the OpenAPI document the server serves already refuses these bodies; a struct declaring undeclared_fields: ignored and a Json value stay open. The same decoders read the log: a generated Rust server's decode_system_event now refuses an envelope an older server wrote with a free-text Timestamp or with an extra member in a closed struct. The generated Go server reads a Timestamp as the Rust one does, at every position a view parameter included, so the two servers still answer one request alike.
  • The generated Go server answers a JSON command body holding a top-level member no input field names with 400, or the binding's refusals.malformed, before the port is called, as the Rust server does: on a bound json route, whose unknown is refuse, the only value a JSON request admits, and on a route derived without a binding, whose default request is unknown: refuse too. It ran the command. Go checks the body's top level only; a member inside a nested object is not refused.
  • 9 more in the changelog.

Every change: CHANGELOG.md § 0.84.0