Last active
January 29, 2017 22:02
-
-
Save crizstian/6f41b2423e077b779a94776022917f5a to your computer and use it in GitHub Desktop.
Cinema Catalog Service API example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#%RAML 1.0 | |
title: Cinema Catalog Service | |
version: v1 | |
baseUri: / | |
uses: | |
object: types.raml | |
stack: ../movies-service/api.raml | |
types: | |
Cinemas: object.Cinema [] | |
Movies: stack.MoviePremieres | |
Schedules: object.Schedule [] | |
traits: | |
FilterByLocation: | |
queryParameters: | |
city: | |
type: string | |
resourceTypes: | |
GET: | |
get: | |
responses: | |
200: | |
body: | |
application/json: | |
type: <<item>> | |
/cinemas: | |
type: { GET: {item : Cinemas } } | |
get: | |
is: [FilterByLocation] | |
description: we already have the location defined to display the cinemas | |
/cinemas/{cinema_id}: | |
type: { GET: {item : Movies } } | |
description: we have selected the cinema to display the movie premieres | |
/cinemas/{cinema_id}/{movie_id}: | |
type: { GET: {item : Schedules } } | |
description: we have selceted a movie to display the schedules |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment