~/talk

Code to contract to code: making ironclad APIs

Talkat EuroRust 2024 Β· 2024-10-10..10-11Β· [rust, web-platform]
slides:none on file

Claim: automate API correctness by generate spec from server code with dropshot + schema_rs so CI compares the generated OpenAPI JSON to the repo copy and a GitHub Action opens PRs to update it. Tool built is openapi-to generates a Rust crate (outputs normal source, uses quote crate, runs cargo check/clippy) that makes async functions per endpoint, produces examples, and yields async-stream pagination helpers. It works but websockets lack a standard and generated crates increase compile time.

AI-written summary Β· about

  1. 0:00API challenges and solutions
  2. 4:43API schemas and contracts
  3. 10:00Manual schema maintenance problems
  4. 11:01Automating schema generation
  5. 13:10Schemas in sync with CI
  6. 14:15API clients importance
  7. 17:23Code generation for clients
  8. 18:28Custom API client generator
  9. 21:35openapi-tor Rust code
  10. 26:30Enhancing generated code
  11. 28:20WebSockets and edge cases
  12. 30:48Custom tooling benefits
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark β€” the status bar button does the same
?
this help
esc
close this, then clear every filter β€” or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.