Skip to content

Commit ae7f308

Browse files
committed
Bump swagger version
1 parent 0962c8e commit ae7f308

Some content is hidden

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

58 files changed

+1270
-264
lines changed

.swagger-codegen/VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.3.0-SNAPSHOT
1+
2.4.0-SNAPSHOT

README.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# flagr
2-
Flagr is a feature flagging, A/B testing and dynamic configuration microservice
2+
Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\".
33

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

6-
- API version: 1.0.0
7-
- Package version: 0.1.0
6+
- API version: 1.1.0
7+
- Package version: 1.1.0
88
- Build package: io.swagger.codegen.languages.PythonClientCodegen
99

1010
## Requirements.
@@ -78,13 +78,16 @@ Class | Method | HTTP request | Description
7878
*DistributionApi* | [**put_distributions**](docs/DistributionApi.md#put_distributions) | **PUT** /flags/{flagID}/segments/{segmentID}/distributions |
7979
*EvaluationApi* | [**post_evaluation**](docs/EvaluationApi.md#post_evaluation) | **POST** /evaluation |
8080
*EvaluationApi* | [**post_evaluation_batch**](docs/EvaluationApi.md#post_evaluation_batch) | **POST** /evaluation/batch |
81+
*ExportApi* | [**get_export_sq_lite**](docs/ExportApi.md#get_export_sq_lite) | **GET** /export/sqlite |
8182
*FlagApi* | [**create_flag**](docs/FlagApi.md#create_flag) | **POST** /flags |
8283
*FlagApi* | [**delete_flag**](docs/FlagApi.md#delete_flag) | **DELETE** /flags/{flagID} |
8384
*FlagApi* | [**find_flags**](docs/FlagApi.md#find_flags) | **GET** /flags |
8485
*FlagApi* | [**get_flag**](docs/FlagApi.md#get_flag) | **GET** /flags/{flagID} |
86+
*FlagApi* | [**get_flag_entity_types**](docs/FlagApi.md#get_flag_entity_types) | **GET** /flags/entity_types |
8587
*FlagApi* | [**get_flag_snapshots**](docs/FlagApi.md#get_flag_snapshots) | **GET** /flags/{flagID}/snapshots |
8688
*FlagApi* | [**put_flag**](docs/FlagApi.md#put_flag) | **PUT** /flags/{flagID} |
8789
*FlagApi* | [**set_flag_enabled**](docs/FlagApi.md#set_flag_enabled) | **PUT** /flags/{flagID}/enabled |
90+
*HealthApi* | [**get_health**](docs/HealthApi.md#get_health) | **GET** /health |
8891
*SegmentApi* | [**create_segment**](docs/SegmentApi.md#create_segment) | **POST** /flags/{flagID}/segments |
8992
*SegmentApi* | [**delete_segment**](docs/SegmentApi.md#delete_segment) | **DELETE** /flags/{flagID}/segments/{segmentID} |
9093
*SegmentApi* | [**find_segments**](docs/SegmentApi.md#find_segments) | **GET** /flags/{flagID}/segments |

docs/CreateFlagRequest.md

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**description** | **str** | |
7+
**key** | **str** | unique key representation of the flag | [optional]
78

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

docs/Distribution.md

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**id** | **int** | | [optional]
77
**percent** | **int** | |
8-
**bitmap** | **str** | | [optional]
98
**variant_key** | **str** | |
109
**variant_id** | **int** | |
1110

docs/EvalContext.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**entity_id** | **str** | |
7-
**entity_type** | **str** | |
6+
**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]
7+
**entity_type** | **str** | | [optional]
88
**entity_context** | **object** | | [optional]
99
**enable_debug** | **bool** | | [optional]
10-
**flag_id** | **int** | |
10+
**flag_id** | **int** | flagID | [optional]
11+
**flag_key** | **str** | flagKey. flagID or flagKey will resolve to the same flag. Either works. | [optional]
1112

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

docs/EvalResult.md

+8-7
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**flag_id** | **int** | |
6+
**flag_id** | **int** | | [optional]
7+
**flag_key** | **str** | | [optional]
78
**flag_snapshot_id** | **int** | | [optional]
8-
**segment_id** | **int** | |
9-
**variant_id** | **int** | |
10-
**variant_key** | **str** | |
11-
**variant_attachment** | **object** | |
12-
**eval_context** | [**EvalContext**](EvalContext.md) | |
13-
**timestamp** | **str** | |
9+
**segment_id** | **int** | | [optional]
10+
**variant_id** | **int** | | [optional]
11+
**variant_key** | **str** | | [optional]
12+
**variant_attachment** | **object** | | [optional]
13+
**eval_context** | [**EvalContext**](EvalContext.md) | | [optional]
14+
**timestamp** | **str** | | [optional]
1415
**eval_debug_log** | [**EvalDebugLog**](EvalDebugLog.md) | | [optional]
1516

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

docs/EvaluationBatchRequest.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**entities** | [**list[EvaluationEntity]**](EvaluationEntity.md) | |
77
**enable_debug** | **bool** | | [optional]
8-
**flag_i_ds** | **list[int]** | |
8+
**flag_i_ds** | **list[int]** | flagIDs | [optional]
9+
**flag_keys** | **list[str]** | flagKeys. Either flagIDs or flagKeys works. If pass in both, Flagr may return duplicate results. | [optional]
910

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

docs/EvaluationEntity.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**entity_id** | **str** | |
7-
**entity_type** | **str** | |
6+
**entity_id** | **str** | | [optional]
7+
**entity_type** | **str** | | [optional]
88
**entity_context** | **object** | | [optional]
99

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

docs/ExportApi.md

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# flagr.ExportApi
2+
3+
All URIs are relative to *http://localhost/api/v1*
4+
5+
Method | HTTP request | Description
6+
------------- | ------------- | -------------
7+
[**get_export_sq_lite**](ExportApi.md#get_export_sq_lite) | **GET** /export/sqlite |
8+
9+
10+
# **get_export_sq_lite**
11+
> file get_export_sq_lite()
12+
13+
14+
15+
Export sqlite3 format of the db dump, which is converted from the main database.
16+
17+
### Example
18+
```python
19+
from __future__ import print_function
20+
import time
21+
import flagr
22+
from flagr.rest import ApiException
23+
from pprint import pprint
24+
25+
# create an instance of the API class
26+
api_instance = flagr.ExportApi()
27+
28+
try:
29+
api_response = api_instance.get_export_sq_lite()
30+
pprint(api_response)
31+
except ApiException as e:
32+
print("Exception when calling ExportApi->get_export_sq_lite: %s\n" % e)
33+
```
34+
35+
### Parameters
36+
This endpoint does not need any parameter.
37+
38+
### Return type
39+
40+
[**file**](file.md)
41+
42+
### Authorization
43+
44+
No authorization required
45+
46+
### HTTP request headers
47+
48+
- **Content-Type**: application/json
49+
- **Accept**: application/octet-stream
50+
51+
[[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)
52+

docs/Flag.md

+5
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,16 @@
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**id** | **int** | | [optional]
7+
**key** | **str** | unique key representation of the flag | [optional]
78
**description** | **str** | |
89
**enabled** | **bool** | |
910
**segments** | [**list[Segment]**](Segment.md) | | [optional]
1011
**variants** | [**list[Variant]**](Variant.md) | | [optional]
1112
**data_records_enabled** | **bool** | enabled data records will get data logging in the metrics pipeline, for example, kafka. |
13+
**entity_type** | **str** | it will override the entityType in the evaluation logs if it's not empty | [optional]
14+
**created_by** | **str** | | [optional]
15+
**updated_by** | **str** | | [optional]
16+
**updated_at** | **datetime** | | [optional]
1217

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

docs/FlagApi.md

+61-3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Method | HTTP request | Description
88
[**delete_flag**](FlagApi.md#delete_flag) | **DELETE** /flags/{flagID} |
99
[**find_flags**](FlagApi.md#find_flags) | **GET** /flags |
1010
[**get_flag**](FlagApi.md#get_flag) | **GET** /flags/{flagID} |
11+
[**get_flag_entity_types**](FlagApi.md#get_flag_entity_types) | **GET** /flags/entity_types |
1112
[**get_flag_snapshots**](FlagApi.md#get_flag_snapshots) | **GET** /flags/{flagID}/snapshots |
1213
[**put_flag**](FlagApi.md#put_flag) | **PUT** /flags/{flagID} |
1314
[**set_flag_enabled**](FlagApi.md#set_flag_enabled) | **PUT** /flags/{flagID}/enabled |
@@ -103,7 +104,7 @@ No authorization required
103104
[[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)
104105

105106
# **find_flags**
106-
> list[Flag] find_flags()
107+
> list[Flag] find_flags(limit=limit, enabled=enabled, description=description, description_like=description_like, key=key, offset=offset, preload=preload)
107108
108109

109110

@@ -117,16 +118,32 @@ from pprint import pprint
117118

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

121129
try:
122-
api_response = api_instance.find_flags()
130+
api_response = api_instance.find_flags(limit=limit, enabled=enabled, description=description, description_like=description_like, key=key, offset=offset, preload=preload)
123131
pprint(api_response)
124132
except ApiException as e:
125133
print("Exception when calling FlagApi->find_flags: %s\n" % e)
126134
```
127135

128136
### Parameters
129-
This endpoint does not need any parameter.
137+
138+
Name | Type | Description | Notes
139+
------------- | ------------- | ------------- | -------------
140+
**limit** | **int**| the numbers of flags to return | [optional]
141+
**enabled** | **bool**| return flags having given enabled status | [optional]
142+
**description** | **str**| return flags exactly matching given description | [optional]
143+
**description_like** | **str**| return flags partially matching given description | [optional]
144+
**key** | **str**| return flags matching given key | [optional]
145+
**offset** | **int**| return flags given the offset, it should usually set together with limit | [optional]
146+
**preload** | **bool**| return flags with preloaded segments and variants | [optional]
130147

131148
### Return type
132149

@@ -188,6 +205,47 @@ No authorization required
188205

189206
[[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)
190207

208+
# **get_flag_entity_types**
209+
> list[str] get_flag_entity_types()
210+
211+
212+
213+
### Example
214+
```python
215+
from __future__ import print_function
216+
import time
217+
import flagr
218+
from flagr.rest import ApiException
219+
from pprint import pprint
220+
221+
# create an instance of the API class
222+
api_instance = flagr.FlagApi()
223+
224+
try:
225+
api_response = api_instance.get_flag_entity_types()
226+
pprint(api_response)
227+
except ApiException as e:
228+
print("Exception when calling FlagApi->get_flag_entity_types: %s\n" % e)
229+
```
230+
231+
### Parameters
232+
This endpoint does not need any parameter.
233+
234+
### Return type
235+
236+
**list[str]**
237+
238+
### Authorization
239+
240+
No authorization required
241+
242+
### HTTP request headers
243+
244+
- **Content-Type**: application/json
245+
- **Accept**: application/json
246+
247+
[[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)
248+
191249
# **get_flag_snapshots**
192250
> list[FlagSnapshot] get_flag_snapshots(flag_id)
193251

docs/HealthApi.md

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# flagr.HealthApi
2+
3+
All URIs are relative to *http://localhost/api/v1*
4+
5+
Method | HTTP request | Description
6+
------------- | ------------- | -------------
7+
[**get_health**](HealthApi.md#get_health) | **GET** /health |
8+
9+
10+
# **get_health**
11+
> get_health()
12+
13+
14+
15+
Check if Flagr is healthy
16+
17+
### Example
18+
```python
19+
from __future__ import print_function
20+
import time
21+
import flagr
22+
from flagr.rest import ApiException
23+
from pprint import pprint
24+
25+
# create an instance of the API class
26+
api_instance = flagr.HealthApi()
27+
28+
try:
29+
api_instance.get_health()
30+
except ApiException as e:
31+
print("Exception when calling HealthApi->get_health: %s\n" % e)
32+
```
33+
34+
### Parameters
35+
This endpoint does not need any parameter.
36+
37+
### Return type
38+
39+
void (empty response body)
40+
41+
### Authorization
42+
43+
No authorization required
44+
45+
### HTTP request headers
46+
47+
- **Content-Type**: application/json
48+
- **Accept**: application/json
49+
50+
[[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)
51+

docs/PutFlagRequest.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@
33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**description** | **str** | |
6+
**description** | **str** | | [optional]
77
**data_records_enabled** | **bool** | enabled data records will get data logging in the metrics pipeline, for example, kafka. | [optional]
8+
**entity_type** | **str** | it will overwrite entityType into evaluation logs if it's not empty | [optional]
9+
**enabled** | **bool** | | [optional]
10+
**key** | **str** | | [optional]
811

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

docs/PutVariantRequest.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**key** | **str** | |
7-
**attachment** | **object** | |
7+
**attachment** | **object** | | [optional]
88

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

flagr/__init__.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
"""
66
Flagr
77
8-
Flagr is a feature flagging, A/B testing and dynamic configuration microservice # noqa: E501
8+
Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\". # noqa: E501
99
10-
OpenAPI spec version: 1.0.0
10+
OpenAPI spec version: 1.1.0
1111
1212
Generated by: https://github.com/swagger-api/swagger-codegen.git
1313
"""
@@ -19,7 +19,9 @@
1919
from flagr.api.constraint_api import ConstraintApi
2020
from flagr.api.distribution_api import DistributionApi
2121
from flagr.api.evaluation_api import EvaluationApi
22+
from flagr.api.export_api import ExportApi
2223
from flagr.api.flag_api import FlagApi
24+
from flagr.api.health_api import HealthApi
2325
from flagr.api.segment_api import SegmentApi
2426
from flagr.api.variant_api import VariantApi
2527

flagr/api/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
from flagr.api.constraint_api import ConstraintApi
77
from flagr.api.distribution_api import DistributionApi
88
from flagr.api.evaluation_api import EvaluationApi
9+
from flagr.api.export_api import ExportApi
910
from flagr.api.flag_api import FlagApi
11+
from flagr.api.health_api import HealthApi
1012
from flagr.api.segment_api import SegmentApi
1113
from flagr.api.variant_api import VariantApi

flagr/api/constraint_api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
"""
44
Flagr
55
6-
Flagr is a feature flagging, A/B testing and dynamic configuration microservice # noqa: E501
6+
Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\". # noqa: E501
77
8-
OpenAPI spec version: 1.0.0
8+
OpenAPI spec version: 1.1.0
99
1010
Generated by: https://github.com/swagger-api/swagger-codegen.git
1111
"""

0 commit comments

Comments
 (0)