Skip to content

Commit 97008e4

Browse files
committed
sdk generated
1 parent 70bcea4 commit 97008e4

Some content is hidden

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

45 files changed

+4275
-15
lines changed

.babelrc

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"presets": [
3+
"@babel/preset-env"
4+
],
5+
"plugins": [
6+
"@babel/plugin-syntax-dynamic-import",
7+
"@babel/plugin-syntax-import-meta",
8+
"@babel/plugin-proposal-class-properties",
9+
"@babel/plugin-proposal-json-strings",
10+
[
11+
"@babel/plugin-proposal-decorators",
12+
{
13+
"legacy": true
14+
}
15+
],
16+
"@babel/plugin-proposal-function-sent",
17+
"@babel/plugin-proposal-export-namespace-from",
18+
"@babel/plugin-proposal-numeric-separator",
19+
"@babel/plugin-proposal-throw-expressions",
20+
"@babel/plugin-proposal-export-default-from",
21+
"@babel/plugin-proposal-logical-assignment-operators",
22+
"@babel/plugin-proposal-optional-chaining",
23+
[
24+
"@babel/plugin-proposal-pipeline-operator",
25+
{
26+
"proposal": "minimal"
27+
}
28+
],
29+
"@babel/plugin-proposal-nullish-coalescing-operator",
30+
"@babel/plugin-proposal-do-expressions",
31+
"@babel/plugin-proposal-function-bind"
32+
]
33+
}

.gitignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ out
8989

9090
# Nuxt.js build / generate output
9191
.nuxt
92+
dist
9293

9394
# Gatsby files
9495
.cache/
@@ -126,6 +127,4 @@ out
126127
.yarn/unplugged
127128
.yarn/build-state.yml
128129
.yarn/install-state.gz
129-
.pnp.*
130-
131-
.idea/
130+
.pnp.*

.openapi-generator-ignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# OpenAPI Generator Ignore
2+
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
3+
4+
# Use this file to prevent files from being overwritten by the generator.
5+
# The patterns follow closely to .gitignore or .dockerignore.
6+
7+
# As an example, the C# client generator defines ApiClient.cs.
8+
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
9+
#ApiClient.cs
10+
11+
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
12+
#foo/*/qux
13+
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14+
15+
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16+
#foo/**/qux
17+
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18+
19+
# You can also negate patterns with an exclamation (!).
20+
# For example, you can ignore all files in a docs folder with the file extension .md:
21+
#docs/*.md
22+
# Then explicitly reverse the ignore rule for a single file:
23+
#!docs/README.md

.openapi-generator/FILES

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
.babelrc
2+
.gitignore
3+
.openapi-generator-ignore
4+
.travis.yml
5+
README.md
6+
docs/AddStub200Response.md
7+
docs/AddStubRequest.md
8+
docs/HealthcheckApi.md
9+
docs/MessageOK.md
10+
docs/SearchRequest.md
11+
docs/SearchResponse.md
12+
docs/Stub.md
13+
docs/StubHeaders.md
14+
docs/StubInput.md
15+
docs/StubOutput.md
16+
docs/StubsApi.md
17+
git_push.sh
18+
mocha.opts
19+
package.json
20+
src/ApiClient.js
21+
src/api/HealthcheckApi.js
22+
src/api/StubsApi.js
23+
src/index.js
24+
src/model/AddStub200Response.js
25+
src/model/AddStubRequest.js
26+
src/model/MessageOK.js
27+
src/model/SearchRequest.js
28+
src/model/SearchResponse.js
29+
src/model/Stub.js
30+
src/model/StubHeaders.js
31+
src/model/StubInput.js
32+
src/model/StubOutput.js
33+
test/api/HealthcheckApi.spec.js
34+
test/api/StubsApi.spec.js
35+
test/model/AddStub200Response.spec.js
36+
test/model/AddStubRequest.spec.js
37+
test/model/MessageOK.spec.js
38+
test/model/SearchRequest.spec.js
39+
test/model/SearchResponse.spec.js
40+
test/model/Stub.spec.js
41+
test/model/StubHeaders.spec.js
42+
test/model/StubInput.spec.js
43+
test/model/StubOutput.spec.js

.openapi-generator/VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
7.4.0-SNAPSHOT

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
language: node_js
2+
cache: npm
3+
node_js:
4+
- "6"
5+
- "6.1"

README.md

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
# gripmock-sdk-js
2+
3+
GripmockSdkJs - JavaScript client for gripmock-sdk-js
4+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5+
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
6+
7+
- API version: 2.4.0
8+
- Package version: 2.4.0
9+
- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen
10+
11+
## Installation
12+
13+
### For [Node.js](https://nodejs.org/)
14+
15+
#### npm
16+
17+
To publish the library as a [npm](https://www.npmjs.com/), please follow the procedure in ["Publishing npm packages"](https://docs.npmjs.com/getting-started/publishing-npm-packages).
18+
19+
Then install it via:
20+
21+
```shell
22+
npm install gripmock-sdk-js --save
23+
```
24+
25+
Finally, you need to build the module:
26+
27+
```shell
28+
npm run build
29+
```
30+
31+
##### Local development
32+
33+
To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing `package.json` (and this README). Let's call this `JAVASCRIPT_CLIENT_DIR`. Then run:
34+
35+
```shell
36+
npm install
37+
```
38+
39+
Next, [link](https://docs.npmjs.com/cli/link) it globally in npm with the following, also from `JAVASCRIPT_CLIENT_DIR`:
40+
41+
```shell
42+
npm link
43+
```
44+
45+
To use the link you just defined in your project, switch to the directory you want to use your gripmock-sdk-js from, and run:
46+
47+
```shell
48+
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
49+
```
50+
51+
Finally, you need to build the module:
52+
53+
```shell
54+
npm run build
55+
```
56+
57+
#### git
58+
59+
If the library is hosted at a git repository, e.g.https://github.com/GIT_USER_ID/GIT_REPO_ID
60+
then install it via:
61+
62+
```shell
63+
npm install GIT_USER_ID/GIT_REPO_ID --save
64+
```
65+
66+
### For browser
67+
68+
The library also works in the browser environment via npm and [browserify](http://browserify.org/). After following
69+
the above steps with Node.js and installing browserify with `npm install -g browserify`,
70+
perform the following (assuming *main.js* is your entry file):
71+
72+
```shell
73+
browserify main.js > bundle.js
74+
```
75+
76+
Then include *bundle.js* in the HTML pages.
77+
78+
### Webpack Configuration
79+
80+
Using Webpack you may encounter the following error: "Module not found: Error:
81+
Cannot resolve module", most certainly you should disable AMD loader. Add/merge
82+
the following section to your webpack config:
83+
84+
```javascript
85+
module: {
86+
rules: [
87+
{
88+
parser: {
89+
amd: false
90+
}
91+
}
92+
]
93+
}
94+
```
95+
96+
## Getting Started
97+
98+
Please follow the [installation](#installation) instruction and execute the following JS code:
99+
100+
```javascript
101+
var GripmockSdkJs = require('gripmock-sdk-js');
102+
103+
104+
var api = new GripmockSdkJs.HealthcheckApi()
105+
var callback = function(error, data, response) {
106+
if (error) {
107+
console.error(error);
108+
} else {
109+
console.log('API called successfully. Returned data: ' + data);
110+
}
111+
};
112+
api.liveness(callback);
113+
114+
```
115+
116+
## Documentation for API Endpoints
117+
118+
All URIs are relative to *https://raw.githubusercontent.com/api*
119+
120+
Class | Method | HTTP request | Description
121+
------------ | ------------- | ------------- | -------------
122+
*GripmockSdkJs.HealthcheckApi* | [**liveness**](docs/HealthcheckApi.md#liveness) | **GET** /health/liveness | Liveness check
123+
*GripmockSdkJs.HealthcheckApi* | [**readiness**](docs/HealthcheckApi.md#readiness) | **GET** /health/readiness | Readiness check
124+
*GripmockSdkJs.StubsApi* | [**addStub**](docs/StubsApi.md#addStub) | **POST** /stubs | Add a new stub to the store
125+
*GripmockSdkJs.StubsApi* | [**batchStubsDelete**](docs/StubsApi.md#batchStubsDelete) | **POST** /stubs/batchDelete | Deletes a pack by IDs
126+
*GripmockSdkJs.StubsApi* | [**deleteStubByID**](docs/StubsApi.md#deleteStubByID) | **DELETE** /stubs/{uuid} | Deletes stub by ID
127+
*GripmockSdkJs.StubsApi* | [**listStubs**](docs/StubsApi.md#listStubs) | **GET** /stubs | Getting a list of stubs
128+
*GripmockSdkJs.StubsApi* | [**listUnusedStubs**](docs/StubsApi.md#listUnusedStubs) | **GET** /stubs/unused | Getting a list of unused stubs
129+
*GripmockSdkJs.StubsApi* | [**listUsedStubs**](docs/StubsApi.md#listUsedStubs) | **GET** /stubs/used | Getting a list of used stubs
130+
*GripmockSdkJs.StubsApi* | [**purgeStubs**](docs/StubsApi.md#purgeStubs) | **DELETE** /stubs | Remove all stubs
131+
*GripmockSdkJs.StubsApi* | [**searchStubs**](docs/StubsApi.md#searchStubs) | **POST** /stubs/search | Stub storage search
132+
133+
134+
## Documentation for Models
135+
136+
- [GripmockSdkJs.AddStub200Response](docs/AddStub200Response.md)
137+
- [GripmockSdkJs.AddStubRequest](docs/AddStubRequest.md)
138+
- [GripmockSdkJs.MessageOK](docs/MessageOK.md)
139+
- [GripmockSdkJs.SearchRequest](docs/SearchRequest.md)
140+
- [GripmockSdkJs.SearchResponse](docs/SearchResponse.md)
141+
- [GripmockSdkJs.Stub](docs/Stub.md)
142+
- [GripmockSdkJs.StubHeaders](docs/StubHeaders.md)
143+
- [GripmockSdkJs.StubInput](docs/StubInput.md)
144+
- [GripmockSdkJs.StubOutput](docs/StubOutput.md)
145+
146+
147+
## Documentation for Authorization
148+
149+
Endpoints do not require authorization.
150+

docs/AddStub200Response.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# GripmockSdkJs.AddStub200Response
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
8+

docs/AddStubRequest.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# GripmockSdkJs.AddStubRequest
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**id** | **String** | | [optional]
8+
**service** | **String** | |
9+
**method** | **String** | |
10+
**headers** | [**StubHeaders**](StubHeaders.md) | | [optional]
11+
**input** | [**StubInput**](StubInput.md) | |
12+
**output** | [**StubOutput**](StubOutput.md) | |
13+
14+

docs/HealthcheckApi.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# GripmockSdkJs.HealthcheckApi
2+
3+
All URIs are relative to *https://raw.githubusercontent.com/api*
4+
5+
Method | HTTP request | Description
6+
------------- | ------------- | -------------
7+
[**liveness**](HealthcheckApi.md#liveness) | **GET** /health/liveness | Liveness check
8+
[**readiness**](HealthcheckApi.md#readiness) | **GET** /health/readiness | Readiness check
9+
10+
11+
12+
## liveness
13+
14+
> MessageOK liveness()
15+
16+
Liveness check
17+
18+
The test says that the service is alive and yet
19+
20+
### Example
21+
22+
```javascript
23+
import GripmockSdkJs from 'gripmock-sdk-js';
24+
25+
let apiInstance = new GripmockSdkJs.HealthcheckApi();
26+
apiInstance.liveness((error, data, response) => {
27+
if (error) {
28+
console.error(error);
29+
} else {
30+
console.log('API called successfully. Returned data: ' + data);
31+
}
32+
});
33+
```
34+
35+
### Parameters
36+
37+
This endpoint does not need any parameter.
38+
39+
### Return type
40+
41+
[**MessageOK**](MessageOK.md)
42+
43+
### Authorization
44+
45+
No authorization required
46+
47+
### HTTP request headers
48+
49+
- **Content-Type**: Not defined
50+
- **Accept**: application/json
51+
52+
53+
## readiness
54+
55+
> MessageOK readiness()
56+
57+
Readiness check
58+
59+
The test indicates readiness to receive traffic
60+
61+
### Example
62+
63+
```javascript
64+
import GripmockSdkJs from 'gripmock-sdk-js';
65+
66+
let apiInstance = new GripmockSdkJs.HealthcheckApi();
67+
apiInstance.readiness((error, data, response) => {
68+
if (error) {
69+
console.error(error);
70+
} else {
71+
console.log('API called successfully. Returned data: ' + data);
72+
}
73+
});
74+
```
75+
76+
### Parameters
77+
78+
This endpoint does not need any parameter.
79+
80+
### Return type
81+
82+
[**MessageOK**](MessageOK.md)
83+
84+
### Authorization
85+
86+
No authorization required
87+
88+
### HTTP request headers
89+
90+
- **Content-Type**: Not defined
91+
- **Accept**: application/json
92+

0 commit comments

Comments
 (0)