diff --git a/generated/docs/ClassificationResult.md b/generated/docs/ClassificationResult.md index 582a835a..2af929bd 100644 --- a/generated/docs/ClassificationResult.md +++ b/generated/docs/ClassificationResult.md @@ -6,7 +6,7 @@ Our classification result. This result can come from the detector, or a human re Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **label** | **str** | What is the predicted label? | -**confidence** | **float** | On a scale of 0 to 1, how confident are we in the predicted label? | [optional] +**confidence** | **float, none_type** | On a scale of 0 to 1, how confident are we in the predicted label? | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [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) diff --git a/generated/docs/ImageQueriesApi.md b/generated/docs/ImageQueriesApi.md index e235d321..19aa5cd4 100644 --- a/generated/docs/ImageQueriesApi.md +++ b/generated/docs/ImageQueriesApi.md @@ -205,8 +205,7 @@ with openapi_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = image_queries_api.ImageQueriesApi(api_client) detector_id = "detector_id_example" # str | Choose a detector by its ID. - image_query = ImageQuery( - ) # ImageQuery | (optional) + body = open('@path/to/image.jpeg', 'rb') # file_type | (optional) # example passing only required values which don't have defaults set try: @@ -218,7 +217,7 @@ with openapi_client.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set # and optional values try: - api_response = api_instance.submit_image_query(detector_id, image_query=image_query) + api_response = api_instance.submit_image_query(detector_id, body=body) pprint(api_response) except openapi_client.ApiException as e: print("Exception when calling ImageQueriesApi->submit_image_query: %s\n" % e) @@ -230,7 +229,7 @@ with openapi_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **detector_id** | **str**| Choose a detector by its ID. | - **image_query** | [**ImageQuery**](ImageQuery.md)| | [optional] + **body** | **file_type**| | [optional] ### Return type @@ -242,7 +241,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data + - **Content-Type**: image/jpeg - **Accept**: application/json diff --git a/generated/model.py b/generated/model.py index 2d4989fa..17e3d617 100644 --- a/generated/model.py +++ b/generated/model.py @@ -1,6 +1,6 @@ # generated by datamodel-codegen: # filename: public-api.yaml -# timestamp: 2022-05-08T05:20:12+00:00 +# timestamp: 2022-05-08T05:27:06+00:00 from __future__ import annotations diff --git a/generated/openapi_client/api/image_queries_api.py b/generated/openapi_client/api/image_queries_api.py index 3d59d267..5d8ec725 100644 --- a/generated/openapi_client/api/image_queries_api.py +++ b/generated/openapi_client/api/image_queries_api.py @@ -156,7 +156,7 @@ def __init__(self, api_client=None): params_map={ 'all': [ 'detector_id', - 'image_query', + 'body', ], 'required': [ 'detector_id', @@ -176,15 +176,15 @@ def __init__(self, api_client=None): 'openapi_types': { 'detector_id': (str,), - 'image_query': - (ImageQuery,), + 'body': + (file_type,), }, 'attribute_map': { 'detector_id': 'detector_id', }, 'location_map': { 'detector_id': 'query', - 'image_query': 'body', + 'body': 'body', }, 'collection_format_map': { } @@ -194,9 +194,7 @@ def __init__(self, api_client=None): 'application/json' ], 'content_type': [ - 'application/json', - 'application/x-www-form-urlencoded', - 'multipart/form-data' + 'image/jpeg' ] }, api_client=api_client @@ -373,7 +371,7 @@ def submit_image_query( detector_id (str): Choose a detector by its ID. Keyword Args: - image_query (ImageQuery): [optional] + body (file_type): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object diff --git a/generated/openapi_client/model/classification_result.py b/generated/openapi_client/model/classification_result.py index 6bc45829..a5833d04 100644 --- a/generated/openapi_client/model/classification_result.py +++ b/generated/openapi_client/model/classification_result.py @@ -87,7 +87,7 @@ def openapi_types(): """ return { 'label': (str,), # noqa: E501 - 'confidence': (float,), # noqa: E501 + 'confidence': (float, none_type,), # noqa: E501 } @cached_property @@ -144,7 +144,7 @@ def _from_openapi_data(cls, label, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - confidence (float): On a scale of 0 to 1, how confident are we in the predicted label?. [optional] # noqa: E501 + confidence (float, none_type): On a scale of 0 to 1, how confident are we in the predicted label?. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -230,7 +230,7 @@ def __init__(self, label, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - confidence (float): On a scale of 0 to 1, how confident are we in the predicted label?. [optional] # noqa: E501 + confidence (float, none_type): On a scale of 0 to 1, how confident are we in the predicted label?. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/spec/public-api.yaml b/spec/public-api.yaml index 7f99b688..104c811b 100644 --- a/spec/public-api.yaml +++ b/spec/public-api.yaml @@ -136,19 +136,14 @@ paths: - image-queries requestBody: content: - application/json: + image/jpeg: schema: - $ref: '#/components/schemas/ImageQuery' + type: string + format: binary examples: JPEGBinaryImageData: value: '@path/to/image.jpeg' summary: JPEG binary image data - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/ImageQuery' - multipart/form-data: - schema: - $ref: '#/components/schemas/ImageQuery' security: - ApiToken: [] responses: @@ -189,9 +184,9 @@ components: properties: confidence: type: number - format: double maximum: 1 minimum: 0 + nullable: true description: On a scale of 0 to 1, how confident are we in the predicted label? label: