Skip to content

HardMax71/spec_to_rest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

378 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spec-to-rest

spec-to-rest

Compile formal behavioral specs (.spec DSL) into verified REST services.

CI Isabelle/HOL soundness Latest release License Ask DeepWiki

Given a .spec file describing entities, operations, invariants, and preconditions, spec-to-rest runs a Z3-backed verification pass against the spec itself and, if verification passes, generates a complete, runnable service: models, schemas, routers, migrations, Docker / docker-compose / Makefile / CI workflow, and an OpenAPI 3.1 document. Three target stacks are supported (Python/FastAPI, Go/chi, TypeScript/Express), each across PostgreSQL, SQLite, and MySQL.

The verify command is mechanically validated in Isabelle/HOL: a zero-sorry soundness meta-theorem ties the SMT translator to the spec's denotational semantics, and the Scala translator is code-extracted from that proof rather than hand-written. Every target additionally gets a native conformance suite in its own language by default (pass --no-tests to opt out): pytest + Hypothesis + Schemathesis / Vitest + fast-check / go test + rapid, single-sourced from the spec with the Python path held byte-identical as a differential oracle.

Documentation

Full documentation lives under docs/content/docs/ (Fumadocs). Start with index.mdx, then:

License

MIT. See LICENSE.

About

Converts description of a service in DSL to REST API.

Topics

Resources

License

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors