From 45c8bb4a7b0faf319df29ef6bf99b40b15ef13b8 Mon Sep 17 00:00:00 2001
From: zhuojie
Date: Tue, 11 Sep 2018 15:42:55 -0700
Subject: [PATCH] Upgrade flagr swagger API
---
README.md | 7 +-
docs/CreateFlagRequest.md | 1 +
docs/EvalContext.md | 3 +-
docs/EvalResult.md | 1 +
docs/EvaluationBatchRequest.md | 3 +-
docs/ExportApi.md | 49 ++++++++++++++
docs/Flag.md | 1 +
docs/FlagApi.md | 2 +
docs/HealthApi.md | 12 ++--
docs/PutFlagRequest.md | 1 +
package.json | 4 +-
src/ApiClient.js | 4 +-
src/api/ConstraintApi.js | 4 +-
src/api/DistributionApi.js | 4 +-
src/api/EvaluationApi.js | 4 +-
src/api/ExportApi.js | 92 +++++++++++++++++++++++++++
src/api/FlagApi.js | 6 +-
src/api/HealthApi.js | 13 ++--
src/api/SegmentApi.js | 4 +-
src/api/VariantApi.js | 4 +-
src/index.js | 15 +++--
src/model/Constraint.js | 4 +-
src/model/CreateConstraintRequest.js | 4 +-
src/model/CreateFlagRequest.js | 13 +++-
src/model/CreateSegmentRequest.js | 4 +-
src/model/CreateVariantRequest.js | 4 +-
src/model/Distribution.js | 4 +-
src/model/Error.js | 4 +-
src/model/EvalContext.js | 19 ++++--
src/model/EvalDebugLog.js | 4 +-
src/model/EvalResult.js | 15 ++++-
src/model/EvaluationBatchRequest.js | 19 ++++--
src/model/EvaluationBatchResponse.js | 4 +-
src/model/EvaluationEntity.js | 4 +-
src/model/Flag.js | 13 +++-
src/model/FlagSnapshot.js | 4 +-
src/model/PutDistributionsRequest.js | 4 +-
src/model/PutFlagRequest.js | 12 +++-
src/model/PutSegmentReorderRequest.js | 4 +-
src/model/PutSegmentRequest.js | 4 +-
src/model/PutVariantRequest.js | 4 +-
src/model/Segment.js | 4 +-
src/model/SegmentDebugLog.js | 4 +-
src/model/SetFlagEnabledRequest.js | 4 +-
src/model/Variant.js | 4 +-
swagger.yaml | 63 ++++++++++++++++--
test/api/ExportApi.spec.js | 65 +++++++++++++++++++
47 files changed, 429 insertions(+), 96 deletions(-)
create mode 100644 docs/ExportApi.md
create mode 100644 src/api/ExportApi.js
create mode 100644 test/api/ExportApi.spec.js
diff --git a/README.md b/README.md
index 1e941ad..77d6c91 100644
--- a/README.md
+++ b/README.md
@@ -4,8 +4,8 @@ Flagr - JavaScript client for flagr
Flagr is a feature flagging, A/B testing and dynamic configuration microservice
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
-- API version: 1.0.8
-- Package version: 1.0.8
+- API version: 1.0.10
+- Package version: 1.0.10
- Build package: io.swagger.codegen.languages.JavascriptClientCodegen
## Installation
@@ -129,6 +129,7 @@ Class | Method | HTTP request | Description
*Flagr.DistributionApi* | [**putDistributions**](docs/DistributionApi.md#putDistributions) | **PUT** /flags/{flagID}/segments/{segmentID}/distributions |
*Flagr.EvaluationApi* | [**postEvaluation**](docs/EvaluationApi.md#postEvaluation) | **POST** /evaluation |
*Flagr.EvaluationApi* | [**postEvaluationBatch**](docs/EvaluationApi.md#postEvaluationBatch) | **POST** /evaluation/batch |
+*Flagr.ExportApi* | [**getExportSQLite**](docs/ExportApi.md#getExportSQLite) | **GET** /export/sqlite |
*Flagr.FlagApi* | [**createFlag**](docs/FlagApi.md#createFlag) | **POST** /flags |
*Flagr.FlagApi* | [**deleteFlag**](docs/FlagApi.md#deleteFlag) | **DELETE** /flags/{flagID} |
*Flagr.FlagApi* | [**findFlags**](docs/FlagApi.md#findFlags) | **GET** /flags |
@@ -136,7 +137,7 @@ Class | Method | HTTP request | Description
*Flagr.FlagApi* | [**getFlagSnapshots**](docs/FlagApi.md#getFlagSnapshots) | **GET** /flags/{flagID}/snapshots |
*Flagr.FlagApi* | [**putFlag**](docs/FlagApi.md#putFlag) | **PUT** /flags/{flagID} |
*Flagr.FlagApi* | [**setFlagEnabled**](docs/FlagApi.md#setFlagEnabled) | **PUT** /flags/{flagID}/enabled |
-*Flagr.HealthApi* | [**healthGet**](docs/HealthApi.md#healthGet) | **GET** /health |
+*Flagr.HealthApi* | [**getHealth**](docs/HealthApi.md#getHealth) | **GET** /health |
*Flagr.SegmentApi* | [**createSegment**](docs/SegmentApi.md#createSegment) | **POST** /flags/{flagID}/segments |
*Flagr.SegmentApi* | [**deleteSegment**](docs/SegmentApi.md#deleteSegment) | **DELETE** /flags/{flagID}/segments/{segmentID} |
*Flagr.SegmentApi* | [**findSegments**](docs/SegmentApi.md#findSegments) | **GET** /flags/{flagID}/segments |
diff --git a/docs/CreateFlagRequest.md b/docs/CreateFlagRequest.md
index 22f1152..8d37ee0 100644
--- a/docs/CreateFlagRequest.md
+++ b/docs/CreateFlagRequest.md
@@ -4,5 +4,6 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**description** | **String** | |
+**key** | **String** | unique key representation of the flag | [optional]
diff --git a/docs/EvalContext.md b/docs/EvalContext.md
index a9dfe17..38a5c41 100644
--- a/docs/EvalContext.md
+++ b/docs/EvalContext.md
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
**entityType** | **String** | |
**entityContext** | **Object** | | [optional]
**enableDebug** | **Boolean** | | [optional]
-**flagID** | **Number** | |
+**flagID** | **Number** | flagID | [optional]
+**flagKey** | **String** | flagKey. flagID or flagKey will resolve to the same flag. Either works. | [optional]
diff --git a/docs/EvalResult.md b/docs/EvalResult.md
index e0233f3..5fbeadd 100644
--- a/docs/EvalResult.md
+++ b/docs/EvalResult.md
@@ -4,6 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**flagID** | **Number** | |
+**flagKey** | **String** | |
**flagSnapshotID** | **Number** | | [optional]
**segmentID** | **Number** | |
**variantID** | **Number** | |
diff --git a/docs/EvaluationBatchRequest.md b/docs/EvaluationBatchRequest.md
index c89c73b..f13f98c 100644
--- a/docs/EvaluationBatchRequest.md
+++ b/docs/EvaluationBatchRequest.md
@@ -5,6 +5,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**entities** | [**[EvaluationEntity]**](EvaluationEntity.md) | |
**enableDebug** | **Boolean** | | [optional]
-**flagIDs** | **[Number]** | |
+**flagIDs** | **[Number]** | flagIDs | [optional]
+**flagKeys** | **[String]** | flagKeys. Either flagIDs or flagKeys works. If pass in both, Flagr may return duplicate results. | [optional]
diff --git a/docs/ExportApi.md b/docs/ExportApi.md
new file mode 100644
index 0000000..1eb219b
--- /dev/null
+++ b/docs/ExportApi.md
@@ -0,0 +1,49 @@
+# Flagr.ExportApi
+
+All URIs are relative to *http://localhost/api/v1*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**getExportSQLite**](ExportApi.md#getExportSQLite) | **GET** /export/sqlite |
+
+
+
+# **getExportSQLite**
+> File getExportSQLite()
+
+
+
+Export sqlite3 format of the db dump, which is converted from the main database.
+
+### Example
+```javascript
+var Flagr = require('flagr');
+
+var apiInstance = new Flagr.ExportApi();
+
+var callback = function(error, data, response) {
+ if (error) {
+ console.error(error);
+ } else {
+ console.log('API called successfully. Returned data: ' + data);
+ }
+};
+apiInstance.getExportSQLite(callback);
+```
+
+### Parameters
+This endpoint does not need any parameter.
+
+### Return type
+
+**File**
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/octet-stream
+
diff --git a/docs/Flag.md b/docs/Flag.md
index 8c2545f..dff6a28 100644
--- a/docs/Flag.md
+++ b/docs/Flag.md
@@ -4,6 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **Number** | | [optional]
+**key** | **String** | unique key representation of the flag | [optional]
**description** | **String** | |
**enabled** | **Boolean** | |
**segments** | [**[Segment]**](Segment.md) | | [optional]
diff --git a/docs/FlagApi.md b/docs/FlagApi.md
index f35424d..2247e34 100644
--- a/docs/FlagApi.md
+++ b/docs/FlagApi.md
@@ -118,6 +118,7 @@ var opts = {
'enabled': true, // Boolean | return flags having given enabled status
'description': "description_example", // String | return flags exactly matching given description
'descriptionLike': "descriptionLike_example", // String | return flags partially matching given description
+ 'key': "key_example", // String | return flags matching given key
'offset': 789 // Number | return flags given the offset, it should usually set together with limit
};
@@ -139,6 +140,7 @@ Name | Type | Description | Notes
**enabled** | **Boolean**| return flags having given enabled status | [optional]
**description** | **String**| return flags exactly matching given description | [optional]
**descriptionLike** | **String**| return flags partially matching given description | [optional]
+ **key** | **String**| return flags matching given key | [optional]
**offset** | **Number**| return flags given the offset, it should usually set together with limit | [optional]
### Return type
diff --git a/docs/HealthApi.md b/docs/HealthApi.md
index ac86f51..948ffd7 100644
--- a/docs/HealthApi.md
+++ b/docs/HealthApi.md
@@ -4,15 +4,17 @@ All URIs are relative to *http://localhost/api/v1*
Method | HTTP request | Description
------------- | ------------- | -------------
-[**healthGet**](HealthApi.md#healthGet) | **GET** /health |
+[**getHealth**](HealthApi.md#getHealth) | **GET** /health |
-
-# **healthGet**
-> healthGet()
+
+# **getHealth**
+> getHealth()
+Check if Flagr is healthy
+
### Example
```javascript
var Flagr = require('flagr');
@@ -26,7 +28,7 @@ var callback = function(error, data, response) {
console.log('API called successfully.');
}
};
-apiInstance.healthGet(callback);
+apiInstance.getHealth(callback);
```
### Parameters
diff --git a/docs/PutFlagRequest.md b/docs/PutFlagRequest.md
index b0373cd..24bcb74 100644
--- a/docs/PutFlagRequest.md
+++ b/docs/PutFlagRequest.md
@@ -5,5 +5,6 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**description** | **String** | |
**dataRecordsEnabled** | **Boolean** | enabled data records will get data logging in the metrics pipeline, for example, kafka. | [optional]
+**key** | **String** | | [optional]
diff --git a/package.json b/package.json
index c88f94f..4f34c6a 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "flagr",
- "version": "1.0.8",
+ "version": "1.0.10",
"description": "Flagr_is_a_feature_flagging_AB_testing_and_dynamic_configuration_microservice",
"license": "Unlicense",
"main": "src/index.js",
@@ -11,7 +11,7 @@
"fs": false
},
"dependencies": {
- "superagent": "3.5.2"
+ "superagent": "~3.7.0"
},
"devDependencies": {
"mocha": "~2.3.4",
diff --git a/src/ApiClient.js b/src/ApiClient.js
index cdd9da6..4cbe38c 100644
--- a/src/ApiClient.js
+++ b/src/ApiClient.js
@@ -2,7 +2,7 @@
* Flagr
* Flagr is a feature flagging, A/B testing and dynamic configuration microservice
*
- * OpenAPI spec version: 1.0.8
+ * OpenAPI spec version: 1.0.10
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -32,7 +32,7 @@
/**
* @module ApiClient
- * @version 1.0.8
+ * @version 1.0.10
*/
/**
diff --git a/src/api/ConstraintApi.js b/src/api/ConstraintApi.js
index 24d2708..b47e976 100644
--- a/src/api/ConstraintApi.js
+++ b/src/api/ConstraintApi.js
@@ -2,7 +2,7 @@
* Flagr
* Flagr is a feature flagging, A/B testing and dynamic configuration microservice
*
- * OpenAPI spec version: 1.0.8
+ * OpenAPI spec version: 1.0.10
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -33,7 +33,7 @@
/**
* Constraint service.
* @module api/ConstraintApi
- * @version 1.0.8
+ * @version 1.0.10
*/
/**
diff --git a/src/api/DistributionApi.js b/src/api/DistributionApi.js
index ecc7bf0..01086de 100644
--- a/src/api/DistributionApi.js
+++ b/src/api/DistributionApi.js
@@ -2,7 +2,7 @@
* Flagr
* Flagr is a feature flagging, A/B testing and dynamic configuration microservice
*
- * OpenAPI spec version: 1.0.8
+ * OpenAPI spec version: 1.0.10
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -33,7 +33,7 @@
/**
* Distribution service.
* @module api/DistributionApi
- * @version 1.0.8
+ * @version 1.0.10
*/
/**
diff --git a/src/api/EvaluationApi.js b/src/api/EvaluationApi.js
index c1d8c7a..4ffd454 100644
--- a/src/api/EvaluationApi.js
+++ b/src/api/EvaluationApi.js
@@ -2,7 +2,7 @@
* Flagr
* Flagr is a feature flagging, A/B testing and dynamic configuration microservice
*
- * OpenAPI spec version: 1.0.8
+ * OpenAPI spec version: 1.0.10
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -33,7 +33,7 @@
/**
* Evaluation service.
* @module api/EvaluationApi
- * @version 1.0.8
+ * @version 1.0.10
*/
/**
diff --git a/src/api/ExportApi.js b/src/api/ExportApi.js
new file mode 100644
index 0000000..44c10c0
--- /dev/null
+++ b/src/api/ExportApi.js
@@ -0,0 +1,92 @@
+/**
+ * Flagr
+ * Flagr is a feature flagging, A/B testing and dynamic configuration microservice
+ *
+ * OpenAPI spec version: 1.0.10
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ *
+ * Swagger Codegen version: 2.4.0-SNAPSHOT
+ *
+ * Do not edit the class manually.
+ *
+ */
+
+(function(root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module.
+ define(['ApiClient', 'model/Error'], factory);
+ } else if (typeof module === 'object' && module.exports) {
+ // CommonJS-like environments that support module.exports, like Node.
+ module.exports = factory(require('../ApiClient'), require('../model/Error'));
+ } else {
+ // Browser globals (root is window)
+ if (!root.Flagr) {
+ root.Flagr = {};
+ }
+ root.Flagr.ExportApi = factory(root.Flagr.ApiClient, root.Flagr.Error);
+ }
+}(this, function(ApiClient, Error) {
+ 'use strict';
+
+ /**
+ * Export service.
+ * @module api/ExportApi
+ * @version 1.0.10
+ */
+
+ /**
+ * Constructs a new ExportApi.
+ * @alias module:api/ExportApi
+ * @class
+ * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
+ * default to {@link module:ApiClient#instance} if unspecified.
+ */
+ var exports = function(apiClient) {
+ this.apiClient = apiClient || ApiClient.instance;
+
+
+ /**
+ * Callback function to receive the result of the getExportSQLite operation.
+ * @callback module:api/ExportApi~getExportSQLiteCallback
+ * @param {String} error Error message, if any.
+ * @param {File} data The data returned by the service call.
+ * @param {String} response The complete HTTP response.
+ */
+
+ /**
+ * Export sqlite3 format of the db dump, which is converted from the main database.
+ * @param {module:api/ExportApi~getExportSQLiteCallback} callback The callback function, accepting three arguments: error, data, response
+ * data is of type: {@link File}
+ */
+ this.getExportSQLite = function(callback) {
+ var postBody = null;
+
+
+ var pathParams = {
+ };
+ var queryParams = {
+ };
+ var collectionQueryParams = {
+ };
+ var headerParams = {
+ };
+ var formParams = {
+ };
+
+ var authNames = [];
+ var contentTypes = ['application/json'];
+ var accepts = ['application/octet-stream'];
+ var returnType = File;
+
+ return this.apiClient.callApi(
+ '/export/sqlite', 'GET',
+ pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType, callback
+ );
+ }
+ };
+
+ return exports;
+}));
diff --git a/src/api/FlagApi.js b/src/api/FlagApi.js
index 7d9f611..c4dd0dd 100644
--- a/src/api/FlagApi.js
+++ b/src/api/FlagApi.js
@@ -2,7 +2,7 @@
* Flagr
* Flagr is a feature flagging, A/B testing and dynamic configuration microservice
*
- * OpenAPI spec version: 1.0.8
+ * OpenAPI spec version: 1.0.10
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -33,7 +33,7 @@
/**
* Flag service.
* @module api/FlagApi
- * @version 1.0.8
+ * @version 1.0.10
*/
/**
@@ -151,6 +151,7 @@
* @param {Boolean} opts.enabled return flags having given enabled status
* @param {String} opts.description return flags exactly matching given description
* @param {String} opts.descriptionLike return flags partially matching given description
+ * @param {String} opts.key return flags matching given key
* @param {Number} opts.offset return flags given the offset, it should usually set together with limit
* @param {module:api/FlagApi~findFlagsCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link Array.}
@@ -167,6 +168,7 @@
'enabled': opts['enabled'],
'description': opts['description'],
'description_like': opts['descriptionLike'],
+ 'key': opts['key'],
'offset': opts['offset'],
};
var collectionQueryParams = {
diff --git a/src/api/HealthApi.js b/src/api/HealthApi.js
index 9d90dc7..fe4908b 100644
--- a/src/api/HealthApi.js
+++ b/src/api/HealthApi.js
@@ -2,7 +2,7 @@
* Flagr
* Flagr is a feature flagging, A/B testing and dynamic configuration microservice
*
- * OpenAPI spec version: 1.0.8
+ * OpenAPI spec version: 1.0.10
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -33,7 +33,7 @@
/**
* Health service.
* @module api/HealthApi
- * @version 1.0.8
+ * @version 1.0.10
*/
/**
@@ -48,17 +48,18 @@
/**
- * Callback function to receive the result of the healthGet operation.
- * @callback module:api/HealthApi~healthGetCallback
+ * Callback function to receive the result of the getHealth operation.
+ * @callback module:api/HealthApi~getHealthCallback
* @param {String} error Error message, if any.
* @param data This operation does not return a value.
* @param {String} response The complete HTTP response.
*/
/**
- * @param {module:api/HealthApi~healthGetCallback} callback The callback function, accepting three arguments: error, data, response
+ * Check if Flagr is healthy
+ * @param {module:api/HealthApi~getHealthCallback} callback The callback function, accepting three arguments: error, data, response
*/
- this.healthGet = function(callback) {
+ this.getHealth = function(callback) {
var postBody = null;
diff --git a/src/api/SegmentApi.js b/src/api/SegmentApi.js
index f9d1cfc..073d368 100644
--- a/src/api/SegmentApi.js
+++ b/src/api/SegmentApi.js
@@ -2,7 +2,7 @@
* Flagr
* Flagr is a feature flagging, A/B testing and dynamic configuration microservice
*
- * OpenAPI spec version: 1.0.8
+ * OpenAPI spec version: 1.0.10
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -33,7 +33,7 @@
/**
* Segment service.
* @module api/SegmentApi
- * @version 1.0.8
+ * @version 1.0.10
*/
/**
diff --git a/src/api/VariantApi.js b/src/api/VariantApi.js
index daf632b..8b7cf51 100644
--- a/src/api/VariantApi.js
+++ b/src/api/VariantApi.js
@@ -2,7 +2,7 @@
* Flagr
* Flagr is a feature flagging, A/B testing and dynamic configuration microservice
*
- * OpenAPI spec version: 1.0.8
+ * OpenAPI spec version: 1.0.10
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -33,7 +33,7 @@
/**
* Variant service.
* @module api/VariantApi
- * @version 1.0.8
+ * @version 1.0.10
*/
/**
diff --git a/src/index.js b/src/index.js
index 00c37f6..735fe2e 100644
--- a/src/index.js
+++ b/src/index.js
@@ -2,7 +2,7 @@
* Flagr
* Flagr is a feature flagging, A/B testing and dynamic configuration microservice
*
- * OpenAPI spec version: 1.0.8
+ * OpenAPI spec version: 1.0.10
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -16,12 +16,12 @@
(function(factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
- define(['ApiClient', 'model/Constraint', 'model/CreateConstraintRequest', 'model/CreateFlagRequest', 'model/CreateSegmentRequest', 'model/CreateVariantRequest', 'model/Distribution', 'model/Error', 'model/EvalContext', 'model/EvalDebugLog', 'model/EvalResult', 'model/EvaluationBatchRequest', 'model/EvaluationBatchResponse', 'model/EvaluationEntity', 'model/Flag', 'model/FlagSnapshot', 'model/PutDistributionsRequest', 'model/PutFlagRequest', 'model/PutSegmentReorderRequest', 'model/PutSegmentRequest', 'model/PutVariantRequest', 'model/Segment', 'model/SegmentDebugLog', 'model/SetFlagEnabledRequest', 'model/Variant', 'api/ConstraintApi', 'api/DistributionApi', 'api/EvaluationApi', 'api/FlagApi', 'api/HealthApi', 'api/SegmentApi', 'api/VariantApi'], factory);
+ define(['ApiClient', 'model/Constraint', 'model/CreateConstraintRequest', 'model/CreateFlagRequest', 'model/CreateSegmentRequest', 'model/CreateVariantRequest', 'model/Distribution', 'model/Error', 'model/EvalContext', 'model/EvalDebugLog', 'model/EvalResult', 'model/EvaluationBatchRequest', 'model/EvaluationBatchResponse', 'model/EvaluationEntity', 'model/Flag', 'model/FlagSnapshot', 'model/PutDistributionsRequest', 'model/PutFlagRequest', 'model/PutSegmentReorderRequest', 'model/PutSegmentRequest', 'model/PutVariantRequest', 'model/Segment', 'model/SegmentDebugLog', 'model/SetFlagEnabledRequest', 'model/Variant', 'api/ConstraintApi', 'api/DistributionApi', 'api/EvaluationApi', 'api/ExportApi', 'api/FlagApi', 'api/HealthApi', 'api/SegmentApi', 'api/VariantApi'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
- module.exports = factory(require('./ApiClient'), require('./model/Constraint'), require('./model/CreateConstraintRequest'), require('./model/CreateFlagRequest'), require('./model/CreateSegmentRequest'), require('./model/CreateVariantRequest'), require('./model/Distribution'), require('./model/Error'), require('./model/EvalContext'), require('./model/EvalDebugLog'), require('./model/EvalResult'), require('./model/EvaluationBatchRequest'), require('./model/EvaluationBatchResponse'), require('./model/EvaluationEntity'), require('./model/Flag'), require('./model/FlagSnapshot'), require('./model/PutDistributionsRequest'), require('./model/PutFlagRequest'), require('./model/PutSegmentReorderRequest'), require('./model/PutSegmentRequest'), require('./model/PutVariantRequest'), require('./model/Segment'), require('./model/SegmentDebugLog'), require('./model/SetFlagEnabledRequest'), require('./model/Variant'), require('./api/ConstraintApi'), require('./api/DistributionApi'), require('./api/EvaluationApi'), require('./api/FlagApi'), require('./api/HealthApi'), require('./api/SegmentApi'), require('./api/VariantApi'));
+ module.exports = factory(require('./ApiClient'), require('./model/Constraint'), require('./model/CreateConstraintRequest'), require('./model/CreateFlagRequest'), require('./model/CreateSegmentRequest'), require('./model/CreateVariantRequest'), require('./model/Distribution'), require('./model/Error'), require('./model/EvalContext'), require('./model/EvalDebugLog'), require('./model/EvalResult'), require('./model/EvaluationBatchRequest'), require('./model/EvaluationBatchResponse'), require('./model/EvaluationEntity'), require('./model/Flag'), require('./model/FlagSnapshot'), require('./model/PutDistributionsRequest'), require('./model/PutFlagRequest'), require('./model/PutSegmentReorderRequest'), require('./model/PutSegmentRequest'), require('./model/PutVariantRequest'), require('./model/Segment'), require('./model/SegmentDebugLog'), require('./model/SetFlagEnabledRequest'), require('./model/Variant'), require('./api/ConstraintApi'), require('./api/DistributionApi'), require('./api/EvaluationApi'), require('./api/ExportApi'), require('./api/FlagApi'), require('./api/HealthApi'), require('./api/SegmentApi'), require('./api/VariantApi'));
}
-}(function(ApiClient, Constraint, CreateConstraintRequest, CreateFlagRequest, CreateSegmentRequest, CreateVariantRequest, Distribution, Error, EvalContext, EvalDebugLog, EvalResult, EvaluationBatchRequest, EvaluationBatchResponse, EvaluationEntity, Flag, FlagSnapshot, PutDistributionsRequest, PutFlagRequest, PutSegmentReorderRequest, PutSegmentRequest, PutVariantRequest, Segment, SegmentDebugLog, SetFlagEnabledRequest, Variant, ConstraintApi, DistributionApi, EvaluationApi, FlagApi, HealthApi, SegmentApi, VariantApi) {
+}(function(ApiClient, Constraint, CreateConstraintRequest, CreateFlagRequest, CreateSegmentRequest, CreateVariantRequest, Distribution, Error, EvalContext, EvalDebugLog, EvalResult, EvaluationBatchRequest, EvaluationBatchResponse, EvaluationEntity, Flag, FlagSnapshot, PutDistributionsRequest, PutFlagRequest, PutSegmentReorderRequest, PutSegmentRequest, PutVariantRequest, Segment, SegmentDebugLog, SetFlagEnabledRequest, Variant, ConstraintApi, DistributionApi, EvaluationApi, ExportApi, FlagApi, HealthApi, SegmentApi, VariantApi) {
'use strict';
/**
@@ -53,7 +53,7 @@
*
*
* @module index
- * @version 1.0.8
+ * @version 1.0.10
*/
var exports = {
/**
@@ -196,6 +196,11 @@
* @property {module:api/EvaluationApi}
*/
EvaluationApi: EvaluationApi,
+ /**
+ * The ExportApi service constructor.
+ * @property {module:api/ExportApi}
+ */
+ ExportApi: ExportApi,
/**
* The FlagApi service constructor.
* @property {module:api/FlagApi}
diff --git a/src/model/Constraint.js b/src/model/Constraint.js
index 2a63f7d..585089d 100644
--- a/src/model/Constraint.js
+++ b/src/model/Constraint.js
@@ -2,7 +2,7 @@
* Flagr
* Flagr is a feature flagging, A/B testing and dynamic configuration microservice
*
- * OpenAPI spec version: 1.0.8
+ * OpenAPI spec version: 1.0.10
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -36,7 +36,7 @@
/**
* The Constraint model module.
* @module model/Constraint
- * @version 1.0.8
+ * @version 1.0.10
*/
/**
diff --git a/src/model/CreateConstraintRequest.js b/src/model/CreateConstraintRequest.js
index 15d5b5d..4f53f7c 100644
--- a/src/model/CreateConstraintRequest.js
+++ b/src/model/CreateConstraintRequest.js
@@ -2,7 +2,7 @@
* Flagr
* Flagr is a feature flagging, A/B testing and dynamic configuration microservice
*
- * OpenAPI spec version: 1.0.8
+ * OpenAPI spec version: 1.0.10
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -36,7 +36,7 @@
/**
* The CreateConstraintRequest model module.
* @module model/CreateConstraintRequest
- * @version 1.0.8
+ * @version 1.0.10
*/
/**
diff --git a/src/model/CreateFlagRequest.js b/src/model/CreateFlagRequest.js
index 171f205..8cc5db3 100644
--- a/src/model/CreateFlagRequest.js
+++ b/src/model/CreateFlagRequest.js
@@ -2,7 +2,7 @@
* Flagr
* Flagr is a feature flagging, A/B testing and dynamic configuration microservice
*
- * OpenAPI spec version: 1.0.8
+ * OpenAPI spec version: 1.0.10
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -36,7 +36,7 @@
/**
* The CreateFlagRequest model module.
* @module model/CreateFlagRequest
- * @version 1.0.8
+ * @version 1.0.10
*/
/**
@@ -49,6 +49,7 @@
var _this = this;
_this['description'] = description;
+
};
/**
@@ -65,6 +66,9 @@
if (data.hasOwnProperty('description')) {
obj['description'] = ApiClient.convertToType(data['description'], 'String');
}
+ if (data.hasOwnProperty('key')) {
+ obj['key'] = ApiClient.convertToType(data['key'], 'String');
+ }
}
return obj;
}
@@ -73,6 +77,11 @@
* @member {String} description
*/
exports.prototype['description'] = undefined;
+ /**
+ * unique key representation of the flag
+ * @member {String} key
+ */
+ exports.prototype['key'] = undefined;
diff --git a/src/model/CreateSegmentRequest.js b/src/model/CreateSegmentRequest.js
index 1efe221..c032437 100644
--- a/src/model/CreateSegmentRequest.js
+++ b/src/model/CreateSegmentRequest.js
@@ -2,7 +2,7 @@
* Flagr
* Flagr is a feature flagging, A/B testing and dynamic configuration microservice
*
- * OpenAPI spec version: 1.0.8
+ * OpenAPI spec version: 1.0.10
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -36,7 +36,7 @@
/**
* The CreateSegmentRequest model module.
* @module model/CreateSegmentRequest
- * @version 1.0.8
+ * @version 1.0.10
*/
/**
diff --git a/src/model/CreateVariantRequest.js b/src/model/CreateVariantRequest.js
index 5abdb47..a5a1a15 100644
--- a/src/model/CreateVariantRequest.js
+++ b/src/model/CreateVariantRequest.js
@@ -2,7 +2,7 @@
* Flagr
* Flagr is a feature flagging, A/B testing and dynamic configuration microservice
*
- * OpenAPI spec version: 1.0.8
+ * OpenAPI spec version: 1.0.10
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -36,7 +36,7 @@
/**
* The CreateVariantRequest model module.
* @module model/CreateVariantRequest
- * @version 1.0.8
+ * @version 1.0.10
*/
/**
diff --git a/src/model/Distribution.js b/src/model/Distribution.js
index 22c260c..0321d17 100644
--- a/src/model/Distribution.js
+++ b/src/model/Distribution.js
@@ -2,7 +2,7 @@
* Flagr
* Flagr is a feature flagging, A/B testing and dynamic configuration microservice
*
- * OpenAPI spec version: 1.0.8
+ * OpenAPI spec version: 1.0.10
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -36,7 +36,7 @@
/**
* The Distribution model module.
* @module model/Distribution
- * @version 1.0.8
+ * @version 1.0.10
*/
/**
diff --git a/src/model/Error.js b/src/model/Error.js
index 3436405..e1ac37c 100644
--- a/src/model/Error.js
+++ b/src/model/Error.js
@@ -2,7 +2,7 @@
* Flagr
* Flagr is a feature flagging, A/B testing and dynamic configuration microservice
*
- * OpenAPI spec version: 1.0.8
+ * OpenAPI spec version: 1.0.10
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -36,7 +36,7 @@
/**
* The Error model module.
* @module model/Error
- * @version 1.0.8
+ * @version 1.0.10
*/
/**
diff --git a/src/model/EvalContext.js b/src/model/EvalContext.js
index ef8a03e..c85f35f 100644
--- a/src/model/EvalContext.js
+++ b/src/model/EvalContext.js
@@ -2,7 +2,7 @@
* Flagr
* Flagr is a feature flagging, A/B testing and dynamic configuration microservice
*
- * OpenAPI spec version: 1.0.8
+ * OpenAPI spec version: 1.0.10
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -36,7 +36,7 @@
/**
* The EvalContext model module.
* @module model/EvalContext
- * @version 1.0.8
+ * @version 1.0.10
*/
/**
@@ -44,16 +44,16 @@
* @alias module:model/EvalContext
* @class
* @param entityType {String}
- * @param flagID {Number}
*/
- var exports = function(entityType, flagID) {
+ var exports = function(entityType) {
var _this = this;
_this['entityType'] = entityType;
- _this['flagID'] = flagID;
+
+
};
/**
@@ -82,6 +82,9 @@
if (data.hasOwnProperty('flagID')) {
obj['flagID'] = ApiClient.convertToType(data['flagID'], 'Number');
}
+ if (data.hasOwnProperty('flagKey')) {
+ obj['flagKey'] = ApiClient.convertToType(data['flagKey'], 'String');
+ }
}
return obj;
}
@@ -104,9 +107,15 @@
*/
exports.prototype['enableDebug'] = undefined;
/**
+ * flagID
* @member {Number} flagID
*/
exports.prototype['flagID'] = undefined;
+ /**
+ * flagKey. flagID or flagKey will resolve to the same flag. Either works.
+ * @member {String} flagKey
+ */
+ exports.prototype['flagKey'] = undefined;
diff --git a/src/model/EvalDebugLog.js b/src/model/EvalDebugLog.js
index 876db4c..24cc156 100644
--- a/src/model/EvalDebugLog.js
+++ b/src/model/EvalDebugLog.js
@@ -2,7 +2,7 @@
* Flagr
* Flagr is a feature flagging, A/B testing and dynamic configuration microservice
*
- * OpenAPI spec version: 1.0.8
+ * OpenAPI spec version: 1.0.10
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -36,7 +36,7 @@
/**
* The EvalDebugLog model module.
* @module model/EvalDebugLog
- * @version 1.0.8
+ * @version 1.0.10
*/
/**
diff --git a/src/model/EvalResult.js b/src/model/EvalResult.js
index 881f1f3..f20fcbf 100644
--- a/src/model/EvalResult.js
+++ b/src/model/EvalResult.js
@@ -2,7 +2,7 @@
* Flagr
* Flagr is a feature flagging, A/B testing and dynamic configuration microservice
*
- * OpenAPI spec version: 1.0.8
+ * OpenAPI spec version: 1.0.10
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -36,7 +36,7 @@
/**
* The EvalResult model module.
* @module model/EvalResult
- * @version 1.0.8
+ * @version 1.0.10
*/
/**
@@ -44,6 +44,7 @@
* @alias module:model/EvalResult
* @class
* @param flagID {Number}
+ * @param flagKey {String}
* @param segmentID {Number}
* @param variantID {Number}
* @param variantKey {String}
@@ -51,10 +52,11 @@
* @param evalContext {module:model/EvalContext}
* @param timestamp {String}
*/
- var exports = function(flagID, segmentID, variantID, variantKey, variantAttachment, evalContext, timestamp) {
+ var exports = function(flagID, flagKey, segmentID, variantID, variantKey, variantAttachment, evalContext, timestamp) {
var _this = this;
_this['flagID'] = flagID;
+ _this['flagKey'] = flagKey;
_this['segmentID'] = segmentID;
_this['variantID'] = variantID;
@@ -79,6 +81,9 @@
if (data.hasOwnProperty('flagID')) {
obj['flagID'] = ApiClient.convertToType(data['flagID'], 'Number');
}
+ if (data.hasOwnProperty('flagKey')) {
+ obj['flagKey'] = ApiClient.convertToType(data['flagKey'], 'String');
+ }
if (data.hasOwnProperty('flagSnapshotID')) {
obj['flagSnapshotID'] = ApiClient.convertToType(data['flagSnapshotID'], 'Number');
}
@@ -111,6 +116,10 @@
* @member {Number} flagID
*/
exports.prototype['flagID'] = undefined;
+ /**
+ * @member {String} flagKey
+ */
+ exports.prototype['flagKey'] = undefined;
/**
* @member {Number} flagSnapshotID
*/
diff --git a/src/model/EvaluationBatchRequest.js b/src/model/EvaluationBatchRequest.js
index a184e4c..97309e8 100644
--- a/src/model/EvaluationBatchRequest.js
+++ b/src/model/EvaluationBatchRequest.js
@@ -2,7 +2,7 @@
* Flagr
* Flagr is a feature flagging, A/B testing and dynamic configuration microservice
*
- * OpenAPI spec version: 1.0.8
+ * OpenAPI spec version: 1.0.10
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -36,7 +36,7 @@
/**
* The EvaluationBatchRequest model module.
* @module model/EvaluationBatchRequest
- * @version 1.0.8
+ * @version 1.0.10
*/
/**
@@ -44,14 +44,14 @@
* @alias module:model/EvaluationBatchRequest
* @class
* @param entities {Array.}
- * @param flagIDs {Array.}
*/
- var exports = function(entities, flagIDs) {
+ var exports = function(entities) {
var _this = this;
_this['entities'] = entities;
- _this['flagIDs'] = flagIDs;
+
+
};
/**
@@ -74,6 +74,9 @@
if (data.hasOwnProperty('flagIDs')) {
obj['flagIDs'] = ApiClient.convertToType(data['flagIDs'], ['Number']);
}
+ if (data.hasOwnProperty('flagKeys')) {
+ obj['flagKeys'] = ApiClient.convertToType(data['flagKeys'], ['String']);
+ }
}
return obj;
}
@@ -87,9 +90,15 @@
*/
exports.prototype['enableDebug'] = undefined;
/**
+ * flagIDs
* @member {Array.} flagIDs
*/
exports.prototype['flagIDs'] = undefined;
+ /**
+ * flagKeys. Either flagIDs or flagKeys works. If pass in both, Flagr may return duplicate results.
+ * @member {Array.} flagKeys
+ */
+ exports.prototype['flagKeys'] = undefined;
diff --git a/src/model/EvaluationBatchResponse.js b/src/model/EvaluationBatchResponse.js
index 99c4871..f122ab1 100644
--- a/src/model/EvaluationBatchResponse.js
+++ b/src/model/EvaluationBatchResponse.js
@@ -2,7 +2,7 @@
* Flagr
* Flagr is a feature flagging, A/B testing and dynamic configuration microservice
*
- * OpenAPI spec version: 1.0.8
+ * OpenAPI spec version: 1.0.10
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -36,7 +36,7 @@
/**
* The EvaluationBatchResponse model module.
* @module model/EvaluationBatchResponse
- * @version 1.0.8
+ * @version 1.0.10
*/
/**
diff --git a/src/model/EvaluationEntity.js b/src/model/EvaluationEntity.js
index d86daf2..93140ba 100644
--- a/src/model/EvaluationEntity.js
+++ b/src/model/EvaluationEntity.js
@@ -2,7 +2,7 @@
* Flagr
* Flagr is a feature flagging, A/B testing and dynamic configuration microservice
*
- * OpenAPI spec version: 1.0.8
+ * OpenAPI spec version: 1.0.10
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -36,7 +36,7 @@
/**
* The EvaluationEntity model module.
* @module model/EvaluationEntity
- * @version 1.0.8
+ * @version 1.0.10
*/
/**
diff --git a/src/model/Flag.js b/src/model/Flag.js
index e3fbd5e..37ee3f2 100644
--- a/src/model/Flag.js
+++ b/src/model/Flag.js
@@ -2,7 +2,7 @@
* Flagr
* Flagr is a feature flagging, A/B testing and dynamic configuration microservice
*
- * OpenAPI spec version: 1.0.8
+ * OpenAPI spec version: 1.0.10
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -36,7 +36,7 @@
/**
* The Flag model module.
* @module model/Flag
- * @version 1.0.8
+ * @version 1.0.10
*/
/**
@@ -51,6 +51,7 @@
var _this = this;
+
_this['description'] = description;
_this['enabled'] = enabled;
@@ -72,6 +73,9 @@
if (data.hasOwnProperty('id')) {
obj['id'] = ApiClient.convertToType(data['id'], 'Number');
}
+ if (data.hasOwnProperty('key')) {
+ obj['key'] = ApiClient.convertToType(data['key'], 'String');
+ }
if (data.hasOwnProperty('description')) {
obj['description'] = ApiClient.convertToType(data['description'], 'String');
}
@@ -95,6 +99,11 @@
* @member {Number} id
*/
exports.prototype['id'] = undefined;
+ /**
+ * unique key representation of the flag
+ * @member {String} key
+ */
+ exports.prototype['key'] = undefined;
/**
* @member {String} description
*/
diff --git a/src/model/FlagSnapshot.js b/src/model/FlagSnapshot.js
index 41a5165..0785aa8 100644
--- a/src/model/FlagSnapshot.js
+++ b/src/model/FlagSnapshot.js
@@ -2,7 +2,7 @@
* Flagr
* Flagr is a feature flagging, A/B testing and dynamic configuration microservice
*
- * OpenAPI spec version: 1.0.8
+ * OpenAPI spec version: 1.0.10
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -36,7 +36,7 @@
/**
* The FlagSnapshot model module.
* @module model/FlagSnapshot
- * @version 1.0.8
+ * @version 1.0.10
*/
/**
diff --git a/src/model/PutDistributionsRequest.js b/src/model/PutDistributionsRequest.js
index d99d650..868cf0a 100644
--- a/src/model/PutDistributionsRequest.js
+++ b/src/model/PutDistributionsRequest.js
@@ -2,7 +2,7 @@
* Flagr
* Flagr is a feature flagging, A/B testing and dynamic configuration microservice
*
- * OpenAPI spec version: 1.0.8
+ * OpenAPI spec version: 1.0.10
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -36,7 +36,7 @@
/**
* The PutDistributionsRequest model module.
* @module model/PutDistributionsRequest
- * @version 1.0.8
+ * @version 1.0.10
*/
/**
diff --git a/src/model/PutFlagRequest.js b/src/model/PutFlagRequest.js
index 30cd2af..17bc8da 100644
--- a/src/model/PutFlagRequest.js
+++ b/src/model/PutFlagRequest.js
@@ -2,7 +2,7 @@
* Flagr
* Flagr is a feature flagging, A/B testing and dynamic configuration microservice
*
- * OpenAPI spec version: 1.0.8
+ * OpenAPI spec version: 1.0.10
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -36,7 +36,7 @@
/**
* The PutFlagRequest model module.
* @module model/PutFlagRequest
- * @version 1.0.8
+ * @version 1.0.10
*/
/**
@@ -50,6 +50,7 @@
_this['description'] = description;
+
};
/**
@@ -69,6 +70,9 @@
if (data.hasOwnProperty('dataRecordsEnabled')) {
obj['dataRecordsEnabled'] = ApiClient.convertToType(data['dataRecordsEnabled'], 'Boolean');
}
+ if (data.hasOwnProperty('key')) {
+ obj['key'] = ApiClient.convertToType(data['key'], 'String');
+ }
}
return obj;
}
@@ -82,6 +86,10 @@
* @member {Boolean} dataRecordsEnabled
*/
exports.prototype['dataRecordsEnabled'] = undefined;
+ /**
+ * @member {String} key
+ */
+ exports.prototype['key'] = undefined;
diff --git a/src/model/PutSegmentReorderRequest.js b/src/model/PutSegmentReorderRequest.js
index 95896dc..3ac88e0 100644
--- a/src/model/PutSegmentReorderRequest.js
+++ b/src/model/PutSegmentReorderRequest.js
@@ -2,7 +2,7 @@
* Flagr
* Flagr is a feature flagging, A/B testing and dynamic configuration microservice
*
- * OpenAPI spec version: 1.0.8
+ * OpenAPI spec version: 1.0.10
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -36,7 +36,7 @@
/**
* The PutSegmentReorderRequest model module.
* @module model/PutSegmentReorderRequest
- * @version 1.0.8
+ * @version 1.0.10
*/
/**
diff --git a/src/model/PutSegmentRequest.js b/src/model/PutSegmentRequest.js
index bc9c203..791840c 100644
--- a/src/model/PutSegmentRequest.js
+++ b/src/model/PutSegmentRequest.js
@@ -2,7 +2,7 @@
* Flagr
* Flagr is a feature flagging, A/B testing and dynamic configuration microservice
*
- * OpenAPI spec version: 1.0.8
+ * OpenAPI spec version: 1.0.10
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -36,7 +36,7 @@
/**
* The PutSegmentRequest model module.
* @module model/PutSegmentRequest
- * @version 1.0.8
+ * @version 1.0.10
*/
/**
diff --git a/src/model/PutVariantRequest.js b/src/model/PutVariantRequest.js
index fadcf84..3f8e22b 100644
--- a/src/model/PutVariantRequest.js
+++ b/src/model/PutVariantRequest.js
@@ -2,7 +2,7 @@
* Flagr
* Flagr is a feature flagging, A/B testing and dynamic configuration microservice
*
- * OpenAPI spec version: 1.0.8
+ * OpenAPI spec version: 1.0.10
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -36,7 +36,7 @@
/**
* The PutVariantRequest model module.
* @module model/PutVariantRequest
- * @version 1.0.8
+ * @version 1.0.10
*/
/**
diff --git a/src/model/Segment.js b/src/model/Segment.js
index e7057a9..821d975 100644
--- a/src/model/Segment.js
+++ b/src/model/Segment.js
@@ -2,7 +2,7 @@
* Flagr
* Flagr is a feature flagging, A/B testing and dynamic configuration microservice
*
- * OpenAPI spec version: 1.0.8
+ * OpenAPI spec version: 1.0.10
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -36,7 +36,7 @@
/**
* The Segment model module.
* @module model/Segment
- * @version 1.0.8
+ * @version 1.0.10
*/
/**
diff --git a/src/model/SegmentDebugLog.js b/src/model/SegmentDebugLog.js
index b9ee532..c089dc3 100644
--- a/src/model/SegmentDebugLog.js
+++ b/src/model/SegmentDebugLog.js
@@ -2,7 +2,7 @@
* Flagr
* Flagr is a feature flagging, A/B testing and dynamic configuration microservice
*
- * OpenAPI spec version: 1.0.8
+ * OpenAPI spec version: 1.0.10
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -36,7 +36,7 @@
/**
* The SegmentDebugLog model module.
* @module model/SegmentDebugLog
- * @version 1.0.8
+ * @version 1.0.10
*/
/**
diff --git a/src/model/SetFlagEnabledRequest.js b/src/model/SetFlagEnabledRequest.js
index 457b0c5..73e75ce 100644
--- a/src/model/SetFlagEnabledRequest.js
+++ b/src/model/SetFlagEnabledRequest.js
@@ -2,7 +2,7 @@
* Flagr
* Flagr is a feature flagging, A/B testing and dynamic configuration microservice
*
- * OpenAPI spec version: 1.0.8
+ * OpenAPI spec version: 1.0.10
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -36,7 +36,7 @@
/**
* The SetFlagEnabledRequest model module.
* @module model/SetFlagEnabledRequest
- * @version 1.0.8
+ * @version 1.0.10
*/
/**
diff --git a/src/model/Variant.js b/src/model/Variant.js
index 3831545..a8832db 100644
--- a/src/model/Variant.js
+++ b/src/model/Variant.js
@@ -2,7 +2,7 @@
* Flagr
* Flagr is a feature flagging, A/B testing and dynamic configuration microservice
*
- * OpenAPI spec version: 1.0.8
+ * OpenAPI spec version: 1.0.10
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -36,7 +36,7 @@
/**
* The Variant model module.
* @module model/Variant
- * @version 1.0.8
+ * @version 1.0.10
*/
/**
diff --git a/swagger.yaml b/swagger.yaml
index b6b6713..10b21a8 100644
--- a/swagger.yaml
+++ b/swagger.yaml
@@ -4,7 +4,7 @@ info:
Flagr is a feature flagging, A/B testing and dynamic configuration
microservice
title: Flagr
- version: 1.0.8
+ version: 1.0.10
tags:
- name: flag
description: Everything about the flag
@@ -34,6 +34,9 @@ x-tagGroups:
- name: Health Check
tags:
- health
+ - name: Export
+ tags:
+ - export
consumes:
- application/json
produces:
@@ -65,6 +68,10 @@ paths:
name: description_like
type: string
description: return flags partially matching given description
+ - in: query
+ name: key
+ type: string
+ description: return flags matching given key
- in: query
name: offset
type: integer
@@ -727,9 +734,30 @@ paths:
get:
tags:
- health
+ operationId: getHealth
+ description: Check if Flagr is healthy
responses:
'200':
- description: Flagr is healthy
+ description: OK
+ default:
+ description: generic error response
+ schema:
+ $ref: '#/definitions/error'
+ /export/sqlite:
+ get:
+ tags:
+ - export
+ operationId: getExportSQLite
+ description: >-
+ Export sqlite3 format of the db dump, which is converted from the main
+ database.
+ produces:
+ - application/octet-stream
+ responses:
+ '200':
+ description: OK
+ schema:
+ type: file
default:
description: generic error response
schema:
@@ -747,6 +775,10 @@ definitions:
format: int64
minimum: 1
readOnly: true
+ key:
+ description: unique key representation of the flag
+ type: string
+ minLength: 1
description:
type: string
minLength: 1
@@ -773,6 +805,9 @@ definitions:
description:
type: string
minLength: 1
+ key:
+ description: unique key representation of the flag
+ type: string
putFlagRequest:
type: object
required:
@@ -787,6 +822,9 @@ definitions:
enabled data records will get data logging in the metrics pipeline,
for example, kafka.
x-nullable: true
+ key:
+ type: string
+ x-nullable: true
setFlagEnabledRequest:
type: object
required:
@@ -1010,7 +1048,6 @@ definitions:
type: object
required:
- entityType
- - flagID
properties:
entityID:
type: string
@@ -1025,13 +1062,20 @@ definitions:
enableDebug:
type: boolean
flagID:
+ description: flagID
type: integer
format: int64
minimum: 1
+ flagKey:
+ description: >-
+ flagKey. flagID or flagKey will resolve to the same flag. Either
+ works.
+ type: string
evalResult:
type: object
required:
- flagID
+ - flagKey
- segmentID
- variantID
- variantKey
@@ -1043,6 +1087,8 @@ definitions:
type: integer
format: int64
minimum: 1
+ flagKey:
+ type: string
flagSnapshotID:
type: integer
format: int64
@@ -1100,7 +1146,6 @@ definitions:
type: object
required:
- entities
- - flagIDs
properties:
entities:
type: array
@@ -1110,12 +1155,22 @@ definitions:
enableDebug:
type: boolean
flagIDs:
+ description: flagIDs
type: array
items:
type: integer
format: int64
minimum: 1
minItems: 1
+ flagKeys:
+ description: >-
+ flagKeys. Either flagIDs or flagKeys works. If pass in both, Flagr may
+ return duplicate results.
+ type: array
+ items:
+ type: string
+ minLength: 1
+ minItems: 1
evaluationBatchResponse:
type: object
required:
diff --git a/test/api/ExportApi.spec.js b/test/api/ExportApi.spec.js
new file mode 100644
index 0000000..f1e7bd7
--- /dev/null
+++ b/test/api/ExportApi.spec.js
@@ -0,0 +1,65 @@
+/**
+ * Flagr
+ * Flagr is a feature flagging, A/B testing and dynamic configuration microservice
+ *
+ * OpenAPI spec version: 1.0.10
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ *
+ * Swagger Codegen version: 2.4.0-SNAPSHOT
+ *
+ * Do not edit the class manually.
+ *
+ */
+
+(function(root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD.
+ define(['expect.js', '../../src/index'], factory);
+ } else if (typeof module === 'object' && module.exports) {
+ // CommonJS-like environments that support module.exports, like Node.
+ factory(require('expect.js'), require('../../src/index'));
+ } else {
+ // Browser globals (root is window)
+ factory(root.expect, root.Flagr);
+ }
+}(this, function(expect, Flagr) {
+ 'use strict';
+
+ var instance;
+
+ beforeEach(function() {
+ instance = new Flagr.ExportApi();
+ });
+
+ var getProperty = function(object, getter, property) {
+ // Use getter method if present; otherwise, get the property directly.
+ if (typeof object[getter] === 'function')
+ return object[getter]();
+ else
+ return object[property];
+ }
+
+ var setProperty = function(object, setter, property, value) {
+ // Use setter method if present; otherwise, set the property directly.
+ if (typeof object[setter] === 'function')
+ object[setter](value);
+ else
+ object[property] = value;
+ }
+
+ describe('ExportApi', function() {
+ describe('getExportSQLite', function() {
+ it('should call getExportSQLite successfully', function(done) {
+ //uncomment below and update the code to test getExportSQLite
+ //instance.getExportSQLite(function(error) {
+ // if (error) throw error;
+ //expect().to.be();
+ //});
+ done();
+ });
+ });
+ });
+
+}));