@hackage harmony0.1.0.0
A web service specification compiler that generates implementation and tests.
Categories
License
GPL-3.0-only
Maintainer
santimunin@gmail.com
Links
Versions
Deprecated
Dependencies (12)
- BNFC
- QuickCheck
- array
- base >=4.7 && <4.8
- containers
- derive Show all…
Dependents (0)
Harmony
Harmony is a web service specification compiler that generates implementation (server and client) and tests.
Targets supported
- Server
- Node.js (
-sjs)
- Node.js (
- Client (and Hypothesis based tests)
- Python (
-cpython)
- Python (
Usage
After installing the package (cabal install), you will get the harmony executable. Afterwards:
Usage: harmony [OPTION...] input_file
-c[CLIENTS] --client[=CLIENTS] Desired output for the client
-s[SERVERS] --server[=SERVERS] Desired output for the server
-o[OUTPUT_DIR] --output_dir[=OUTPUT_DIR] Output path
Check the Targets supported section to figure out the code related to each target.
Syntax
The input file should follow the syntax specified in language_spec/Language.cf. Example:
service_name: HouseworkService
service_version: 1.0.0
enum Color { RED, BLUE, BLACK }
struct Task {
// Primary key
@PK
name : String,
color : Color
}
struct Person {
name: String,
age: Int,
tasks: [Task]
}
resource Person ("/person")