Skip to content

Instantly share code, notes, and snippets.

@crizstian
Last active January 23, 2017 16:09
Show Gist options
  • Save crizstian/5ee229c8677156b0c4cf7ef96eb03779 to your computer and use it in GitHub Desktop.
Save crizstian/5ee229c8677156b0c4cf7ef96eb03779 to your computer and use it in GitHub Desktop.
Movie API service example
#%RAML 1.0
title: cinema
version: v1
baseUri: /
types:
Movie:
properties:
id: string
title: string
runtime: number
format: string
plot: string
releaseYear: number
releaseMonth: number
releaseDay: number
example:
id: "123"
title: "Assasins Creed"
runtime: 115
format: "IMAX"
plot: "Lorem ipsum dolor sit amet"
releaseYear : 2017
releaseMonth: 1
releaseDay: 6
MoviePremieres:
type: Movie []
resourceTypes:
Collection:
get:
responses:
200:
body:
application/json:
type: <<item>>
/movies:
/premieres:
type: { Collection: {item : MoviePremieres } }
/{id}:
type: { Collection: {item : Movie } }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment