Skip to content

Commit

Permalink
First commit of sample configuration, Haufe-Lexware/wicked.haufe.io#64
Browse files Browse the repository at this point in the history
  • Loading branch information
DonMartin76 committed Jun 1, 2017
0 parents commit d84485f
Show file tree
Hide file tree
Showing 36 changed files with 3,097 additions and 0 deletions.
43 changes: 43 additions & 0 deletions static/apis/apis.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"apis": [
{
"id": "petstore",
"name": "Petstore",
"desc": "This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io).",
"auth": "key-auth",
"tags": [
"Sample"
],
"plans": [
"basic",
"unlimited"
]
},
{
"id": "petstore-oauth",
"name": "Petstore OAuth",
"desc": "This is a sample Petstore server secured via OAuth 2.0 Client Credentials flow.",
"auth": "oauth2",
"tags": [
"Sample"
],
"requiredGroup": "dev",
"plans": [
"basic",
"unlimited"
],
"settings": {
"token_expiration": 3600,
"enable_client_credentials": true
}
}
],
"_links": {
"self": {
"href": "/apis"
},
"plans": {
"href": "/plans"
}
}
}
3 changes: 3 additions & 0 deletions static/apis/desc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Click on an API in order to see more information on it and to subscribe to it. Only after subscribing, you will get an API key which enables you to actually call the API.

Here you can add custom text and generic information on your APIs, and it will appear on the `/apis` page. As the selection of APIs may depend on the groups a user belongs to, you should perhaps not assume you can refer to specific APIs, as long as they are not publicly visible.
10 changes: 10 additions & 0 deletions static/apis/petstore-oauth/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"api": {
"upstream_url": "http://petstore.swagger.io/v2",
"request_path": "/petstore-oauth",
"preserve_host": false,
"strip_request_path": true,
"name": "petstore-oauth"
},
"plugins": []
}
3 changes: 3 additions & 0 deletions static/apis/petstore-oauth/desc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This is the sample Swagger file from [swagger.io](http://swagger.io). This is picked as a sample as the backend service is always available at no charge, which makes it easier to wire it in your own API gateway.

The reason why this API is present twice is that the first API is using API key authorization, and this one uses OAuth 2.0 client credential flow authorization.
Loading

0 comments on commit d84485f

Please sign in to comment.