Skip to content

Commit

Permalink
Merge pull request #12 from blues/feat-openapi-update
Browse files Browse the repository at this point in the history
feat: update query params for Events API and Route API
  • Loading branch information
paigen11 authored Aug 26, 2024
2 parents b8ae245 + 828ffb8 commit 2926b0e
Show file tree
Hide file tree
Showing 19 changed files with 434 additions and 199 deletions.
2 changes: 1 addition & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"packageName": "notehub_py",
"packageUrl": "https://github.com/blues/notehub-py",
"projectName": "notehub-py",
"packageVersion": "1.0.0"
"packageVersion": "1.0.1"
}
103 changes: 102 additions & 1 deletion openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1167,6 +1167,13 @@ paths:
- $ref: "#/components/parameters/endDateParam"
- $ref: "#/components/parameters/systemFilesOnlyParam"
- $ref: "#/components/parameters/filesQueryParam"
- $ref: "#/components/parameters/formatParam"
- $ref: "#/components/parameters/serialNumberFilterParam"
- $ref: "#/components/parameters/fleetUIDFilterQueryParam"
- $ref: "#/components/parameters/sessionUIDFilterParam"
- $ref: "#/components/parameters/eventUIDFilterQueryParam"
- $ref: "#/components/parameters/selectFieldsParam"

- name: deviceUIDs
description: Deprecated.
in: query
Expand Down Expand Up @@ -1253,6 +1260,12 @@ paths:
- $ref: "#/components/parameters/endDateParam"
- $ref: "#/components/parameters/systemFilesOnlyParam"
- $ref: "#/components/parameters/filesQueryParam"
- $ref: "#/components/parameters/formatParam"
- $ref: "#/components/parameters/serialNumberFilterParam"
- $ref: "#/components/parameters/fleetUIDFilterQueryParam"
- $ref: "#/components/parameters/sessionUIDFilterParam"
- $ref: "#/components/parameters/eventUIDFilterQueryParam"
- $ref: "#/components/parameters/selectFieldsParam"
- name: deviceUIDs
description: Deprecated.
in: query
Expand Down Expand Up @@ -2223,6 +2236,7 @@ components:
schema:
type: integer
minimum: 1
maximum: 10000
default: 50

pageNumParam:
Expand All @@ -2240,7 +2254,11 @@ components:
in: query
required: false
schema:
type: string
type: array
items:
type: string
style: form
explode: true

deviceUIDsParamQuery:
name: deviceUIDs
Expand Down Expand Up @@ -2345,6 +2363,72 @@ components:
type: string
example: _health.qo, data.qo

formatParam:
name: format
in: query
required: false
schema:
type: string
enum: [json, csv]
default: json
description: Response format (JSON or CSV)

serialNumberFilterParam:
name: serialNumber
in: query
required: false
schema:
type: array
items:
type: string
style: form
explode: true
description: Filter by Serial Number

fleetUIDFilterQueryParam:
name: fleetUID
in: query
required: false
schema:
type: array
items:
type: string
style: form
explode: true
description: Filter by Fleet UID

sessionUIDFilterParam:
name: sessionUID
in: query
required: false
schema:
type: array
items:
type: string
style: form
explode: true
description: Filter by Session UID

eventUIDFilterQueryParam:
name: eventUID
in: query
required: false
schema:
type: array
items:
type: string
style: form
explode: true
description: Filter by Event UID

selectFieldsParam:
name: selectFields
in: query
required: false
schema:
type: string
description: Comma-separated list of fields to select from JSON payload (e.g., "field1,field2.subfield,field3"), this will reflect the columns in the CSV output.

filenameQueryParam:
name: filename
in: query
Expand Down Expand Up @@ -2419,6 +2503,11 @@ components:

EventsResponse:
description: The response body from a GET events request.
headers:
X-Has-More:
description: True if there are more events
schema:
type: boolean
content:
application/json:
schema:
Expand All @@ -2431,6 +2520,9 @@ components:
has_more:
type: boolean
description: True if there are more events
through:
type: string
description: The UID of the last event returned
required:
- events
- has_more
Expand Down Expand Up @@ -2469,6 +2561,15 @@ components:
tri_timezone: America/New_York
tri_points: 6
has_more: true
text/csv:
schema:
type: string
format: binary
example: |
eventUID,deviceUID,when,best_location_type,best_lat,best_lon,body.temperature,body.humidity
e123456-7890-abcd-ef01-234567890abc,dev:000000000000001,1625097600,gps,37.7749,-122.4194,22.5,45.2
f234567-8901-bcde-fg12-345678901bcd,dev:000000000000002,1625097660,triangulated,40.7128,-74.0060,24.3,48.7
g345678-9012-cdef-gh23-456789012cde,dev:000000000000003,1625097720,tower,51.5074,-0.1278,20.1,52.9
EventsByCursorResponse:
description: The response body from a GET events by cursor request.
Expand Down
96 changes: 0 additions & 96 deletions src/.openapi-generator/FILES
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.github/workflows/python.yml
.gitignore
.gitlab-ci.yml
.openapi-generator-ignore
.travis.yml
README.md
docs/Alert.md
Expand Down Expand Up @@ -210,99 +209,4 @@ setup.cfg
setup.py
test-requirements.txt
test/__init__.py
test/test_alert.py
test/test_alert_api.py
test/test_alert_data_inner.py
test/test_alert_notifications_inner.py
test/test_authorization_api.py
test/test_aws.py
test/test_azure.py
test/test_billing_account.py
test/test_billing_account_api.py
test/test_billing_account_role.py
test/test_body.py
test/test_clone_project_request.py
test/test_contact.py
test/test_create_fleet_request.py
test/test_create_monitor.py
test/test_create_product_request.py
test/test_create_project_request.py
test/test_delete_device_fleets_request.py
test/test_device.py
test/test_device_api.py
test/test_device_session.py
test/test_device_tower_info.py
test/test_device_usage.py
test/test_dfu_env.py
test/test_dfu_state.py
test/test_email_notification.py
test/test_environment_variables.py
test/test_error.py
test/test_event.py
test/test_event_api.py
test/test_firmware_info.py
test/test_firmware_status.py
test/test_fleet.py
test/test_get_alerts200_response.py
test/test_get_billing_accounts200_response.py
test/test_get_device_environment_variables200_response.py
test/test_get_device_health_log200_response.py
test/test_get_device_health_log200_response_health_log_inner.py
test/test_get_device_latest200_response.py
test/test_get_device_public_key200_response.py
test/test_get_device_sessions200_response.py
test/test_get_project_device_public_keys200_response.py
test/test_get_project_device_public_keys200_response_device_public_keys_inner.py
test/test_get_project_devices200_response.py
test/test_get_project_events200_response.py
test/test_get_project_events_by_cursor200_response.py
test/test_get_project_fleets200_response.py
test/test_get_project_members200_response.py
test/test_get_project_products200_response.py
test/test_get_projects200_response.py
test/test_get_route_logs_by_route200_response_inner.py
test/test_google.py
test/test_handle_note_changes200_response.py
test/test_handle_note_get200_response.py
test/test_handle_note_signal200_response.py
test/test_handle_notefile_changes200_response.py
test/test_handle_notefile_changes_pending200_response.py
test/test_handle_notefile_delete_request.py
test/test_http.py
test/test_http_filter.py
test/test_http_transform.py
test/test_location.py
test/test_login200_response.py
test/test_login_request.py
test/test_monitor.py
test/test_monitor_alert_routes_inner.py
test/test_monitor_api.py
test/test_mqtt.py
test/test_note.py
test/test_ota_status.py
test/test_ota_status_list.py
test/test_ota_update_request.py
test/test_ota_update_status.py
test/test_post_provision_project_device_request.py
test/test_product.py
test/test_project.py
test/test_project_api.py
test/test_project_member.py
test/test_proxy.py
test/test_put_device_fleets_request.py
test/test_radresponder.py
test/test_role.py
test/test_route.py
test/test_route_api.py
test/test_route_schema.py
test/test_slack.py
test/test_slack_bearer_notification.py
test/test_slack_web_hook_notification.py
test/test_snowflake.py
test/test_snowflake_transform.py
test/test_thingworx.py
test/test_tower_location.py
test/test_twilio.py
test/test_update_fleet_request.py
test/test_user_db_route.py
tox.ini
2 changes: 1 addition & 1 deletion src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API.
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 1.1.0
- Package version: 1.0.0
- Package version: 1.0.1
- Generator version: 7.5.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
For more information, please visit [https://dev.blues.io/support/](https://dev.blues.io/support/)
Expand Down
Loading

0 comments on commit 2926b0e

Please sign in to comment.