Tie allows generation of Haskell server stubs from OpenAPI (v 3.x) specifications.
Go to file
piq9117 e119add145
transform api member comment to start newlines (#60)
this change transforms the api member comments to start a newline
and render multi line comments.
2024-10-28 17:36:58 -04:00
.github/workflows Lint workflow 2024-05-28 15:10:56 +02:00
assets Update logo 2022-06-20 12:10:34 +02:00
bin Support x-tie-haskell-name to override field names 2023-04-07 10:47:46 +02:00
example restore compatibility between petstore-example and petstore-api 2023-09-08 12:45:58 +02:00
src transform api member comment to start newlines (#60) 2024-10-28 17:36:58 -04:00
test transform api member comment to start newlines (#60) 2024-10-28 17:36:58 -04:00
.gitignore create and upload binaries on tags 2022-11-03 22:53:03 +01:00
cabal.project Bump openapi3 version 2024-05-28 15:42:51 +02:00
CHANGELOG.md Initial commit 2022-02-15 11:01:21 +01:00
default.nix Sync default.nix with tie.cabal 2022-06-13 13:37:38 +02:00
LICENSE Cabal file updates 2022-06-12 14:58:07 +02:00
README.md Lint workflow 2024-05-28 15:10:56 +02:00
Request.template.hs Comply with lint workflow 2024-05-28 15:10:56 +02:00
Response.template.hs Support x-tie-haskell-name to override field names 2023-04-07 10:47:46 +02:00
scarf-api.yaml Add petstore golden test 2022-02-22 10:34:38 +01:00
shell.nix transform api member comment to start newlines (#60) 2024-10-28 17:36:58 -04:00
tie.cabal Merge pull request #58 from scarf-sh/embed-templates 2024-03-21 01:04:42 +02:00

Tie allows generation of Haskell server stubs from OpenAPI (v 3.x) specifications.

If you are looking for a generator for Haskell client code, check out the Haskell-OpenAPI-Client-Code-Generator project.

Usage

$ tie --help
tie - openapi3 server code generator

Usage: tie [-o|--output DIR] [--module-name MODULE] [--package-name PACKAGE]
           [--extra-package PACKAGE] FILE

  Generate a Haskell server from an OpenAPI3 specification

Available options:
  -o,--output DIR          The directory output (default: "out")
  --module-name MODULE     Name of the generated top level module
                           (default: "OpenAPI")
  --package-name PACKAGE   Name of the generated cabal project
                           (default: "open-api")
  --extra-package PACKAGE  Extra packages to include in the generated cabal
                           project
  FILE                     OpenAPI specification file
  -h,--help                Show this help text

Example

See example/ for the ubiquitous OpenAPI Petstore example.

Installation

Building from source

Below are the steps to install Tie using the Cabal build tool.

First, you need to clone the repository

$ git clone https://github.com/scarf-sh/tie.git
$ cd tie

Then, you need to build it using cabal:

$ cabal build exe:tie

Y ou can install the executable with using:

$ cabal install .

Formatting

To pass the lint workflow run

$ git ls-files | grep -v 'example/' | grep \.hs | xargs ./ormolu --mode=inplace

to format the Haskell files accordingly using Ormolu.

Community & Contact

Feel free to join on us on our community Slack (#tie channel)!

License

This program is under the terms of the Apache License v2.0.

Authors

Tie is originally made and currently sponsored by Scarf among other contributors.