http_test_service_for_swaggertest v3.5.0-8.96
http_test_service_for_swaggertest
HttpTestServiceForSwaggertest - JavaScript client for http_test_service_for_swaggertest
- API version: 3.5.008.97
- Package version: 3.5.008.97
- Build date: 2016-12-15T21:21:29.048+07:00
- Build package: class io.swagger.codegen.languages.JavascriptClientCodegen
Installation
For Node.js
npm
To publish the library as a npm, please follow the procedure in "Publishing npm packages".
Then install it via:
npm install http_test_service_for_swaggertest --save
git
If the library is hosted at a git repository, e.g. https://github.com/YOUR_USERNAME/http_test_service_for_swaggertest then install it via:
npm install YOUR_USERNAME/http_test_service_for_swaggertest --save
For browser
The library also works in the browser environment via npm and browserify. After following
the above steps with Node.js and installing browserify with npm install -g browserify
,
perform the following (assuming main.js is your entry file):
browserify main.js > bundle.js
Then include bundle.js in the HTML pages.
Getting Started
Please follow the installation instruction and execute the following JS code:
var HttpTestServiceForSwaggertest = require('http_test_service_for_swaggertest');
var defaultClient = HttpTestServiceForSwaggertest.ApiClient.instance;
// Configure API key authorization: apiKey
var apiKey = defaultClient.authentications['apiKey'];
apiKey.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix['x-session-token'] = "Token"
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME'
basicAuth.password = 'YOUR PASSWORD'
// Configure OAuth2 access token for authorization: oauth2Auth
var oauth2Auth = defaultClient.authentications['oauth2Auth'];
oauth2Auth.accessToken = "YOUR ACCESS TOKEN"
var api = new HttpTestServiceForSwaggertest.HttpTestServiceForSwaggerGeneralServiceInvokeApi()
var opts = {
'eventHandler': "eventHandler_example", // {String} Service handler name. One of handlerName or eventId should be specified.
'eventId': "eventId_example", // {String} Event ID. One of 'handlerName' or 'eventId' should be specified.
'data': "data_example", // {String} Data object serialized in corresponding format. One of 'data' or 'event' should be specified.
'event': "event_example", // {String} Event serialized in corresponding format. One of 'eventId', 'event' or 'dataHandler' should be specified.
'timeout': 56, // {Integer} Invoke timeout in milliseconds. Default value is 30000ms.
'loadBalance': "loadBalance_example", // {String} Load balance.
'correlationId': "correlationId_example", // {String} Event correlation ID.
'eventGroupId': "eventGroupId_example", // {String} Event group ID.
'eventKey': "eventKey_example", // {String} Event key.
'durable': true, // {Boolean} Event durable or not.
'eventProperties': "eventProperties_example", // {String} Event properties in format propertyName1=value1;....
'requestFormat': "json;swagger=true", // {String} Request data format. Overrides Content-Type header value.
'responseFormat': "json;swagger=true" // {String} Response data format. Overrides Accept header value.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.rootGet(opts, callback);
Documentation for API Endpoints
All URIs are relative to http://localhost:8888/service/invoke/HttpTestServiceForSwagger.Test
Class | Method | HTTP request | Description |
---|---|---|---|
HttpTestServiceForSwaggertest.HttpTestServiceForSwaggerGeneralServiceInvokeApi | rootGet | GET / | Generic REST call to invoke service 'HttpTestServiceForSwagger.Test'. |
HttpTestServiceForSwaggertest.HttpTestServiceForSwaggerMethodAcceptsDataEventReturnsDataEventApi | methodAcceptsDataEventReturnsDataEventPost | POST /methodAcceptsDataEventReturnsDataEvent | REST call to invoke service event handler. |
HttpTestServiceForSwaggertest.HttpTestServiceForSwaggerMethodAcceptsDataEventReturnsObjectApi | methodAcceptsDataEventReturnsObjectPost | POST /methodAcceptsDataEventReturnsObject | REST call to invoke service event handler. |
HttpTestServiceForSwaggertest.HttpTestServiceForSwaggerMethodAcceptsDataEventWithPropertiesReturnsDataEventWithPropertiesApi | methodAcceptsDataEventWithPropertiesReturnsDataEventWithPropertiesPost | POST /methodAcceptsDataEventWithPropertiesReturnsDataEventWithProperties | REST call to invoke service event handler. |
HttpTestServiceForSwaggertest.HttpTestServiceForSwaggerMethodAcceptsObjectReturnsObjectApi | methodAcceptsObjectReturnsObjectPost | POST /methodAcceptsObjectReturnsObject | REST call to invoke service event handler. |
HttpTestServiceForSwaggertest.HttpTestServiceForSwaggerMethodAcceptsVoidReturnsObjectApi | methodAcceptsVoidReturnsObjectPost | POST /methodAcceptsVoidReturnsObject | REST call to invoke service event handler. |
HttpTestServiceForSwaggertest.HttpTestServiceForSwaggerMethodAcceptsVoidReturnsVoidApi | methodAcceptsVoidReturnsVoidPost | POST /methodAcceptsVoidReturnsVoid | REST call to invoke service event handler. |
HttpTestServiceForSwaggertest.HttpTestServiceForSwaggerMethodNotYetImplementedApi | methodNotYetImplementedPost | POST /methodNotYetImplemented | REST call to invoke service event handler. |
Documentation for Models
- HttpTestServiceForSwaggertest.AccessControl
- HttpTestServiceForSwaggertest.DataEventEventHttpTestSwaggerDataTestObjectResponse
- HttpTestServiceForSwaggertest.DataEventEventHttpTestSwaggerDataTestObjectResponseWithProperties
- HttpTestServiceForSwaggertest.EventHttpTestSwaggerDataTestObject3WithPropertiesProperties
- HttpTestServiceForSwaggertest.EventHttpTestSwaggerDataTestObjectResponseWithPropertiesProperties
- HttpTestServiceForSwaggertest.HTTPException
- HttpTestServiceForSwaggertest.MethodAcceptsDataEventReturnsDataEventDataEvent
- HttpTestServiceForSwaggertest.MethodAcceptsDataEventReturnsObjectDataEvent
- HttpTestServiceForSwaggertest.MethodAcceptsDataEventWithPropertiesReturnsDataEventWithPropertiesDataEvent
- HttpTestServiceForSwaggertest.ModelVoid
- HttpTestServiceForSwaggertest.TestObjectEmbeddedForSwaggerService
- HttpTestServiceForSwaggertest.TestObjectForSwaggerService
- HttpTestServiceForSwaggertest.Trace
Documentation for Authorization
apiKey
- Type: API key
- API key parameter name: x-session-token
- Location: URL query string
basicAuth
- Type: HTTP basic authentication
oauth2Auth
- Type: OAuth
- Flow: implicit
- Authorization URL: http://localhost:8888/security/oauth2/authorize
- Scopes: N/A