Skip to content

Commit

Permalink
Merge pull request #14 from gotchazipc/master
Browse files Browse the repository at this point in the history
changed search/replace operation tags to wfs, from ops
  • Loading branch information
gotchazipc authored Aug 18, 2016
2 parents 089754c + ed82e18 commit a14385e
Show file tree
Hide file tree
Showing 12 changed files with 296 additions and 434 deletions.
6 changes: 3 additions & 3 deletions README-API.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This SDK Contains automatically generated sources & documents with the [Swagger

- API version: 0.7.1
- Package version: 0.7.1
- Build date: 2016-08-09T17:23:32.460+09:00
- Build date: 2016-08-18T15:47:36.665+09:00
- Build package: class io.swagger.codegen.languages.JavascriptClientCodegen

## Getting Started
Expand Down Expand Up @@ -54,8 +54,6 @@ Class | Method | HTTP request | Description
*WebidaRestfulApi.AuthApi* | [**getInfo**](docs/AuthApi.md#getInfo) | **GET** /auth/info |
*WebidaRestfulApi.AuthApi* | [**issueToken**](docs/AuthApi.md#issueToken) | **POST** /auth/token |
*WebidaRestfulApi.AuthApi* | [**login**](docs/AuthApi.md#login) | **POST** /auth/login |
*WebidaRestfulApi.OpsApi* | [**replace**](docs/OpsApi.md#replace) | **POST** /wfs/{wfsId}/ops/replace |
*WebidaRestfulApi.OpsApi* | [**search**](docs/OpsApi.md#search) | **GET** /wfs/{wfsId}/ops/search |
*WebidaRestfulApi.RemotesApi* | [**findRemoteAccesses**](docs/RemotesApi.md#findRemoteAccesses) | **GET** /remotes |
*WebidaRestfulApi.RemotesApi* | [**putRemoteAccess**](docs/RemotesApi.md#putRemoteAccess) | **PUT** /remotes |
*WebidaRestfulApi.RemotesApi* | [**removeRemoteAccess**](docs/RemotesApi.md#removeRemoteAccess) | **DELETE** /remotes |
Expand All @@ -67,6 +65,8 @@ Class | Method | HTTP request | Description
*WebidaRestfulApi.WfsApi* | [**move**](docs/WfsApi.md#move) | **POST** /wfs/{wfsId}/any/{wfsPath} |
*WebidaRestfulApi.WfsApi* | [**readFile**](docs/WfsApi.md#readFile) | **GET** /wfs/{wfsId}/file/{wfsPath} |
*WebidaRestfulApi.WfsApi* | [**remove**](docs/WfsApi.md#remove) | **DELETE** /wfs/{wfsId}/any/{wfsPath} |
*WebidaRestfulApi.WfsApi* | [**replace**](docs/WfsApi.md#replace) | **POST** /wfs/{wfsId}/ops/replace |
*WebidaRestfulApi.WfsApi* | [**search**](docs/WfsApi.md#search) | **GET** /wfs/{wfsId}/ops/search |
*WebidaRestfulApi.WfsApi* | [**stat**](docs/WfsApi.md#stat) | **GET** /wfs/{wfsId}/any/{wfsPath} |
*WebidaRestfulApi.WfsApi* | [**writeFile**](docs/WfsApi.md#writeFile) | **PUT** /wfs/{wfsId}/file/{wfsPath} |
*WebidaRestfulApi.WorkspaceApi* | [**cancel**](docs/WorkspaceApi.md#cancel) | **DELETE** /workspaces/{workspaceId}/procs |
Expand Down
4 changes: 2 additions & 2 deletions api-spec/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@
},
"/wfs/{wfsId}/ops/replace" : {
"post" : {
"tags" : [ "ops" ],
"tags" : [ "wfs" ],
"description" : "replace file contents with regex matching",
"operationId" : "replace",
"parameters" : [ {
Expand Down Expand Up @@ -872,7 +872,7 @@
},
"/wfs/{wfsId}/ops/search" : {
"get" : {
"tags" : [ "ops" ],
"tags" : [ "wfs" ],
"description" : "search files in some path, with given pattern",
"operationId" : "search",
"parameters" : [ {
Expand Down
4 changes: 2 additions & 2 deletions api-spec/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ paths:
/wfs/{wfsId}/ops/search:
get:
x-handler: handlers/wfs/search.js
tags: ["ops"]
tags: ["wfs"]
description: search files in some path, with given pattern
operationId: search
security:
Expand Down Expand Up @@ -421,7 +421,7 @@ paths:
/wfs/{wfsId}/ops/replace:
post:
x-handler: handlers/wfs/replace.js
tags: ["ops"]
tags: ["wfs"]
description: replace file contents with regex matching
operationId: replace
security:
Expand Down
2 changes: 1 addition & 1 deletion builder/templates/package.mustache
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "webida-restful-api",
"version": "0.8.0",
"version": "0.8.1",
"description": "Webida Restful API Spec & generated clients",
"license": "Apache-2.0",
"main": "{{sourceFolder}}{{#invokerPackage}}/{{invokerPackage}}{{/invokerPackage}}/index.js",
Expand Down
139 changes: 0 additions & 139 deletions docs/OpsApi.md

This file was deleted.

131 changes: 131 additions & 0 deletions docs/WfsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Method | HTTP request | Description
[**move**](WfsApi.md#move) | **POST** /wfs/{wfsId}/any/{wfsPath} |
[**readFile**](WfsApi.md#readFile) | **GET** /wfs/{wfsId}/file/{wfsPath} |
[**remove**](WfsApi.md#remove) | **DELETE** /wfs/{wfsId}/any/{wfsPath} |
[**replace**](WfsApi.md#replace) | **POST** /wfs/{wfsId}/ops/replace |
[**search**](WfsApi.md#search) | **GET** /wfs/{wfsId}/ops/search |
[**stat**](WfsApi.md#stat) | **GET** /wfs/{wfsId}/any/{wfsPath} |
[**writeFile**](WfsApi.md#writeFile) | **PUT** /wfs/{wfsId}/file/{wfsPath} |

Expand Down Expand Up @@ -376,6 +378,135 @@ Name | Type | Description | Notes

[webida-simple-auth](../README.md#webida-simple-auth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json, application/octet-stream

<a name="replace"></a>
# **replace**
> RestOK replace(wfsId, wfsPathList, patternreplaceTo, opts)


replace file contents with regex matching

### Example
```javascript
var WebidaRestfulApi = require('webida_restful_api');
var defaultClient = WebidaRestfulApi.ApiClient.default;

// Configure API key authorization: webida-simple-auth
var webida-simple-auth = defaultClient.authentications['webida-simple-auth'];
webida-simple-auth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//webida-simple-auth.apiKeyPrefix = 'Token';

var apiInstance = new WebidaRestfulApi.WfsApi();

var wfsId = "wfsId_example"; // String | webida file system id (same to workspace id) to access.

var wfsPathList = ["wfsPathList_example"]; // [String] | array of wfsPath, without heading /.

var pattern = "pattern_example"; // String | regex pattern to match in search or replace. In replace operation, pattern should be same to the parttern in search operation

var replaceTo = "replaceTo_example"; // String | string to replace with

var opts = {
'ignoreCase': false // Boolean | regex matching option to ignore case. In replace operation, this option should be same to one used in search operation
};

var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.replace(wfsId, wfsPathList, patternreplaceTo, opts, callback);
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**wfsId** | **String**| webida file system id (same to workspace id) to access. |
**wfsPathList** | [**[String]**](String.md)| array of wfsPath, without heading /. |
**pattern** | **String**| regex pattern to match in search or replace. In replace operation, pattern should be same to the parttern in search operation |
**replaceTo** | **String**| string to replace with |
**ignoreCase** | **Boolean**| regex matching option to ignore case. In replace operation, this option should be same to one used in search operation | [optional] [default to false]

### Return type

[**RestOK**](RestOK.md)

### Authorization

[webida-simple-auth](../README.md#webida-simple-auth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json, application/octet-stream

<a name="search"></a>
# **search**
> {&#39;String&#39;: [Match]} search(wfsId, wfsPathList, pattern, opts)


search files in some path, with given pattern

### Example
```javascript
var WebidaRestfulApi = require('webida_restful_api');
var defaultClient = WebidaRestfulApi.ApiClient.default;

// Configure API key authorization: webida-simple-auth
var webida-simple-auth = defaultClient.authentications['webida-simple-auth'];
webida-simple-auth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//webida-simple-auth.apiKeyPrefix = 'Token';

var apiInstance = new WebidaRestfulApi.WfsApi();

var wfsId = "wfsId_example"; // String | webida file system id (same to workspace id) to access.

var wfsPathList = ["wfsPathList_example"]; // [String] | array of wfsPath, without heading /.

var pattern = "pattern_example"; // String | regex pattern to match in search or replace. In replace operation, pattern should be same to the parttern in search operation

var opts = {
'ignoreCase': false // Boolean | regex matching option to ignore case. In replace operation, this option should be same to one used in search operation
};

var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.search(wfsId, wfsPathList, pattern, opts, callback);
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**wfsId** | **String**| webida file system id (same to workspace id) to access. |
**wfsPathList** | [**[String]**](String.md)| array of wfsPath, without heading /. |
**pattern** | **String**| regex pattern to match in search or replace. In replace operation, pattern should be same to the parttern in search operation |
**ignoreCase** | **Boolean**| regex matching option to ignore case. In replace operation, this option should be same to one used in search operation | [optional] [default to false]

### Return type

**{&#39;String&#39;: [Match]}**

### Authorization

[webida-simple-auth](../README.md#webida-simple-auth)

### HTTP request headers

- **Content-Type**: application/json
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "webida-restful-api",
"version": "0.8.0",
"version": "0.8.1",
"description": "Webida Restful API Spec & generated clients",
"license": "Apache-2.0",
"main": "src/index.js",
Expand Down
Loading

0 comments on commit a14385e

Please sign in to comment.