Skip to content

Commit

Permalink
Merge pull request #1 from checkr/zz/bump-swagger-version
Browse files Browse the repository at this point in the history
Bump swagger version
  • Loading branch information
zhouzhuojie authored Mar 20, 2019
2 parents 0962c8e + ae7f308 commit 8557372
Show file tree
Hide file tree
Showing 58 changed files with 1,270 additions and 264 deletions.
2 changes: 1 addition & 1 deletion .swagger-codegen/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.3.0-SNAPSHOT
2.4.0-SNAPSHOT
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# flagr
Flagr is a feature flagging, A/B testing and dynamic configuration microservice
Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\".

This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:

- API version: 1.0.0
- Package version: 0.1.0
- API version: 1.1.0
- Package version: 1.1.0
- Build package: io.swagger.codegen.languages.PythonClientCodegen

## Requirements.
Expand Down Expand Up @@ -78,13 +78,16 @@ Class | Method | HTTP request | Description
*DistributionApi* | [**put_distributions**](docs/DistributionApi.md#put_distributions) | **PUT** /flags/{flagID}/segments/{segmentID}/distributions |
*EvaluationApi* | [**post_evaluation**](docs/EvaluationApi.md#post_evaluation) | **POST** /evaluation |
*EvaluationApi* | [**post_evaluation_batch**](docs/EvaluationApi.md#post_evaluation_batch) | **POST** /evaluation/batch |
*ExportApi* | [**get_export_sq_lite**](docs/ExportApi.md#get_export_sq_lite) | **GET** /export/sqlite |
*FlagApi* | [**create_flag**](docs/FlagApi.md#create_flag) | **POST** /flags |
*FlagApi* | [**delete_flag**](docs/FlagApi.md#delete_flag) | **DELETE** /flags/{flagID} |
*FlagApi* | [**find_flags**](docs/FlagApi.md#find_flags) | **GET** /flags |
*FlagApi* | [**get_flag**](docs/FlagApi.md#get_flag) | **GET** /flags/{flagID} |
*FlagApi* | [**get_flag_entity_types**](docs/FlagApi.md#get_flag_entity_types) | **GET** /flags/entity_types |
*FlagApi* | [**get_flag_snapshots**](docs/FlagApi.md#get_flag_snapshots) | **GET** /flags/{flagID}/snapshots |
*FlagApi* | [**put_flag**](docs/FlagApi.md#put_flag) | **PUT** /flags/{flagID} |
*FlagApi* | [**set_flag_enabled**](docs/FlagApi.md#set_flag_enabled) | **PUT** /flags/{flagID}/enabled |
*HealthApi* | [**get_health**](docs/HealthApi.md#get_health) | **GET** /health |
*SegmentApi* | [**create_segment**](docs/SegmentApi.md#create_segment) | **POST** /flags/{flagID}/segments |
*SegmentApi* | [**delete_segment**](docs/SegmentApi.md#delete_segment) | **DELETE** /flags/{flagID}/segments/{segmentID} |
*SegmentApi* | [**find_segments**](docs/SegmentApi.md#find_segments) | **GET** /flags/{flagID}/segments |
Expand Down
1 change: 1 addition & 0 deletions docs/CreateFlagRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**description** | **str** | |
**key** | **str** | unique key representation of the flag | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
1 change: 0 additions & 1 deletion docs/Distribution.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | | [optional]
**percent** | **int** | |
**bitmap** | **str** | | [optional]
**variant_key** | **str** | |
**variant_id** | **int** | |

Expand Down
7 changes: 4 additions & 3 deletions docs/EvalContext.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**entity_id** | **str** | |
**entity_type** | **str** | |
**entity_id** | **str** | entityID is used to deterministically at random to evaluate the flag result. If it's empty, flagr will randomly generate one. | [optional]
**entity_type** | **str** | | [optional]
**entity_context** | **object** | | [optional]
**enable_debug** | **bool** | | [optional]
**flag_id** | **int** | |
**flag_id** | **int** | flagID | [optional]
**flag_key** | **str** | flagKey. flagID or flagKey will resolve to the same flag. Either works. | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
15 changes: 8 additions & 7 deletions docs/EvalResult.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**flag_id** | **int** | |
**flag_id** | **int** | | [optional]
**flag_key** | **str** | | [optional]
**flag_snapshot_id** | **int** | | [optional]
**segment_id** | **int** | |
**variant_id** | **int** | |
**variant_key** | **str** | |
**variant_attachment** | **object** | |
**eval_context** | [**EvalContext**](EvalContext.md) | |
**timestamp** | **str** | |
**segment_id** | **int** | | [optional]
**variant_id** | **int** | | [optional]
**variant_key** | **str** | | [optional]
**variant_attachment** | **object** | | [optional]
**eval_context** | [**EvalContext**](EvalContext.md) | | [optional]
**timestamp** | **str** | | [optional]
**eval_debug_log** | [**EvalDebugLog**](EvalDebugLog.md) | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Expand Down
3 changes: 2 additions & 1 deletion docs/EvaluationBatchRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**entities** | [**list[EvaluationEntity]**](EvaluationEntity.md) | |
**enable_debug** | **bool** | | [optional]
**flag_i_ds** | **list[int]** | |
**flag_i_ds** | **list[int]** | flagIDs | [optional]
**flag_keys** | **list[str]** | flagKeys. Either flagIDs or flagKeys works. If pass in both, Flagr may return duplicate results. | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
4 changes: 2 additions & 2 deletions docs/EvaluationEntity.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**entity_id** | **str** | |
**entity_type** | **str** | |
**entity_id** | **str** | | [optional]
**entity_type** | **str** | | [optional]
**entity_context** | **object** | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Expand Down
52 changes: 52 additions & 0 deletions docs/ExportApi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# flagr.ExportApi

All URIs are relative to *http://localhost/api/v1*

Method | HTTP request | Description
------------- | ------------- | -------------
[**get_export_sq_lite**](ExportApi.md#get_export_sq_lite) | **GET** /export/sqlite |


# **get_export_sq_lite**
> file get_export_sq_lite()


Export sqlite3 format of the db dump, which is converted from the main database.

### Example
```python
from __future__ import print_function
import time
import flagr
from flagr.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = flagr.ExportApi()

try:
api_response = api_instance.get_export_sq_lite()
pprint(api_response)
except ApiException as e:
print("Exception when calling ExportApi->get_export_sq_lite: %s\n" % e)
```

### Parameters
This endpoint does not need any parameter.

### Return type

[**file**](file.md)

### Authorization

No authorization required

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

5 changes: 5 additions & 0 deletions docs/Flag.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,16 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | | [optional]
**key** | **str** | unique key representation of the flag | [optional]
**description** | **str** | |
**enabled** | **bool** | |
**segments** | [**list[Segment]**](Segment.md) | | [optional]
**variants** | [**list[Variant]**](Variant.md) | | [optional]
**data_records_enabled** | **bool** | enabled data records will get data logging in the metrics pipeline, for example, kafka. |
**entity_type** | **str** | it will override the entityType in the evaluation logs if it's not empty | [optional]
**created_by** | **str** | | [optional]
**updated_by** | **str** | | [optional]
**updated_at** | **datetime** | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
64 changes: 61 additions & 3 deletions docs/FlagApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Method | HTTP request | Description
[**delete_flag**](FlagApi.md#delete_flag) | **DELETE** /flags/{flagID} |
[**find_flags**](FlagApi.md#find_flags) | **GET** /flags |
[**get_flag**](FlagApi.md#get_flag) | **GET** /flags/{flagID} |
[**get_flag_entity_types**](FlagApi.md#get_flag_entity_types) | **GET** /flags/entity_types |
[**get_flag_snapshots**](FlagApi.md#get_flag_snapshots) | **GET** /flags/{flagID}/snapshots |
[**put_flag**](FlagApi.md#put_flag) | **PUT** /flags/{flagID} |
[**set_flag_enabled**](FlagApi.md#set_flag_enabled) | **PUT** /flags/{flagID}/enabled |
Expand Down Expand Up @@ -103,7 +104,7 @@ No authorization required
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **find_flags**
> list[Flag] find_flags()
> list[Flag] find_flags(limit=limit, enabled=enabled, description=description, description_like=description_like, key=key, offset=offset, preload=preload)


Expand All @@ -117,16 +118,32 @@ from pprint import pprint

# create an instance of the API class
api_instance = flagr.FlagApi()
limit = 789 # int | the numbers of flags to return (optional)
enabled = true # bool | return flags having given enabled status (optional)
description = 'description_example' # str | return flags exactly matching given description (optional)
description_like = 'description_like_example' # str | return flags partially matching given description (optional)
key = 'key_example' # str | return flags matching given key (optional)
offset = 789 # int | return flags given the offset, it should usually set together with limit (optional)
preload = true # bool | return flags with preloaded segments and variants (optional)

try:
api_response = api_instance.find_flags()
api_response = api_instance.find_flags(limit=limit, enabled=enabled, description=description, description_like=description_like, key=key, offset=offset, preload=preload)
pprint(api_response)
except ApiException as e:
print("Exception when calling FlagApi->find_flags: %s\n" % e)
```

### Parameters
This endpoint does not need any parameter.

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**limit** | **int**| the numbers of flags to return | [optional]
**enabled** | **bool**| return flags having given enabled status | [optional]
**description** | **str**| return flags exactly matching given description | [optional]
**description_like** | **str**| return flags partially matching given description | [optional]
**key** | **str**| return flags matching given key | [optional]
**offset** | **int**| return flags given the offset, it should usually set together with limit | [optional]
**preload** | **bool**| return flags with preloaded segments and variants | [optional]

### Return type

Expand Down Expand Up @@ -188,6 +205,47 @@ No authorization required

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **get_flag_entity_types**
> list[str] get_flag_entity_types()


### Example
```python
from __future__ import print_function
import time
import flagr
from flagr.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = flagr.FlagApi()

try:
api_response = api_instance.get_flag_entity_types()
pprint(api_response)
except ApiException as e:
print("Exception when calling FlagApi->get_flag_entity_types: %s\n" % e)
```

### Parameters
This endpoint does not need any parameter.

### Return type

**list[str]**

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **get_flag_snapshots**
> list[FlagSnapshot] get_flag_snapshots(flag_id)
Expand Down
51 changes: 51 additions & 0 deletions docs/HealthApi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# flagr.HealthApi

All URIs are relative to *http://localhost/api/v1*

Method | HTTP request | Description
------------- | ------------- | -------------
[**get_health**](HealthApi.md#get_health) | **GET** /health |


# **get_health**
> get_health()


Check if Flagr is healthy

### Example
```python
from __future__ import print_function
import time
import flagr
from flagr.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = flagr.HealthApi()

try:
api_instance.get_health()
except ApiException as e:
print("Exception when calling HealthApi->get_health: %s\n" % e)
```

### Parameters
This endpoint does not need any parameter.

### Return type

void (empty response body)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

5 changes: 4 additions & 1 deletion docs/PutFlagRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**description** | **str** | |
**description** | **str** | | [optional]
**data_records_enabled** | **bool** | enabled data records will get data logging in the metrics pipeline, for example, kafka. | [optional]
**entity_type** | **str** | it will overwrite entityType into evaluation logs if it's not empty | [optional]
**enabled** | **bool** | | [optional]
**key** | **str** | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
2 changes: 1 addition & 1 deletion docs/PutVariantRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**key** | **str** | |
**attachment** | **object** | |
**attachment** | **object** | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
6 changes: 4 additions & 2 deletions flagr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"""
Flagr
Flagr is a feature flagging, A/B testing and dynamic configuration microservice # noqa: E501
Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\". # noqa: E501
OpenAPI spec version: 1.0.0
OpenAPI spec version: 1.1.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand All @@ -19,7 +19,9 @@
from flagr.api.constraint_api import ConstraintApi
from flagr.api.distribution_api import DistributionApi
from flagr.api.evaluation_api import EvaluationApi
from flagr.api.export_api import ExportApi
from flagr.api.flag_api import FlagApi
from flagr.api.health_api import HealthApi
from flagr.api.segment_api import SegmentApi
from flagr.api.variant_api import VariantApi

Expand Down
2 changes: 2 additions & 0 deletions flagr/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
from flagr.api.constraint_api import ConstraintApi
from flagr.api.distribution_api import DistributionApi
from flagr.api.evaluation_api import EvaluationApi
from flagr.api.export_api import ExportApi
from flagr.api.flag_api import FlagApi
from flagr.api.health_api import HealthApi
from flagr.api.segment_api import SegmentApi
from flagr.api.variant_api import VariantApi
4 changes: 2 additions & 2 deletions flagr/api/constraint_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"""
Flagr
Flagr is a feature flagging, A/B testing and dynamic configuration microservice # noqa: E501
Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\". # noqa: E501
OpenAPI spec version: 1.0.0
OpenAPI spec version: 1.1.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand Down
Loading

0 comments on commit 8557372

Please sign in to comment.