Skip to content

Commit 4ee38a7

Browse files
authored
Merge pull request #11 from gotchazipc/master
spec 0.7.0
2 parents 8ffa006 + 03f921d commit 4ee38a7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+449
-313
lines changed

README-API.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
This SDK Contains automatically generated sources & documents with the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
44

5-
- API version: 0.6.0
6-
- Package version: 0.6.0
7-
- Build date: 2016-07-13T17:50:12.792+09:00
5+
- API version: 0.7.0
6+
- Package version: 0.7.0
7+
- Build date: 2016-07-21T13:37:20.306+09:00
88
- Build package: class io.swagger.codegen.languages.JavascriptClientCodegen
99

1010
## Getting Started
@@ -26,6 +26,8 @@ var aliasId = "aliasId_example"; // {String} url path fragment alias id. should
2626

2727
var workspaceId = "workspaceId_example"; // {String} webida workspace id in query part
2828

29+
var srcPath = "srcPath_example"; // {String} source data path of some operations, without have heading /
30+
2931

3032
var callback = function(error, data, response) {
3133
if (error) {
@@ -34,7 +36,7 @@ var callback = function(error, data, response) {
3436
console.log('API called successfully. Returned data: ' + data);
3537
}
3638
};
37-
api.findAliases(aliasId, workspaceId, , callback);
39+
api.findAliases(aliasId, workspaceId, srcPath, callback);
3840

3941
```
4042

@@ -67,10 +69,10 @@ Class | Method | HTTP request | Description
6769
*WebidaRestfulApi.WfsApi* | [**remove**](docs/WfsApi.md#remove) | **DELETE** /wfs/{wfsId}/any/{wfsPath} |
6870
*WebidaRestfulApi.WfsApi* | [**stat**](docs/WfsApi.md#stat) | **GET** /wfs/{wfsId}/any/{wfsPath} |
6971
*WebidaRestfulApi.WfsApi* | [**writeFile**](docs/WfsApi.md#writeFile) | **PUT** /wfs/{wfsId}/file/{wfsPath} |
70-
*WebidaRestfulApi.WorkspaceApi* | [**cancel**](docs/WorkspaceApi.md#cancel) | **DELETE** /workspaces/{workspaceId}/exec |
72+
*WebidaRestfulApi.WorkspaceApi* | [**cancel**](docs/WorkspaceApi.md#cancel) | **DELETE** /workspaces/{workspaceId}/procs |
7173
*WebidaRestfulApi.WorkspaceApi* | [**createWorkspace**](docs/WorkspaceApi.md#createWorkspace) | **POST** /workspaces/{workspaceId} |
72-
*WebidaRestfulApi.WorkspaceApi* | [**exec**](docs/WorkspaceApi.md#exec) | **POST** /workspaces/{workspaceId}/exec |
73-
*WebidaRestfulApi.WorkspaceApi* | [**findProcs**](docs/WorkspaceApi.md#findProcs) | **GET** /workspaces/{workspaceId}/exec |
74+
*WebidaRestfulApi.WorkspaceApi* | [**execute**](docs/WorkspaceApi.md#execute) | **POST** /workspaces/{workspaceId}/procs |
75+
*WebidaRestfulApi.WorkspaceApi* | [**findProcs**](docs/WorkspaceApi.md#findProcs) | **GET** /workspaces/{workspaceId}/procs |
7476
*WebidaRestfulApi.WorkspaceApi* | [**findWorkspaces**](docs/WorkspaceApi.md#findWorkspaces) | **GET** /workspaces/{workspaceId} |
7577
*WebidaRestfulApi.WorkspaceApi* | [**removeWorkspace**](docs/WorkspaceApi.md#removeWorkspace) | **DELETE** /workspaces/{workspaceId} |
7678
*WebidaRestfulApi.WorkspaceApi* | [**updateWorkspace**](docs/WorkspaceApi.md#updateWorkspace) | **PUT** /workspaces/{workspaceId} |

api-bundle.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

api-bundle.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

api-spec/swagger.json

Lines changed: 86 additions & 36 deletions
Large diffs are not rendered by default.

api-spec/swagger.yaml

Lines changed: 78 additions & 34 deletions
Large diffs are not rendered by default.

builder/build.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,12 @@ java -jar swagger-codegen-cli.jar generate \
2020
-i $SPEC_DIR/swagger.yaml -l javascript \
2121
-t $TEMPLATES_DIR -o $API_DIR
2222

23-
# rename generated README.md & restore original, then build with webpack
23+
# rename generated README.md & restore original
2424
cd $API_DIR
2525
mv README.md README-API.md
2626
mv README.md.tmp README.md
27-
npm install
28-
webpack --progress -p
27+
28+
# building webpack bundle is not supported anymore. webida clients may build their own bundle
29+
# with wrappers and 3rd-party libs.
30+
# npm install
31+
# webpack --progress -p

builder/templates/ApiClient.mustache

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,11 @@
385385
request.accept(accept);
386386
}
387387

388+
// if api returns file, then it should be handled as blob
389+
if (returnType === File) {
390+
request.responseType('blob');
391+
}
392+
388393
{{#usePromises}} return new Promise(function(resolve, reject) {
389394
request.end(function(error, response) {
390395
if (error) {

builder/templates/package.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "webida-restful-api",
3-
"version": "0.6.0",
3+
"version": "0.7.0",
44
"description": "Webida Restful API Spec & generated clients",
55
"license": "Apache-2.0",
66
"main": "{{sourceFolder}}{{#invokerPackage}}/{{invokerPackage}}{{/invokerPackage}}/index.js",

docs/Alias.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**id** | **String** | id, and the path-fragment to access. Since this id is a path-fragment, any unsafe chars for path should not be included, especially / char. ?, *, and other special characters for shell are not also allowed. | [optional]
7-
**workspaceId** | **String** | id of the workspace that contains source of alias | [optional]
8-
**sourcePath** | **String** | the source of alias, relative path to workspace root directory. | [optional]
6+
**id** | **String** | id, and the path-fragment to access. Since this id is a path-fragment, any unsafe chars for file system path should not be included. Windows OS prohibits following characters to be used in a file name. < (less than) > (greater than) : (colon) \" (double quote) / (forward slash) \\ (backslash) | (vertical bar or pipe) ? (question mark) * (asterisk) |
7+
**workspaceId** | **String** | id of the workspace that contains source of alias |
8+
**sourcePath** | **String** | the source of alias, relative path to workspace root directory. |
99

1010

docs/AliasApi.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ Method | HTTP request | Description
1111

1212
<a name="findAliases"></a>
1313
# **findAliases**
14-
> [Alias] findAliases(aliasId, workspaceId, )
14+
> [Alias] findAliases(aliasId, workspaceId, srcPath)
1515
1616

1717

18-
get alias objects. set aliasId to &#39;*&#39; to find all aliases in some workspace. if alias id is given, only 0 or 1 matched alias object will be returned.
18+
get alias objects. set aliasId to &#39;*&#39; to find all aliases in some workspace. If alias id is given, only 0 or 1 matched alias object will be returned, ignoring workspaceId and srcPath. To get an alias object of some wfs path, set srcPath value to some path, and to find all aliases in a workspace, set it to &#39;*&#39; (empty value is not allowed by definition)
1919

2020
### Example
2121
```javascript
@@ -34,6 +34,8 @@ var aliasId = "aliasId_example"; // String | url path fragment alias id. should
3434

3535
var workspaceId = "workspaceId_example"; // String | webida workspace id in query part
3636

37+
var srcPath = "srcPath_example"; // String | source data path of some operations, without have heading /
38+
3739

3840
var callback = function(error, data, response) {
3941
if (error) {
@@ -42,7 +44,7 @@ var callback = function(error, data, response) {
4244
console.log('API called successfully. Returned data: ' + data);
4345
}
4446
};
45-
apiInstance.findAliases(aliasId, workspaceId, , callback);
47+
apiInstance.findAliases(aliasId, workspaceId, srcPath, callback);
4648
```
4749

4850
### Parameters
@@ -51,6 +53,7 @@ Name | Type | Description | Notes
5153
------------- | ------------- | ------------- | -------------
5254
**aliasId** | **String**| url path fragment alias id. should have no &#39;/&#39; as well as any &#39;unsafe&#39; chars for url path. especially, &#39;*&#39; is reserved for finding operations or some other special case. |
5355
**workspaceId** | **String**| webida workspace id in query part |
56+
**srcPath** | **String**| source data path of some operations, without have heading / |
5457

5558
### Return type
5659

@@ -123,7 +126,7 @@ Name | Type | Description | Notes
123126

124127
<a name="removeAliases"></a>
125128
# **removeAliases**
126-
> RestOK removeAliases(aliasId, workspaceId, )
129+
> RestOK removeAliases(aliasId, workspaceId, srcPath)
127130
128131

129132

@@ -146,6 +149,8 @@ var aliasId = "aliasId_example"; // String | url path fragment alias id. should
146149

147150
var workspaceId = "workspaceId_example"; // String | webida workspace id in query part
148151

152+
var srcPath = "srcPath_example"; // String | source data path of some operations, without have heading /
153+
149154

150155
var callback = function(error, data, response) {
151156
if (error) {
@@ -154,7 +159,7 @@ var callback = function(error, data, response) {
154159
console.log('API called successfully. Returned data: ' + data);
155160
}
156161
};
157-
apiInstance.removeAliases(aliasId, workspaceId, , callback);
162+
apiInstance.removeAliases(aliasId, workspaceId, srcPath, callback);
158163
```
159164

160165
### Parameters
@@ -163,6 +168,7 @@ Name | Type | Description | Notes
163168
------------- | ------------- | ------------- | -------------
164169
**aliasId** | **String**| url path fragment alias id. should have no &#39;/&#39; as well as any &#39;unsafe&#39; chars for url path. especially, &#39;*&#39; is reserved for finding operations or some other special case. |
165170
**workspaceId** | **String**| webida workspace id in query part |
171+
**srcPath** | **String**| source data path of some operations, without have heading / |
166172

167173
### Return type
168174

0 commit comments

Comments
 (0)