harmony: A web service specification compiler that generates implementation and tests.

[ development, gpl, library, program ] [ Propose Tags ]
This version is deprecated.

This application defines a specification language for web services and reads it in order to generate implementation, tests, clients, etc...


[Skip to Readme]

Modules

[Last Documentation]

  • Data
    • Data.DiGraph
  • Generation
    • Generation.OutputGenerator
    • Generation.ServiceGenerator
    • Generation.TemplateCompiler
  • LangUtils
  • Language
    • Language.Abs
    • Language.ErrM
    • Language.Lex
    • Language.Par
  • Paths_harmony
  • TypeCheck
    • TypeCheck.ApiSpec
    • TypeCheck.StaticCheck

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0, 0.1.0.1, 0.1.0.2, 0.1.0.3, 0.1.1.0 (info)
Dependencies array, base (>=4.7 && <4.8), BNFC, containers, derive, directory, harmony, hastache, hslogger, mtl, process, QuickCheck, text [details]
License GPL-3.0-only
Author Santiago Munín
Maintainer santimunin@gmail.com
Category Development
Bug tracker https://github.com/SantiMunin/harmony/issues
Source repo head: git clone https://github.com/SantiMunin/harmony
Uploaded by SantiMunin at 2015-08-16T09:50:35Z
Distributions
Executables harmony
Downloads 2801 total (13 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2016-12-02 [all 6 reports]

Readme for harmony-0.1.0.0

[back to package description]

Harmony

Harmony is a web service specification compiler that generates implementation (server and client) and tests.

Targets supported

  • Server
    • Node.js (-sjs)
  • Client (and Hypothesis based tests)
    • Python (-cpython)

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")