All Projects → grofers → Go Codon

grofers / Go Codon

Licence: mit
Workflow based REST framework code generator

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Go Codon

Proteus
Lean, mean, and incredibly fast JVM framework for web and microservice development.
Stars: ✭ 178 (+33.83%)
Mutual labels:  rest-api, rest, swagger, web-framework
Gramework
Fast and Reliable Golang Web Framework
Stars: ✭ 354 (+166.17%)
Mutual labels:  rest-api, rest, web-framework
Spring Petclinic Rest
REST version of the Spring Petclinic sample application
Stars: ✭ 257 (+93.23%)
Mutual labels:  rest-api, rest, swagger
Swagger Express Ts
Generate and serve swagger.json
Stars: ✭ 102 (-23.31%)
Mutual labels:  rest-api, rest, swagger
Drf Yasg
Automated generation of real Swagger/OpenAPI 2.0 schemas from Django REST Framework code.
Stars: ✭ 2,523 (+1796.99%)
Mutual labels:  rest-api, rest, swagger
Swagger Js
Javascript library to connect to swagger-enabled APIs via browser or nodejs
Stars: ✭ 2,319 (+1643.61%)
Mutual labels:  rest-api, rest, swagger
Swagger Ui
Swagger UI is a collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.
Stars: ✭ 21,279 (+15899.25%)
Mutual labels:  rest-api, rest, swagger
Gemini
Model Driven REST framework to automatically generate CRUD APIs
Stars: ✭ 138 (+3.76%)
Mutual labels:  rest-api, rest, swagger
Farwest
Framework for building RESTful HATEOAS-driven applications.
Stars: ✭ 18 (-86.47%)
Mutual labels:  rest-api, rest, web-framework
Swagger Core
Examples and server integrations for generating the Swagger API Specification, which enables easy access to your REST API
Stars: ✭ 6,898 (+5086.47%)
Mutual labels:  rest-api, rest, swagger
Swagger Editor
Swagger Editor
Stars: ✭ 7,365 (+5437.59%)
Mutual labels:  rest-api, rest, swagger
Swagger Codegen
swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition.
Stars: ✭ 13,859 (+10320.3%)
Mutual labels:  rest-api, rest, swagger
Swagger Inflector
Stars: ✭ 131 (-1.5%)
Mutual labels:  rest-api, rest, swagger
Mockoon
Mockoon is the easiest and quickest way to run mock APIs locally. No remote deployment, no account required, open source.
Stars: ✭ 3,448 (+2492.48%)
Mutual labels:  rest-api, rest, swagger
Ssm
👅基于RESTful风格的前后端分离的SSM框架,集成了shiro和swagger等框架
Stars: ✭ 141 (+6.02%)
Mutual labels:  rest-api, rest, swagger
Swagger Node
Swagger module for node.js
Stars: ✭ 3,917 (+2845.11%)
Mutual labels:  rest-api, rest, swagger
Swagger Parser
Swagger Spec to Java POJOs
Stars: ✭ 468 (+251.88%)
Mutual labels:  rest-api, rest, swagger
Rest Hapi
🚀 A RESTful API generator for Node.js
Stars: ✭ 1,102 (+728.57%)
Mutual labels:  rest-api, rest, swagger
Node Typescript Mongodb
node js typescript mongodb express generator yo
Stars: ✭ 96 (-27.82%)
Mutual labels:  rest-api, rest, swagger
Pretty Swag
Pretty UI for Swagger spec
Stars: ✭ 112 (-15.79%)
Mutual labels:  rest-api, swagger

go-codon

Generates Go server code from a combination of REST and Workflow DSLs.

Build Status

A codon service has three components:

  • Server: Accepts and validates HTTP requests
  • Clients: Clients for upstream services which this service consumes
  • Workflows: Procedures for every REST endpoint of this server which consume Clients and other custom actions.

Server and Client side specifications are written in Swagger. Swagger code generation is done through go-swagger. Workflow is written in Flow, a Mistral inspired workflow specification in YAML. Its specification can be found here.

Check out wiki section for more information. Follow this tutorial for a very basic example on how to use this tool.

Installation

Set up your Golang development environment (Getting Started). Set your GOPATH and GOBIN directories. Also add GOBIN to your PATH so that golang tools can be used in command line.

Download the latest binary from Github releases and put it in your GOBIN directory. Or to install from source do:

mkdir -p $GOPATH/src/github.com/grofers
cd $GOPATH/src/github.com/grofers
git clone [email protected]:grofers/go-codon.git
cd go-codon
make install

Example

This is what a workflow looks like (for an API to get posts and the comments for each post concurrently):

name: get_posts_comments
start:
    - get_posts
tasks:
    get_posts:
        action: clients.jplaceholder.get_posts
        input:
            userId: <%jmes main.userId %>
        publish:
            posts: <%jmes action %>
        on-success:
            - get_all_comments: true
    get_comments:
        action: clients.jplaceholder.get_comments
        input:
            postId: <%jmes main.postId %>
        publish:
            comments: <%jmes action %>
    get_all_comments:
        with-items: <%jmes main.posts %>
        loop:
            task: get_comments
            input:
                postId: <%jmes item.id %>
            publish:
                combined: <%jmes {"post_details":item,"comments":task.comments} %>
output:
    body: <%jmes main.combined %>
    status_code: 200

To run this example checkout examples.

Projects go-codon would not exist without

(Or just projects I am really thankful for)

  • go-swagger: Provides code generators for client and server side components using Swagger specification.
  • go-jmespath: Allows for easy querying and manipulation of json objects in workflows.
  • Pongo2: Django template renderer. Used for templates and workflow expressions in codon.
  • Mistral DSL: A workflow spec used for infrastructure orchestration. Codon's workflow DSL is inspired from Mistral's but modified for use in REST context.
  • mapstructure
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].