Skip to content

Commit

Permalink
Merge pull request #14 from waylayio/chore/regenerate
Browse files Browse the repository at this point in the history
Regenerate data sdk 🔁
  • Loading branch information
plankthom authored Dec 16, 2024
2 parents b35b707 + 9523a48 commit da9333d
Show file tree
Hide file tree
Showing 113 changed files with 633 additions and 98 deletions.
4 changes: 4 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ docs/MessageQueryResultResultsInner.md
docs/MessageQueryUntil.md
docs/MessageQueryWindow.md
docs/MessagesApi.md
docs/MultipleSeriesQueryRequestInner.md
docs/ObjectData.md
docs/Operation.md
docs/Order.md
Expand All @@ -48,6 +49,7 @@ docs/SeriesQueryRequest.md
docs/SeriesQueryRequestFrom.md
docs/SeriesQueryRequestWindow.md
docs/SeriesQueryResponse.md
docs/SeriesQueryWithoutAggregatesRequest.md
docs/TTLDuration.md
docs/TimeseriesFilter.md
docs/TimeseriesFilterOperator.md
Expand Down Expand Up @@ -93,6 +95,7 @@ test/types/message_query_result_stub.py
test/types/message_query_stub.py
test/types/message_query_until_stub.py
test/types/message_query_window_stub.py
test/types/multiple_series_query_request_inner_stub.py
test/types/object_data_stub.py
test/types/order_stub.py
test/types/post_series_for_resource_request_stub.py
Expand All @@ -111,6 +114,7 @@ test/types/series_query_request_from_stub.py
test/types/series_query_request_stub.py
test/types/series_query_request_window_stub.py
test/types/series_query_response_stub.py
test/types/series_query_without_aggregates_request_stub.py
test/types/timeseries_filter_operator_operator_stub.py
test/types/timeseries_filter_operator_stub.py
test/types/timeseries_filter_stub.py
Expand Down
2 changes: 1 addition & 1 deletion .openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.7.0
7.8.0
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Data is ingested into the platform by the Waylay Broker.

This Python package is automatically generated based on the
Waylay Data OpenAPI specification (API version: 2.14.0)
Waylay Data OpenAPI specification (API version: 2.18.0)
For more information, please visit [the openapi specification](https://docs.waylay.io/openapi/public/redocly/data.html).

It consists of two sub-packages that are both plugins for the waylay-sdk-core package.
Expand Down Expand Up @@ -100,6 +100,7 @@ Class | Method | HTTP request | Description
- [MessageQueryResultResultsInner](docs/MessageQueryResultResultsInner.md)
- [MessageQueryUntil](docs/MessageQueryUntil.md)
- [MessageQueryWindow](docs/MessageQueryWindow.md)
- [MultipleSeriesQueryRequestInner](docs/MultipleSeriesQueryRequestInner.md)
- [ObjectData](docs/ObjectData.md)
- [Order](docs/Order.md)
- [PostSeriesForResourceRequest](docs/PostSeriesForResourceRequest.md)
Expand All @@ -118,6 +119,7 @@ Class | Method | HTTP request | Description
- [SeriesQueryRequestFrom](docs/SeriesQueryRequestFrom.md)
- [SeriesQueryRequestWindow](docs/SeriesQueryRequestWindow.md)
- [SeriesQueryResponse](docs/SeriesQueryResponse.md)
- [SeriesQueryWithoutAggregatesRequest](docs/SeriesQueryWithoutAggregatesRequest.md)
- [TTLDuration](docs/TTLDuration.md)
- [TimeseriesFilter](docs/TimeseriesFilter.md)
- [TimeseriesFilterOperator](docs/TimeseriesFilterOperator.md)
Expand Down
38 changes: 38 additions & 0 deletions docs/MultipleSeriesQueryRequestInner.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# MultipleSeriesQueryRequestInner


## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**var_from** | [**SeriesQueryRequestFrom**](SeriesQueryRequestFrom.md) | | [optional]
**until** | [**SeriesQueryRequestFrom**](SeriesQueryRequestFrom.md) | | [optional]
**window** | [**SeriesQueryRequestWindow**](SeriesQueryRequestWindow.md) | | [optional]
**metric** | **str** | Key that identifies a single timeseries for a given _Resource_. Corresponds with the top-level keys of _Message Events_ that are processed by the broker for that _Resource_. |
**aggregates** | **List[object]** | |
**grouping** | [**Grouping**](Grouping.md) | | [optional]
**resources** | **List[str]** | |
**max_results** | **int** | | [optional]
**filter** | [**TimeseriesFilter**](TimeseriesFilter.md) | | [optional]
**order** | [**Order**](Order.md) | | [optional] [default to Order.ASCENDING]

## Example

```python
from waylay.services.data.models.multiple_series_query_request_inner import MultipleSeriesQueryRequestInner

# TODO update the JSON string below
json = "{}"
# create an instance of MultipleSeriesQueryRequestInner from a JSON string
multiple_series_query_request_inner_instance = MultipleSeriesQueryRequestInner.from_json(json)
# print the JSON string representation of the object
print MultipleSeriesQueryRequestInner.to_json()

# convert the object into a dict
multiple_series_query_request_inner_dict = multiple_series_query_request_inner_instance.to_dict()
# create an instance of MultipleSeriesQueryRequestInner from a dict
multiple_series_query_request_inner_form_dict = multiple_series_query_request_inner.from_dict(multiple_series_query_request_inner_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


2 changes: 1 addition & 1 deletion docs/QueryTimeSeriesRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Name | Type | Description | Notes
**until** | [**SeriesQueryRequestFrom**](SeriesQueryRequestFrom.md) | | [optional]
**window** | [**SeriesQueryRequestWindow**](SeriesQueryRequestWindow.md) | | [optional]
**metric** | **str** | Key that identifies a single timeseries for a given _Resource_. Corresponds with the top-level keys of _Message Events_ that are processed by the broker for that _Resource_. |
**aggregates** | [**List[Aggregate]**](Aggregate.md) | |
**aggregates** | **List[object]** | |
**grouping** | [**Grouping**](Grouping.md) | | [optional]
**resources** | **List[str]** | |
**max_results** | **int** | | [optional]
Expand Down
37 changes: 37 additions & 0 deletions docs/SeriesQueryWithoutAggregatesRequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# SeriesQueryWithoutAggregatesRequest


## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**var_from** | [**SeriesQueryRequestFrom**](SeriesQueryRequestFrom.md) | | [optional]
**until** | [**SeriesQueryRequestFrom**](SeriesQueryRequestFrom.md) | | [optional]
**window** | [**SeriesQueryRequestWindow**](SeriesQueryRequestWindow.md) | | [optional]
**metric** | **str** | Key that identifies a single timeseries for a given _Resource_. Corresponds with the top-level keys of _Message Events_ that are processed by the broker for that _Resource_. |
**aggregates** | **List[object]** | | [optional]
**resources** | **List[str]** | |
**max_results** | **int** | | [optional]
**filter** | [**TimeseriesFilter**](TimeseriesFilter.md) | | [optional]
**order** | [**Order**](Order.md) | | [optional] [default to Order.ASCENDING]

## Example

```python
from waylay.services.data.models.series_query_without_aggregates_request import SeriesQueryWithoutAggregatesRequest

# TODO update the JSON string below
json = "{}"
# create an instance of SeriesQueryWithoutAggregatesRequest from a JSON string
series_query_without_aggregates_request_instance = SeriesQueryWithoutAggregatesRequest.from_json(json)
# print the JSON string representation of the object
print SeriesQueryWithoutAggregatesRequest.to_json()

# convert the object into a dict
series_query_without_aggregates_request_dict = series_query_without_aggregates_request_instance.to_dict()
# create an instance of SeriesQueryWithoutAggregatesRequest from a dict
series_query_without_aggregates_request_form_dict = series_query_without_aggregates_request.from_dict(series_query_without_aggregates_request_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


45 changes: 43 additions & 2 deletions openapi/data.openapi.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
openapi: 3.0.3
info:
title: Waylay Broker
version: 2.14.0
version: 2.18.0
description: Data is ingested into the platform by the Waylay Broker.
servers:
- url: https://api.waylay.io
Expand Down Expand Up @@ -384,6 +384,7 @@ paths:
schema:
oneOf:
- $ref: '#/components/schemas/SeriesQueryRequest'
- $ref: '#/components/schemas/SeriesQueryWithoutAggregatesRequest'
- $ref: '#/components/schemas/MultipleSeriesQueryRequest'
responses:
'200':
Expand Down Expand Up @@ -842,12 +843,52 @@ components:
- metric
- aggregates
- resources
SeriesQueryWithoutAggregatesRequest:
title: Timeseries query request object without aggregates
type: object
properties:
from:
oneOf:
- $ref: '#/components/schemas/UnixEpochMillis'
- $ref: '#/components/schemas/ISO8601Timestamp'
until:
oneOf:
- $ref: '#/components/schemas/UnixEpochMillis'
- $ref: '#/components/schemas/ISO8601Timestamp'
window:
oneOf:
- $ref: '#/components/schemas/DurationWithUnit'
- $ref: '#/components/schemas/ISO8601Duration'
metric:
$ref: '#/components/schemas/MetricId'
aggregates:
type: array
minItems: 0
maxItems: 0
resources:
type: array
minItems: 1
maxItems: 1
items:
$ref: '#/components/schemas/ResourceId'
maxResults:
type: integer
minimum: 0
filter:
$ref: '#/components/schemas/TimeseriesFilter'
order:
$ref: '#/components/schemas/Order'
required:
- metric
- resources
MultipleSeriesQueryRequest:
title: Array of Timeseries query requests
type: array
minItems: 1
items:
$ref: '#/components/schemas/SeriesQueryRequest'
oneOf:
- $ref: '#/components/schemas/SeriesQueryRequest'
- $ref: '#/components/schemas/SeriesQueryWithoutAggregatesRequest'
SeriesKeyValue:
title: Timestamp-Value pair
type: array
Expand Down
45 changes: 43 additions & 2 deletions openapi/data.transformed.openapi.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
openapi: 3.0.3
info:
title: Waylay Broker
version: 2.14.0
version: 2.18.0
description: Data is ingested into the platform by the Waylay Broker.
servers:
- url: https://api.waylay.io
Expand Down Expand Up @@ -523,6 +523,7 @@ paths:
schema:
oneOf:
- $ref: '#/components/schemas/SeriesQueryRequest'
- $ref: '#/components/schemas/SeriesQueryWithoutAggregatesRequest'
- $ref: '#/components/schemas/MultipleSeriesQueryRequest'
responses:
'200':
Expand Down Expand Up @@ -982,11 +983,51 @@ components:
- metric
- aggregates
- resources
SeriesQueryWithoutAggregatesRequest:
type: object
properties:
from:
oneOf:
- $ref: '#/components/schemas/UnixEpochMillis'
- $ref: '#/components/schemas/SO8601Timestamp'
until:
oneOf:
- $ref: '#/components/schemas/UnixEpochMillis'
- $ref: '#/components/schemas/SO8601Timestamp'
window:
oneOf:
- $ref: '#/components/schemas/DurationWithUnit'
- $ref: '#/components/schemas/SO8601Duration'
metric:
$ref: '#/components/schemas/MetricId'
aggregates:
type: array
minItems: 0
maxItems: 0
items: {}
resources:
type: array
minItems: 1
maxItems: 1
items:
$ref: '#/components/schemas/ResourceId'
maxResults:
type: integer
minimum: 0
filter:
$ref: '#/components/schemas/TimeseriesFilter'
order:
$ref: '#/components/schemas/Order'
required:
- metric
- resources
MultipleSeriesQueryRequest:
type: array
minItems: 1
items:
$ref: '#/components/schemas/SeriesQueryRequest'
oneOf:
- $ref: '#/components/schemas/SeriesQueryRequest'
- $ref: '#/components/schemas/SeriesQueryWithoutAggregatesRequest'
SeriesKeyValue:
type: array
description: >-
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pydantic ~= 2.6
typing-extensions ~= 4.9
waylay-sdk-core ~= 0.2.3
waylay-sdk-core ~= 0.2.4
68 changes: 68 additions & 0 deletions test/openapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,22 @@ def with_example_provider(dct):
)
MODEL_DEFINITIONS.update({"MessageQuery_window": _message_query_window_model_schema})

_multiple_series_query_request_inner_model_schema = json.loads(
r"""{
"title" : "MultipleSeriesQueryRequest_inner",
"oneOf" : [ {
"$ref" : "#/components/schemas/SeriesQueryRequest"
}, {
"$ref" : "#/components/schemas/SeriesQueryWithoutAggregatesRequest"
} ]
}
""",
object_hook=with_example_provider,
)
MODEL_DEFINITIONS.update({
"MultipleSeriesQueryRequest_inner": _multiple_series_query_request_inner_model_schema
})

_object_data_model_schema = json.loads(
r"""{
"title" : "Object Data",
Expand Down Expand Up @@ -600,6 +616,8 @@ def with_example_provider(dct):
r"""{
"oneOf" : [ {
"$ref" : "#/components/schemas/SeriesQueryRequest"
}, {
"$ref" : "#/components/schemas/SeriesQueryWithoutAggregatesRequest"
}, {
"$ref" : "#/components/schemas/MultipleSeriesQueryRequest"
} ]
Expand Down Expand Up @@ -795,6 +813,56 @@ def with_example_provider(dct):
)
MODEL_DEFINITIONS.update({"SeriesQueryResponse": _series_query_response_model_schema})

_series_query_without_aggregates_request_model_schema = json.loads(
r"""{
"required" : [ "metric", "resources" ],
"type" : "object",
"properties" : {
"from" : {
"$ref" : "#/components/schemas/SeriesQueryRequest_from"
},
"until" : {
"$ref" : "#/components/schemas/SeriesQueryRequest_from"
},
"window" : {
"$ref" : "#/components/schemas/SeriesQueryRequest_window"
},
"metric" : {
"$ref" : "#/components/schemas/MetricId"
},
"aggregates" : {
"maxItems" : 0,
"minItems" : 0,
"type" : "array",
"items" : { }
},
"resources" : {
"maxItems" : 1,
"minItems" : 1,
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/ResourceId"
}
},
"maxResults" : {
"minimum" : 0,
"type" : "integer"
},
"filter" : {
"$ref" : "#/components/schemas/TimeseriesFilter"
},
"order" : {
"$ref" : "#/components/schemas/Order"
}
}
}
""",
object_hook=with_example_provider,
)
MODEL_DEFINITIONS.update({
"SeriesQueryWithoutAggregatesRequest": _series_query_without_aggregates_request_model_schema
})

_ttl_duration_model_schema = json.loads(
r"""{
"description" : "Specifies the duration of a TTL interval.",
Expand Down
2 changes: 1 addition & 1 deletion test/types/aggregate_stub.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def create_instance(cls) -> "Aggregate":
if not MODELS_AVAILABLE:
raise ImportError("Models must be installed to create class stubs")
json = cls.create_json()
if not json:
if json is None:
# use backup example based on the pydantic model schema
backup_faker = JSF(AggregateAdapter.json_schema(), allow_none_optionals=1)
json = backup_faker.generate(use_defaults=True, use_examples=True)
Expand Down
2 changes: 1 addition & 1 deletion test/types/delete_messages200_response_stub.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def create_instance(cls) -> "DeleteMessages200Response":
if not MODELS_AVAILABLE:
raise ImportError("Models must be installed to create class stubs")
json = cls.create_json()
if not json:
if json is None:
# use backup example based on the pydantic model schema
backup_faker = JSF(
DeleteMessages200ResponseAdapter.json_schema(), allow_none_optionals=1
Expand Down
Loading

0 comments on commit da9333d

Please sign in to comment.