Created
November 25, 2015 07:59
-
-
Save bbrothers/4497018331b788563c99 to your computer and use it in GitHub Desktop.
First rough draft of the devldn API
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 0.8 | |
title: devldn | |
version: v1 | |
baseUri: https://devldn.dev | |
mediaType: application/json | |
resourceTypes: | |
- readOnlyCollection: | |
description: Collection of available <<resourcePathName>>. | |
get: | |
description: Get a list of <<resourcePathName>>. | |
responses: | |
200: | |
body: | |
application/json: | |
example: | | |
<<exampleCollection>> | |
- collection: | |
description: Collection of available <<resourcePathName>>. | |
get: | |
description: Get a list of <<resourcePathName>>. | |
responses: | |
200: | |
body: | |
application/json: | |
example: | | |
<<exampleCollection>> | |
post: | |
description: | | |
Add a new <<resourcePathName|!singularize>>. | |
securedBy: [ oauth_2 ] | |
body: | |
application/json: | |
schema: <<resourcePathName|!singularize>> | |
example: | | |
<<exampleItem>> | |
responses: | |
200: | |
body: | |
application/json: | |
example: | | |
{ "message": "The <<resourcePathName|!singularize>> has been created." } | |
- collectionItem: | |
description: Entity representing a <<resourcePathName|!singularize>> | |
get: | |
description: | | |
Get the <<resourcePathName|!singularize>> | |
with <<resourcePathName|!singularize>>Id = | |
{<<resourcePathName|!singularize>>Id} | |
responses: | |
200: | |
body: | |
application/json: | |
example: | | |
<<exampleItem>> | |
404: | |
body: | |
application/json: | |
example: | | |
{"message": "<<resourcePathName|!singularize>> not found" } | |
put: | |
description: Edit <<resourcePathName|!singularize>> | |
securedBy: [ oauth_2 ] | |
delete: | |
description: Delete <<resourcePathName|!singularize>> | |
securedBy: [ oauth_2 ] | |
securitySchemes: | |
- oauth_2: | |
description: Oauth 2 authentication | |
type: OAuth 2.0 | |
describedBy: | |
headers: | |
Authorization: | |
type: string | |
description: A valid OAuth 2 access token. | |
responses: | |
401: | |
description: Bad or expired token. | |
403: | |
description: Bad OAuth request. | |
settings: | |
authorizationUri: https://devldn.dev/oauth2/authorize #Probably replace this with github auth | |
accessTokenUri: https://devldn.dev/oauth2/token | |
authorizationGrants: [ credentials ] | |
traits: | |
- searchable: | |
queryParameters: | |
query: | |
description: | | |
JSON array [{"field1","value1","operator1"},{"field2","value2","operator2"},...,{"fieldN","valueN","operatorN"}] <<description>> | |
example: | | |
<<example>> | |
- orderable: | |
queryParameters: | |
orderBy: | |
description: | | |
Order by field: <<fieldsList>> | |
type: string | |
required: false | |
order: | |
description: Order | |
enum: [desc, asc] | |
default: desc | |
required: false | |
- pageable: | |
queryParameters: | |
offset: | |
description: Skip over a number of elements by specifying an offset value for the query | |
type: integer | |
required: false | |
example: 20 | |
default: 0 | |
limit: | |
description: Limit the number of elements on the response | |
type: integer | |
required: false | |
example: 80 | |
default: 10 | |
/members: | |
type: | |
collection: | |
exampleCollection: | | |
[{}] | |
exampleItem: | | |
{} | |
get: | |
is: [ | |
searchable: { description: "Search for a user by name", example: "[\"username\", \"Brad\", \"like\"]" }, | |
pageable: | |
] | |
/{username}: | |
type: | |
collectionItem: | |
exampleItem: | | |
{} | |
/meetups: | |
type: | |
collection: | |
exampleCollection: | | |
[{}] | |
exampleItem: | | |
{} | |
/events: | |
type: | |
readOnlyCollection: | |
exampleCollection: | | |
[{}] | |
/members: | |
type: | |
readOnlyCollection: | |
exampleCollection: | | |
[{}] | |
/events: | |
type: | |
collection: | |
exampleCollection: | | |
[{}] | |
exampleItem: | | |
{} | |
/{year}/{month}/{slug}: | |
type: | |
collectionItem: | |
exampleItem: {} | |
/talks: | |
type: | |
readOnlyCollection: | |
exampleCollection: [{}] | |
/speakers: | |
type: | |
readOnlyCollection: | |
exampleCollection: [{}] | |
/sponsors: | |
type: | |
readOnlyCollection: | |
exampleCollection: [{}] | |
/talks: | |
type: | |
collection: | |
exampleCollection: | | |
[{}] | |
exampleItem: | | |
{} | |
/{slug}: | |
type: | |
collectionItem: | |
exampleItem: {} | |
/speaker: | |
type: | |
collectionItem: | |
exampleItem: | | |
{} | |
/speakers: | |
type: | |
collection: | |
exampleCollection: | | |
[{}] | |
exampleItem: | | |
{} | |
/{username}: | |
type: | |
collectionItem: | |
exampleItem: {} | |
/talks: | |
type: | |
collectionItem: | |
exampleItem: | | |
{} | |
/sponsors: | |
type: | |
collection: | |
exampleCollection: | | |
[{}] | |
exampleItem: | | |
{} | |
/{slug}: | |
type: | |
collectionItem: | |
exampleItem: {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment