-
Notifications
You must be signed in to change notification settings - Fork 1
Grouping APIs
Marlon Carvalho edited this page Jul 17, 2015
·
1 revision
Darter allows you to group APIs together for a cleaner structure. A class annotated with @API
can include other APIs. The included API inherits the @Version
, @MediaType
, and path
definitions from its parent.
@API('beers')
class BeerAPI {}
@API('types')
class BeerTypeAPI {}
@API('api')
class BaseAPI {
@Include()
BeerAPI beerAPI = new BeerAPI();
@Include()
BeerTypeAPI typeAPI = new BeerTypeAPI();
}
An included API can override the configurations coming from its parent just defining its own configuration in the annotations @Version
, @MediaType
, and @API
.