Skip to content

Commit b2a16d0

Browse files
committed
エミュレータに必要なリソースを復元。
1 parent 2e8b535 commit b2a16d0

10 files changed

Lines changed: 540 additions & 0 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Swagger generated server
2+
3+
## Overview
4+
This server was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the [OpenAPI-Spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate a server stub. This is an example of building a node.js server.
5+
6+
This example uses the [expressjs](http://expressjs.com/) framework. To see how to make this your own, look here:
7+
8+
[README](https://github.com/swagger-api/swagger-codegen/blob/master/README.md)
9+
10+
### Running the server
11+
To run the server, run:
12+
13+
```
14+
npm start
15+
```
16+
17+
To view the Swagger UI interface:
18+
19+
```
20+
open http://localhost:{{serverPort}}/docs
21+
```
22+
23+
This project leverages the mega-awesome [swagger-tools](https://github.com/apigee-127/swagger-tools) middleware which does most all the work.
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
{
2+
"swagger": "2.0",
3+
"info": {
4+
"title": "Authorization Profile",
5+
"version": "2.0.0",
6+
"description": ""
7+
},
8+
"consumes": [],
9+
"paths": {
10+
"/grant": {
11+
"get": {
12+
"x-type": "one-shot",
13+
"summary": "",
14+
"description": "",
15+
"parameters": [],
16+
"responses": {
17+
"200": {
18+
"description": "",
19+
"schema": {
20+
"$ref": "#/definitions/CommonResponse"
21+
},
22+
"examples": {
23+
"application/json": {
24+
"result": 0,
25+
"product": "Example System",
26+
"version": "1.0.0",
27+
"clientId": "dummy-client-id"
28+
}
29+
}
30+
}
31+
}
32+
}
33+
},
34+
"/accessToken": {
35+
"get": {
36+
"x-type": "one-shot",
37+
"summary": "",
38+
"description": "",
39+
"parameters": [
40+
{
41+
"name": "clientId",
42+
"in": "query",
43+
"required": true,
44+
"type": "string"
45+
},
46+
{
47+
"name": "applicationName",
48+
"in": "query",
49+
"required": true,
50+
"type": "string"
51+
},
52+
{
53+
"name": "scope",
54+
"in": "query",
55+
"required": true,
56+
"type": "array",
57+
"items": {
58+
"type": "string"
59+
}
60+
}
61+
],
62+
"responses": {
63+
"200": {
64+
"description": "",
65+
"schema": {
66+
"$ref": "#/definitions/CommonResponse"
67+
},
68+
"examples": {
69+
"application/json": {
70+
"result": 0,
71+
"product": "Example System",
72+
"version": "1.0.0",
73+
"accessToken": "dummy-access-token"
74+
}
75+
}
76+
}
77+
}
78+
}
79+
}
80+
}
81+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"swagger": "2.0",
3+
"info": {
4+
"title": "Availability Profile",
5+
"version": "2.0.0",
6+
"description": ""
7+
},
8+
"consumes": [],
9+
"basePath": "/gotapi/availability",
10+
"paths": {
11+
"/": {
12+
"get": {
13+
"x-type": "one-shot",
14+
"summary": "",
15+
"description": "",
16+
"parameters": [],
17+
"responses": {
18+
"200": {
19+
"description": "",
20+
"schema": {
21+
"$ref": "#/definitions/CommonResponse"
22+
},
23+
"examples": {
24+
"application/json": {
25+
"result": 0,
26+
"product": "Example System",
27+
"version": "1.0.0"
28+
}
29+
}
30+
}
31+
}
32+
}
33+
}
34+
}
35+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
'use strict';
2+
3+
var url = require('url');
4+
5+
{{#operations}}
6+
7+
var {{classname}} = require('./{{classname}}Service');
8+
9+
{{#operation}}
10+
11+
module.exports.{{nickname}} = function {{nickname}} (req, res, next) {
12+
{{classname}}.{{nickname}}(req.swagger.params, res, next);
13+
};
14+
{{/operation}}
15+
{{/operations}}

0 commit comments

Comments
 (0)