raml2html with 1.0 syntax working

This commit is contained in:
Devin Howard 2016-10-04 12:11:58 +08:00
parent da3795a2c2
commit a2cde20f8f
14 changed files with 40 additions and 36 deletions

View file

@ -2,35 +2,29 @@
---
title: Metamaps
version: v2
baseUri: http://metamaps.cc/api/v2
baseUri: https://metamaps.cc/api/v2
mediaType: application/json
securitySchemes:
- oauth_2_0:
description: |
OAuth 2.0 implementation
type: OAuth 2.0
settings:
authorizationUri: https://metamaps.cc/api/v2/oauth/authorize
accessTokenUri: https://metamaps.cc/api/v2/oauth/token
authorizationGrants: [ authorization_code, password, client_credentials, implicit, refresh_token ]
oauth_2_0: !include securitySchemes/oauth_2_0.raml
securedBy: [ oauth_2_0 ]
traits:
- pageable: !include traits/pageable.raml
- orderable: !include traits/orderable.raml
- searchable: !include traits/searchable.raml
pageable: !include traits/pageable.raml
orderable: !include traits/orderable.raml
searchable: !include traits/searchable.raml
schemas:
- topic: !include schemas/_topic.json
- synapse: !include schemas/_synapse.json
- map: !include schemas/_map.json
- mapping: !include schemas/_mapping.json
- token: !include schemas/_token.json
topic: !include schemas/_topic.json
synapse: !include schemas/_synapse.json
map: !include schemas/_map.json
mapping: !include schemas/_mapping.json
token: !include schemas/_token.json
resourceTypes:
- base: !include resourceTypes/base.raml
- item: !include resourceTypes/item.raml
- collection: !include resourceTypes/collection.raml
#resourceTypes:
# base: !include resourceTypes/base.raml
# item: !include resourceTypes/item.raml
# collection: !include resourceTypes/collection.raml
/topics: !include apis/topics.raml
/synapses: !include apis/synapses.raml

View file

@ -1,4 +1,4 @@
type: collection
#type: collection
get:
responses:
200:
@ -25,7 +25,7 @@ post:
application/json:
example: !include ../examples/mapping.json
/{id}:
type: item
#type: item
get:
responses:
200:

View file

@ -1,4 +1,4 @@
type: collection
#type: collection
get:
responses:
200:
@ -27,7 +27,7 @@ post:
application/json:
example: !include ../examples/map.json
/{id}:
type: item
#type: item
get:
responses:
200:

View file

@ -1,4 +1,4 @@
type: collection
#type: collection
get:
responses:
200:
@ -27,7 +27,7 @@ post:
application/json:
example: !include ../examples/synapse.json
/{id}:
type: item
#type: item
get:
responses:
200:

View file

@ -1,4 +1,4 @@
type: collection
#type: collection
post:
body:
application/json:
@ -18,7 +18,7 @@ post:
application/json:
example: !include ../examples/tokens.json
/{id}:
type: item
#type: item
delete:
responses:
204:

View file

@ -1,4 +1,4 @@
type: collection
#type: collection
get:
responses:
200:
@ -25,7 +25,7 @@ post:
application/json:
example: !include ../examples/topic.json
/{id}:
type: item
#type: item
get:
responses:
200:

View file

@ -16,7 +16,7 @@ get?:
post?:
description: Create a new <<resourcePathName | !singularize>>
responses:
200:
201:
body:
application/json:
schema: <<resourcePathName | !singularize>>

View file

@ -1,3 +1,4 @@
type: base
get?:
description: Get a <<resourcePathName | !singularize>>
responses:
@ -26,4 +27,3 @@ delete?:
responses:
204:
description: Removed
type: base

View file

@ -35,4 +35,3 @@
"per"
]
}

View file

@ -0,0 +1 @@
{}

View file

@ -0,0 +1,7 @@
description: |
OAuth 2.0 implementation
type: OAuth 2.0
settings:
authorizationUri: https://metamaps.cc/api/v2/oauth/authorize
accessTokenUri: https://metamaps.cc/api/v2/oauth/token
authorizationGrants: [ authorization_code, client_credentials ]

View file

@ -1,3 +1,3 @@
queryParameters:
sort:
description: The name of the field to sort by, prefixed by "-" to sort descending
description: The name of the comma-separated fields to sort by, prefixed by "-" to sort descending

View file

@ -2,6 +2,8 @@ queryParameters:
page:
description: The page number
type: integer
default: 1
per:
description: Number of records per page
type: integer
default: 20

View file

@ -41,6 +41,7 @@
"chai": "^3.5.0",
"eslint": "^3.5.0",
"eslint-plugin-react": "^6.3.0",
"mocha": "^3.0.2"
"mocha": "^3.0.2",
"raml2html": "^4.0.0-beta5"
}
}