Giter Site home page Giter Site logo

classicvalues / xtext-service-dsl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from graph-quilt/xtext-service-dsl

0.0 1.0 0.0 1.41 MB

Service DSL is an xtext-based embeddable component for any xtext-based DSL adding capability to make a call to backend services such as REST or GraphQL.

License: Apache License 2.0

Java 93.68% Xtend 3.67% HTML 1.74% CSS 0.92%

xtext-service-dsl's Introduction

Service DSL

Builds CircleCI

Overview

The project provides an xtext-based language and runtime engine for defining and executing HTTP service stub(s). This can be used independently or imported in other Xtext DSLs projects to add capability to make a service call. This project comes with a runtime engine based on Spring Web Client. It should be easy to come up with a runtime engine using any other java based http clients.

Example:

Service SomeRestService as getSomeData method GET  {
  Url -> @Config("endpoint")
  Path -> ${"/v1/consents"}
  Timeout -> ${@Config("timeout")}
  @Header accept -> ${"*/*"}
}

It is up to the importing language whether to execute the service stub explicitly or implicitly.

For now, only REST Services will be supported, but we want to support GraphQL and gRPC in the future.

Pre-requisites

  1. Java 8
  2. Maven 3

Making changes to Runtime

  • Clone this project.
  • Run maven clean install
  • Import the runtime module web-client-service-evaluator. This is standard java maven project which can be imported in your favorite java editor.

Making changes to the language

-- Installing the Software

  • Download and install Eclipse. You might run into a JVM error while installing. Please edit the info.plist file with your java path. StackOverFlow Reference

  • Install Xtext SDK in Eclipse:

    • In Eclipse, click Help --> Install New Software
    • In Available Software, click Add to add a repository with this location
    • Select the repository just added in Work with drop-down
    • Select and install Xtext Complete SDK (2.25.0)
  • Restart Eclipse.

-- Setting up the Project

  • Clone this project
  • Import the project in Eclipse, click File --> Import Project --> Maven --> Existing Maven Project
  • Under com.intuit.dsl.service, right click on [GenerateGraphQL.mwe2] --> Run As --> MWE2 Workflow
  • Edit the Grammar and perform Step 3 again.

-- Manually building the Eclipse plugin.

  • Ensure you've setup your project following the instructions above
  • Create a new "Run Configuration" as an "Eclipse Application" and name it appropriately
  • When you run this new configuration, a new Eclipse Window will open, in which you can create service files and edit them.

Contributing

see Contributing

License

see LICENSE

xtext-service-dsl's People

Contributors

ashpak-shaikh avatar classicvalues avatar kmoore-intuit avatar mend-bolt-for-github[bot] avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.