raml2html with 1.0 syntax working
This commit is contained in:
parent
da3795a2c2
commit
a2cde20f8f
14 changed files with 40 additions and 36 deletions
|
@ -2,35 +2,29 @@
|
||||||
---
|
---
|
||||||
title: Metamaps
|
title: Metamaps
|
||||||
version: v2
|
version: v2
|
||||||
baseUri: http://metamaps.cc/api/v2
|
baseUri: https://metamaps.cc/api/v2
|
||||||
mediaType: application/json
|
mediaType: application/json
|
||||||
|
|
||||||
securitySchemes:
|
securitySchemes:
|
||||||
- oauth_2_0:
|
oauth_2_0: !include securitySchemes/oauth_2_0.raml
|
||||||
description: |
|
securedBy: [ oauth_2_0 ]
|
||||||
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 ]
|
|
||||||
|
|
||||||
traits:
|
traits:
|
||||||
- pageable: !include traits/pageable.raml
|
pageable: !include traits/pageable.raml
|
||||||
- orderable: !include traits/orderable.raml
|
orderable: !include traits/orderable.raml
|
||||||
- searchable: !include traits/searchable.raml
|
searchable: !include traits/searchable.raml
|
||||||
|
|
||||||
schemas:
|
schemas:
|
||||||
- topic: !include schemas/_topic.json
|
topic: !include schemas/_topic.json
|
||||||
- synapse: !include schemas/_synapse.json
|
synapse: !include schemas/_synapse.json
|
||||||
- map: !include schemas/_map.json
|
map: !include schemas/_map.json
|
||||||
- mapping: !include schemas/_mapping.json
|
mapping: !include schemas/_mapping.json
|
||||||
- token: !include schemas/_token.json
|
token: !include schemas/_token.json
|
||||||
|
|
||||||
resourceTypes:
|
#resourceTypes:
|
||||||
- base: !include resourceTypes/base.raml
|
# base: !include resourceTypes/base.raml
|
||||||
- item: !include resourceTypes/item.raml
|
# item: !include resourceTypes/item.raml
|
||||||
- collection: !include resourceTypes/collection.raml
|
# collection: !include resourceTypes/collection.raml
|
||||||
|
|
||||||
/topics: !include apis/topics.raml
|
/topics: !include apis/topics.raml
|
||||||
/synapses: !include apis/synapses.raml
|
/synapses: !include apis/synapses.raml
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
type: collection
|
#type: collection
|
||||||
get:
|
get:
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
|
@ -25,7 +25,7 @@ post:
|
||||||
application/json:
|
application/json:
|
||||||
example: !include ../examples/mapping.json
|
example: !include ../examples/mapping.json
|
||||||
/{id}:
|
/{id}:
|
||||||
type: item
|
#type: item
|
||||||
get:
|
get:
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
type: collection
|
#type: collection
|
||||||
get:
|
get:
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
|
@ -27,7 +27,7 @@ post:
|
||||||
application/json:
|
application/json:
|
||||||
example: !include ../examples/map.json
|
example: !include ../examples/map.json
|
||||||
/{id}:
|
/{id}:
|
||||||
type: item
|
#type: item
|
||||||
get:
|
get:
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
type: collection
|
#type: collection
|
||||||
get:
|
get:
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
|
@ -27,7 +27,7 @@ post:
|
||||||
application/json:
|
application/json:
|
||||||
example: !include ../examples/synapse.json
|
example: !include ../examples/synapse.json
|
||||||
/{id}:
|
/{id}:
|
||||||
type: item
|
#type: item
|
||||||
get:
|
get:
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
type: collection
|
#type: collection
|
||||||
post:
|
post:
|
||||||
body:
|
body:
|
||||||
application/json:
|
application/json:
|
||||||
|
@ -18,7 +18,7 @@ post:
|
||||||
application/json:
|
application/json:
|
||||||
example: !include ../examples/tokens.json
|
example: !include ../examples/tokens.json
|
||||||
/{id}:
|
/{id}:
|
||||||
type: item
|
#type: item
|
||||||
delete:
|
delete:
|
||||||
responses:
|
responses:
|
||||||
204:
|
204:
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
type: collection
|
#type: collection
|
||||||
get:
|
get:
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
|
@ -25,7 +25,7 @@ post:
|
||||||
application/json:
|
application/json:
|
||||||
example: !include ../examples/topic.json
|
example: !include ../examples/topic.json
|
||||||
/{id}:
|
/{id}:
|
||||||
type: item
|
#type: item
|
||||||
get:
|
get:
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
|
|
|
@ -16,7 +16,7 @@ get?:
|
||||||
post?:
|
post?:
|
||||||
description: Create a new <<resourcePathName | !singularize>>
|
description: Create a new <<resourcePathName | !singularize>>
|
||||||
responses:
|
responses:
|
||||||
200:
|
201:
|
||||||
body:
|
body:
|
||||||
application/json:
|
application/json:
|
||||||
schema: <<resourcePathName | !singularize>>
|
schema: <<resourcePathName | !singularize>>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
type: base
|
||||||
get?:
|
get?:
|
||||||
description: Get a <<resourcePathName | !singularize>>
|
description: Get a <<resourcePathName | !singularize>>
|
||||||
responses:
|
responses:
|
||||||
|
@ -26,4 +27,3 @@ delete?:
|
||||||
responses:
|
responses:
|
||||||
204:
|
204:
|
||||||
description: Removed
|
description: Removed
|
||||||
type: base
|
|
||||||
|
|
|
@ -35,4 +35,3 @@
|
||||||
"per"
|
"per"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
1
doc/api/schemas/error.json
Normal file
1
doc/api/schemas/error.json
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{}
|
7
doc/api/securitySchemes/oauth_2_0.raml
Normal file
7
doc/api/securitySchemes/oauth_2_0.raml
Normal 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 ]
|
|
@ -1,3 +1,3 @@
|
||||||
queryParameters:
|
queryParameters:
|
||||||
sort:
|
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
|
||||||
|
|
|
@ -2,6 +2,8 @@ queryParameters:
|
||||||
page:
|
page:
|
||||||
description: The page number
|
description: The page number
|
||||||
type: integer
|
type: integer
|
||||||
|
default: 1
|
||||||
per:
|
per:
|
||||||
description: Number of records per page
|
description: Number of records per page
|
||||||
type: integer
|
type: integer
|
||||||
|
default: 20
|
||||||
|
|
|
@ -41,6 +41,7 @@
|
||||||
"chai": "^3.5.0",
|
"chai": "^3.5.0",
|
||||||
"eslint": "^3.5.0",
|
"eslint": "^3.5.0",
|
||||||
"eslint-plugin-react": "^6.3.0",
|
"eslint-plugin-react": "^6.3.0",
|
||||||
"mocha": "^3.0.2"
|
"mocha": "^3.0.2",
|
||||||
|
"raml2html": "^4.0.0-beta5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue