Skip to content

Commit 053e071

Browse files
committed
Refactor geometry handling in GetCampaignResponse and related models to use a generic object type instead of a specific geometry schema. Update version in pyproject.toml to 0.1.4 and remove references to GetCampaignResponseGeometry in documentation and model definitions.
1 parent 15fa2ba commit 053e071

20 files changed

+370
-206
lines changed

.openapi-generator/FILES

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ docs/Coordinates.md
1414
docs/GeometryCollection.md
1515
docs/GeometryCollectionGeometriesInner.md
1616
docs/GetCampaignResponse.md
17-
docs/GetCampaignResponseGeometry.md
1817
docs/GetSensorResponse.md
1918
docs/GetStationResponse.md
2019
docs/HTTPValidationError.md
@@ -94,7 +93,6 @@ upstream_api_client/models/coordinates.py
9493
upstream_api_client/models/geometry_collection.py
9594
upstream_api_client/models/geometry_collection_geometries_inner.py
9695
upstream_api_client/models/get_campaign_response.py
97-
upstream_api_client/models/get_campaign_response_geometry.py
9896
upstream_api_client/models/get_sensor_response.py
9997
upstream_api_client/models/get_station_response.py
10098
upstream_api_client/models/http_validation_error.py

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ Class | Method | HTTP request | Description
131131
- [GeometryCollection](docs/GeometryCollection.md)
132132
- [GeometryCollectionGeometriesInner](docs/GeometryCollectionGeometriesInner.md)
133133
- [GetCampaignResponse](docs/GetCampaignResponse.md)
134-
- [GetCampaignResponseGeometry](docs/GetCampaignResponseGeometry.md)
135134
- [GetSensorResponse](docs/GetSensorResponse.md)
136135
- [GetStationResponse](docs/GetStationResponse.md)
137136
- [HTTPValidationError](docs/HTTPValidationError.md)

docs/GetCampaignResponse.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Name | Type | Description | Notes
1515
**allocation** | **str** | |
1616
**location** | [**Location**](Location.md) | | [optional]
1717
**summary** | [**SummaryGetCampaign**](SummaryGetCampaign.md) | |
18-
**geometry** | [**GetCampaignResponseGeometry**](GetCampaignResponseGeometry.md) | | [optional]
18+
**geometry** | **object** | | [optional]
1919
**stations** | [**List[StationsListResponseItem]**](StationsListResponseItem.md) | | [optional] [default to []]
2020

2121
## Example

docs/GetStationResponse.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Name | Type | Description | Notes
1212
**contact_email** | **str** | | [optional]
1313
**active** | **bool** | | [optional]
1414
**start_date** | **datetime** | | [optional]
15-
**geometry** | [**GetCampaignResponseGeometry**](GetCampaignResponseGeometry.md) | | [optional]
15+
**geometry** | **object** | | [optional]
1616
**sensors** | [**List[SensorItem]**](SensorItem.md) | | [optional]
1717

1818
## Example

docs/GetStationResponseGeometry.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# GetStationResponseGeometry
2+
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**bbox** | [**Bbox**](Bbox.md) | | [optional]
9+
**type** | **str** | |
10+
**coordinates** | **List[List[List[LineStringCoordinatesInner]]]** | |
11+
**geometries** | [**List[GeometryCollectionGeometriesInner]**](GeometryCollectionGeometriesInner.md) | |
12+
13+
## Example
14+
15+
```python
16+
from upstream_api_client.models.get_station_response_geometry import GetStationResponseGeometry
17+
18+
# TODO update the JSON string below
19+
json = "{}"
20+
# create an instance of GetStationResponseGeometry from a JSON string
21+
get_station_response_geometry_instance = GetStationResponseGeometry.from_json(json)
22+
# print the JSON string representation of the object
23+
print(GetStationResponseGeometry.to_json())
24+
25+
# convert the object into a dict
26+
get_station_response_geometry_dict = get_station_response_geometry_instance.to_dict()
27+
# create an instance of GetStationResponseGeometry from a dict
28+
get_station_response_geometry_from_dict = GetStationResponseGeometry.from_dict(get_station_response_geometry_dict)
29+
```
30+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
31+
32+

docs/ListCampaignsResponseItem.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Name | Type | Description | Notes
1515
**end_date** | **datetime** | | [optional]
1616
**allocation** | **str** | | [optional]
1717
**summary** | [**SummaryListCampaigns**](SummaryListCampaigns.md) | |
18-
**geometry** | [**GetCampaignResponseGeometry**](GetCampaignResponseGeometry.md) | | [optional]
18+
**geometry** | **object** | | [optional]
1919

2020
## Example
2121

docs/StationItemWithSummary.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Name | Type | Description | Notes
1212
**contact_email** | **str** | | [optional]
1313
**active** | **bool** | | [optional]
1414
**start_date** | **datetime** | | [optional]
15-
**geometry** | [**GetCampaignResponseGeometry**](GetCampaignResponseGeometry.md) | | [optional]
15+
**geometry** | **object** | | [optional]
1616
**sensor_count** | **int** | |
1717
**sensor_types** | **List[str]** | |
1818
**sensor_variables** | **List[str]** | |

docs/StationsListResponseItem.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Name | Type | Description | Notes
1212
**contact_email** | **str** | | [optional]
1313
**active** | **bool** | | [optional]
1414
**start_date** | **datetime** | |
15-
**geometry** | [**GetCampaignResponseGeometry**](GetCampaignResponseGeometry.md) | | [optional]
15+
**geometry** | **object** | | [optional]
1616
**sensors** | [**List[SensorSummaryForStations]**](SensorSummaryForStations.md) | | [optional] [default to []]
1717

1818
## Example

openapi.json

Lines changed: 5 additions & 130 deletions
Original file line numberDiff line numberDiff line change
@@ -1766,32 +1766,7 @@
17661766
},
17671767
"summary": { "$ref": "#/components/schemas/SummaryGetCampaign" },
17681768
"geometry": {
1769-
"anyOf": [
1770-
{
1771-
"oneOf": [
1772-
{ "$ref": "#/components/schemas/Point" },
1773-
{ "$ref": "#/components/schemas/MultiPoint" },
1774-
{ "$ref": "#/components/schemas/LineString" },
1775-
{ "$ref": "#/components/schemas/MultiLineString" },
1776-
{ "$ref": "#/components/schemas/Polygon" },
1777-
{ "$ref": "#/components/schemas/MultiPolygon" },
1778-
{ "$ref": "#/components/schemas/GeometryCollection" }
1779-
],
1780-
"discriminator": {
1781-
"propertyName": "type",
1782-
"mapping": {
1783-
"GeometryCollection": "#/components/schemas/GeometryCollection",
1784-
"LineString": "#/components/schemas/LineString",
1785-
"MultiLineString": "#/components/schemas/MultiLineString",
1786-
"MultiPoint": "#/components/schemas/MultiPoint",
1787-
"MultiPolygon": "#/components/schemas/MultiPolygon",
1788-
"Point": "#/components/schemas/Point",
1789-
"Polygon": "#/components/schemas/Polygon"
1790-
}
1791-
}
1792-
},
1793-
{ "type": "null" }
1794-
],
1769+
"type": "object",
17951770
"title": "Geometry"
17961771
},
17971772
"stations": {
@@ -1874,32 +1849,7 @@
18741849
"title": "Start Date"
18751850
},
18761851
"geometry": {
1877-
"anyOf": [
1878-
{
1879-
"oneOf": [
1880-
{ "$ref": "#/components/schemas/Point" },
1881-
{ "$ref": "#/components/schemas/MultiPoint" },
1882-
{ "$ref": "#/components/schemas/LineString" },
1883-
{ "$ref": "#/components/schemas/MultiLineString" },
1884-
{ "$ref": "#/components/schemas/Polygon" },
1885-
{ "$ref": "#/components/schemas/MultiPolygon" },
1886-
{ "$ref": "#/components/schemas/GeometryCollection" }
1887-
],
1888-
"discriminator": {
1889-
"propertyName": "type",
1890-
"mapping": {
1891-
"GeometryCollection": "#/components/schemas/GeometryCollection",
1892-
"LineString": "#/components/schemas/LineString",
1893-
"MultiLineString": "#/components/schemas/MultiLineString",
1894-
"MultiPoint": "#/components/schemas/MultiPoint",
1895-
"MultiPolygon": "#/components/schemas/MultiPolygon",
1896-
"Point": "#/components/schemas/Point",
1897-
"Polygon": "#/components/schemas/Polygon"
1898-
}
1899-
}
1900-
},
1901-
{ "type": "null" }
1902-
],
1852+
"type": "object",
19031853
"title": "Geometry"
19041854
},
19051855
"sensors": {
@@ -2020,32 +1970,7 @@
20201970
},
20211971
"summary": { "$ref": "#/components/schemas/SummaryListCampaigns" },
20221972
"geometry": {
2023-
"anyOf": [
2024-
{
2025-
"oneOf": [
2026-
{ "$ref": "#/components/schemas/Point" },
2027-
{ "$ref": "#/components/schemas/MultiPoint" },
2028-
{ "$ref": "#/components/schemas/LineString" },
2029-
{ "$ref": "#/components/schemas/MultiLineString" },
2030-
{ "$ref": "#/components/schemas/Polygon" },
2031-
{ "$ref": "#/components/schemas/MultiPolygon" },
2032-
{ "$ref": "#/components/schemas/GeometryCollection" }
2033-
],
2034-
"discriminator": {
2035-
"propertyName": "type",
2036-
"mapping": {
2037-
"GeometryCollection": "#/components/schemas/GeometryCollection",
2038-
"LineString": "#/components/schemas/LineString",
2039-
"MultiLineString": "#/components/schemas/MultiLineString",
2040-
"MultiPoint": "#/components/schemas/MultiPoint",
2041-
"MultiPolygon": "#/components/schemas/MultiPolygon",
2042-
"Point": "#/components/schemas/Point",
2043-
"Polygon": "#/components/schemas/Polygon"
2044-
}
2045-
}
2046-
},
2047-
{ "type": "null" }
2048-
],
1973+
"type": "object",
20491974
"title": "Geometry"
20501975
}
20511976
},
@@ -2980,32 +2905,7 @@
29802905
"title": "Start Date"
29812906
},
29822907
"geometry": {
2983-
"anyOf": [
2984-
{
2985-
"oneOf": [
2986-
{ "$ref": "#/components/schemas/Point" },
2987-
{ "$ref": "#/components/schemas/MultiPoint" },
2988-
{ "$ref": "#/components/schemas/LineString" },
2989-
{ "$ref": "#/components/schemas/MultiLineString" },
2990-
{ "$ref": "#/components/schemas/Polygon" },
2991-
{ "$ref": "#/components/schemas/MultiPolygon" },
2992-
{ "$ref": "#/components/schemas/GeometryCollection" }
2993-
],
2994-
"discriminator": {
2995-
"propertyName": "type",
2996-
"mapping": {
2997-
"GeometryCollection": "#/components/schemas/GeometryCollection",
2998-
"LineString": "#/components/schemas/LineString",
2999-
"MultiLineString": "#/components/schemas/MultiLineString",
3000-
"MultiPoint": "#/components/schemas/MultiPoint",
3001-
"MultiPolygon": "#/components/schemas/MultiPolygon",
3002-
"Point": "#/components/schemas/Point",
3003-
"Polygon": "#/components/schemas/Polygon"
3004-
}
3005-
}
3006-
},
3007-
{ "type": "null" }
3008-
],
2908+
"type": "object",
30092909
"title": "Geometry"
30102910
},
30112911
"sensor_count": { "type": "integer", "title": "Sensor Count" },
@@ -3100,32 +3000,7 @@
31003000
"title": "Start Date"
31013001
},
31023002
"geometry": {
3103-
"anyOf": [
3104-
{
3105-
"oneOf": [
3106-
{ "$ref": "#/components/schemas/Point" },
3107-
{ "$ref": "#/components/schemas/MultiPoint" },
3108-
{ "$ref": "#/components/schemas/LineString" },
3109-
{ "$ref": "#/components/schemas/MultiLineString" },
3110-
{ "$ref": "#/components/schemas/Polygon" },
3111-
{ "$ref": "#/components/schemas/MultiPolygon" },
3112-
{ "$ref": "#/components/schemas/GeometryCollection" }
3113-
],
3114-
"discriminator": {
3115-
"propertyName": "type",
3116-
"mapping": {
3117-
"GeometryCollection": "#/components/schemas/GeometryCollection",
3118-
"LineString": "#/components/schemas/LineString",
3119-
"MultiLineString": "#/components/schemas/MultiLineString",
3120-
"MultiPoint": "#/components/schemas/MultiPoint",
3121-
"MultiPolygon": "#/components/schemas/MultiPolygon",
3122-
"Point": "#/components/schemas/Point",
3123-
"Polygon": "#/components/schemas/Polygon"
3124-
}
3125-
}
3126-
},
3127-
{ "type": "null" }
3128-
],
3003+
"type": "object",
31293004
"title": "Geometry"
31303005
},
31313006
"sensors": {

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "upstream_api_client"
3-
version = "0.1.0"
3+
version = "0.1.4"
44
description = "Upstream Sensor Storage"
55
authors = [
66
{name = "Will Mobley",email = "wmobley@tacc.utexas.edu"},

0 commit comments

Comments
 (0)