Skip to content

Instantly share code, notes, and snippets.

@yyamano
Created July 5, 2019 06:24
Show Gist options
  • Save yyamano/6b5512e30283f5e5e5f45a3f7abf22ce to your computer and use it in GitHub Desktop.
Save yyamano/6b5512e30283f5e5e5f45a3f7abf22ce to your computer and use it in GitHub Desktop.
#%RAML 1.0
title: API with Types
types: # global type definitions that can be reused throughout this API
User: # define type named `User`
type: object
properties:
firstName: string
lastName: string
age:
type: integer
minimum: 0
maximum: 125
/users/{id}:
get:
queryParameters:
foo:
description: |
blah, blah, blah
this is a longer description.
* 1st item
* 2nd item
type: string
required: false
responses:
200:
body:
application/json:
type: User # reference to global type definition
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment