Skip to content

Commit

Permalink
Bump flagr swagger and regenerate the python SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouzhuojie committed May 29, 2020
1 parent 8557372 commit d5a565b
Show file tree
Hide file tree
Showing 49 changed files with 874 additions and 369 deletions.
2 changes: 1 addition & 1 deletion .swagger-codegen/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.4.0-SNAPSHOT
2.4.14
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Flagr is a feature flagging, A/B testing and dynamic configuration microservice.

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

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

Expand Down Expand Up @@ -50,8 +50,9 @@ import time
import flagr
from flagr.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = flagr.ConstraintApi()
api_instance = flagr.ConstraintApi(flagr.ApiClient(configuration))
flag_id = 789 # int | numeric ID of the flag
segment_id = 789 # int | numeric ID of the segment
body = flagr.CreateConstraintRequest() # CreateConstraintRequest | create a constraint
Expand All @@ -78,7 +79,8 @@ 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 |
*ExportApi* | [**get_export_eval_cache_json**](docs/ExportApi.md#get_export_eval_cache_json) | **GET** /export/eval_cache/json |
*ExportApi* | [**get_export_sqlite**](docs/ExportApi.md#get_export_sqlite) | **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 |
Expand Down Expand Up @@ -116,6 +118,7 @@ Class | Method | HTTP request | Description
- [EvaluationEntity](docs/EvaluationEntity.md)
- [Flag](docs/Flag.md)
- [FlagSnapshot](docs/FlagSnapshot.md)
- [Health](docs/Health.md)
- [PutDistributionsRequest](docs/PutDistributionsRequest.md)
- [PutFlagRequest](docs/PutFlagRequest.md)
- [PutSegmentReorderRequest](docs/PutSegmentReorderRequest.md)
Expand Down
1 change: 1 addition & 0 deletions docs/CreateFlagRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**description** | **str** | |
**key** | **str** | unique key representation of the flag | [optional]
**template** | **str** | template for flag creation | [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
54 changes: 49 additions & 5 deletions docs/ExportApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,55 @@ All URIs are relative to *https://localhost/api/v1*

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


# **get_export_sq_lite**
> file get_export_sq_lite()
# **get_export_eval_cache_json**
> object get_export_eval_cache_json()


Export JSON format of the eval cache dump

### 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_eval_cache_json()
pprint(api_response)
except ApiException as e:
print("Exception when calling ExportApi->get_export_eval_cache_json: %s\n" % e)
```

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

### Return type

**object**

### 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_export_sqlite**
> file get_export_sqlite()


Expand All @@ -26,10 +70,10 @@ from pprint import pprint
api_instance = flagr.ExportApi()

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

### Parameters
Expand Down
1 change: 1 addition & 0 deletions docs/Flag.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Name | Type | Description | Notes
**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]
**notes** | **str** | flag usage details in markdown format | [optional]
**created_by** | **str** | | [optional]
**updated_by** | **str** | | [optional]
**updated_at** | **datetime** | | [optional]
Expand Down
10 changes: 10 additions & 0 deletions docs/Health.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Health

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**status** | **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)


7 changes: 4 additions & 3 deletions docs/HealthApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Method | HTTP request | Description


# **get_health**
> get_health()
> Health get_health()


Expand All @@ -26,7 +26,8 @@ from pprint import pprint
api_instance = flagr.HealthApi()

try:
api_instance.get_health()
api_response = api_instance.get_health()
pprint(api_response)
except ApiException as e:
print("Exception when calling HealthApi->get_health: %s\n" % e)
```
Expand All @@ -36,7 +37,7 @@ This endpoint does not need any parameter.

### Return type

void (empty response body)
[**Health**](Health.md)

### Authorization

Expand Down
1 change: 1 addition & 0 deletions docs/PutFlagRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Name | Type | Description | Notes
**entity_type** | **str** | it will overwrite entityType into evaluation logs if it's not empty | [optional]
**enabled** | **bool** | | [optional]
**key** | **str** | | [optional]
**notes** | **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
3 changes: 2 additions & 1 deletion flagr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
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.1.0
OpenAPI spec version: 1.1.8
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand Down Expand Up @@ -44,6 +44,7 @@
from flagr.models.evaluation_entity import EvaluationEntity
from flagr.models.flag import Flag
from flagr.models.flag_snapshot import FlagSnapshot
from flagr.models.health import Health
from flagr.models.put_distributions_request import PutDistributionsRequest
from flagr.models.put_flag_request import PutFlagRequest
from flagr.models.put_segment_reorder_request import PutSegmentReorderRequest
Expand Down
Loading

0 comments on commit d5a565b

Please sign in to comment.