Skip to content

Instantly share code, notes, and snippets.

@dyeeye
Created May 2, 2021 14:12
Show Gist options
  • Save dyeeye/70eb83e5a229102a1aac6ca18e820036 to your computer and use it in GitHub Desktop.
Save dyeeye/70eb83e5a229102a1aac6ca18e820036 to your computer and use it in GitHub Desktop.
RAML API specification example depicting GET usage
#%RAML 1.0
title: Accounts SAPI
types:
account:
type: object
properties:
login:
name:
surname:
role:
email?:
rank:
type: integer
default: 0
/accounts:
get:
queryParameters:
surname?:
role?:
rank?:
type: integer
responses:
200:
body:
application/json:
type: array
items:
type: account
example:
login: adoe
name: adrian
surname: doe
role: ADMIN
rank: 20
application/xml:
type: array
items:
type: account
415:
description: Unsupported Media Type
/{login}:
get:
responses:
200:
body:
application/json:
type: account
application/xml:
type: account
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment