forked from cybertk/abao
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix cybertk#184 abao should understand security schemes
- Loading branch information
Brock Pytlik
committed
Oct 14, 2016
1 parent
a4ac7ee
commit bdd2e44
Showing
5 changed files
with
256 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#%RAML 0.8 | ||
|
||
title: World Music API | ||
baseUri: http://example.api.com/{version} | ||
version: v1 | ||
|
||
/songs: | ||
/song1: | ||
get: | ||
responses: | ||
200: | ||
body: | ||
application/json: | ||
schema: | | ||
{ "$schema": "http://json-schema.org/schema", | ||
"type": "object", | ||
"description": "A canonical song", | ||
"properties": { | ||
"title": { "type": "string" }, | ||
"artist": { "type": "string" } | ||
}, | ||
"required": [ "title", "artist" ] | ||
} | ||
example: | | ||
{ "title": "A Beautiful Day", "artist": "Mike" } | ||
/song2: | ||
get: | ||
responses: | ||
200: | ||
body: | ||
application/json: | ||
schema: | | ||
{ "$schema": "http://json-schema.org/schema", | ||
"type": "object", | ||
"description": "A canonical song", | ||
"properties": { | ||
"title": { "type": "string" }, | ||
"artist": { "type": "string" } | ||
}, | ||
"required": [ "title", "artist" ] | ||
} | ||
example: | | ||
{ "title": "A Beautiful Day", "artist": "Mike" } |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#%RAML 0.8 | ||
|
||
title: World Music API | ||
baseUri: http://example.api.com/{version} | ||
version: v1 | ||
|
||
securitySchemes: | ||
- oauth_2_0: !include ./oauth_2_0.yml | ||
- another_oauth_2_0: !include ./oauth_2_0.yml | ||
- third_oauth_2_0: !include ./oauth_2_0.yml | ||
|
||
securedBy: [oauth_2_0, another_oauth_2_0] | ||
|
||
/machines: | ||
get: | ||
responses: | ||
200: | ||
body: | ||
application/json: | ||
schema: | | ||
[ | ||
type: 'string' | ||
name: 'string' | ||
] | ||
/{machine_id}: | ||
securedBy: [oauth_2_0] | ||
uriParameters: | ||
machine_id: | ||
description: | | ||
The ID of the Machine | ||
type: string | ||
example: '1' | ||
delete: | ||
responses: | ||
204: | ||
/parts: | ||
get: | ||
responses: | ||
200: | ||
body: | ||
application/json: | ||
schema: | | ||
type: 'string' | ||
name: 'string' | ||
put: | ||
securedBy: [third_oauth_2_0] | ||
responses: | ||
200: | ||
body: | ||
application/json: | ||
schema: | | ||
type: 'string' | ||
name: 'string' |
This file contains 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