Scala Python Java Other
Latest commit ec5da43 Feb 27, 2017 Mike Solomon committed with jenkins scrooge-generator: Support annotations in most places
Problem

Apache Thrift
[supports](http://svn.apache.org/viewvc/thrift/trunk/test/AnnotationTest.thrift?view=markup&pathrev=1386848)
annotations in more places than Scrooge, such as on senums, enums, enum fields,
services, and service methods. It is currently impossible to attach additional
information to these objects and use it with Scrooge.

Solution

Add parsing, AST, and Scala code generation support for annotations on enums,
enum fields, services, and service methods.

Result

Additional information can be attached to more Thrift objects and used from
Scala.

RB_ID=908556
TBR=true
Permalink
Failed to load latest commit information.
.github Twitter OSS: Add ISSUE_TEMPLATE Jul 7, 2016
benchmarks finatra: Organize pants BUILD files Jan 24, 2017
doc finatra-userguide: Update documentation for clarity Feb 23, 2017
examples finatra: Update to next version post-release Feb 4, 2017
http finatra: cross-publish for Scala 2.12 Feb 23, 2017
httpclient finatra: Move conversions and retry utilities from finatra/utils to f… Jan 26, 2017
inject-thrift-client-http-mapper finatra: Organize pants BUILD files Jan 24, 2017
inject scrooge-generator: Support annotations in most places Feb 27, 2017
jackson Add support for single-level nesting through companion objects Feb 22, 2017
project Twitter-oss: Prepare OSS libraries for release Feb 4, 2017
slf4j finatra: Organize pants BUILD files Jan 24, 2017
thrift finagle-thrift, finatra-thrift: Fix support for inherited BaseService… Feb 12, 2017
utils finatra: Move conversions and retry utilities from finatra/utils to f… Jan 26, 2017
.gitignore finatra: Add OSS documentation Nov 7, 2016
.travis.yml finatra: Update TravisCI configuration Jan 7, 2017
ADOPTERS.md finatra: Update ADOPTERS.md to add Kueski Oct 10, 2016
CHANGELOG.md Twitter-oss: Bump guava to 19.0 in OSS builds Feb 22, 2017
CONTRIBUTING.md finatra: Update CONTRIBUTING and examples documentation Nov 22, 2016
LICENSE Add and update files for open-repository Apr 29, 2015
README.md finatra: Update to next version post-release Feb 4, 2017
build.sbt finatra: Fix Inject App Doc Generation on 2.12 Feb 24, 2017
finatra_logo.png Added transparent logo and updated README.md May 14, 2015
finatra_logo_text.png finatra - Update logo image Aug 17, 2016
pushsite.bash finatra: Add Finatra 2.8.0 release announcement and blog post Feb 6, 2017
sbt Update docs on contributing Sep 7, 2016

README.md

Finatra

Build Status Test Coverage Project status Maven Central Gitter

Status

This project is used in production at Twitter (and many other organizations), and is being actively developed and maintained.

Finatra Logo

Finatra is a lightweight framework for building fast, testable, scala applications on top of TwitterServer and Finagle. Finatra provides an easy-to-use API for creating and testing Finagle servers and apps as well as powerful JSON support, modern logging via SLF4J, Finagle client utilities, and more.

Getting involved

Features

Documentation

To get started, see the Getting Started section of our User Guide to get up and running. Or check out the specific sections for building HTTP or Thrift servers.

Examples

An HTTP controller and server:

import com.twitter.finatra.http._

@Singleton
class ExampleController extends Controller {
  get("/") { request: Request =>
    "<h1>Hello, world!</h1>"
  }
}
import com.twitter.finatra.http._

class ExampleServer extends HttpServer {
  override def configureHttp(router: HttpRouter): Unit = {
    router
      .filter[CommonFilters]
      .add[ExampleController]
  }
}

A Thrift controller and server:

import com.twitter.finatra.thrift._

@Singleton
class ExampleThriftController 
  extends Controller
  with MyThriftService.BaseServiceIface {

  override val myFunction = handle(MyFunction) { args: MyFunction.Args =>
    ...
  }
}
import com.twitter.finatra.thrift._

class ExampleServer extends ThriftServer {
  override def configureThrift(router: ThriftRouter): Unit = {
    router
      .add[ExampleThriftController]
  }
}

Example Projects

Finatra includes working examples which highlight various features of the framework and include tests. In the develop branch these examples are included in the root sbt build and are thus buildable as part of the entire project. In the master branch (or a release branch) these examples can be built using their invididual sbt (or Maven) build files.

Please take a look through the examples for more detailed information on features, testing, and building with sbt (or Maven).

Latest version

The master branch in Github tracks the latest stable release, which is currently:

Maven Central

available on Maven Central. See the First Steps section in the User Guide for how to add dependencies.

Releases are done on an approximately monthly schedule. While semver is not followed, the changelogs are detailed and include sections on public API breaks and changes in runtime behavior.

Development version

The develop branch in Github tracks the latest code which is updated every week. If you want to contribute a patch or fix, please use this branch as the basis of your Pull Request.

For more information on providing contributions, please see our CONTRIBUTING.md documentation.

Presentations

Check out our list of presentations: Finatra Presentations.

Authors

A full list of contributors can be found on GitHub.

Follow @finatra on Twitter for updates.

License

Copyright 2013-2017 Twitter, Inc.

Licensed under the Apache License, Version 2.0: https://www.apache.org/licenses/LICENSE-2.0