Skip to content

Commit

Permalink
update openapi-client
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelmattig committed Mar 13, 2024
1 parent 5ad35f0 commit 70863d3
Show file tree
Hide file tree
Showing 11 changed files with 53 additions and 12 deletions.
12 changes: 9 additions & 3 deletions .generation/input/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"email": "dev@geoengine.de"
},
"license": {
"name": "Apache 2.0 (pro features excluded)",
"name": "Apache-2.0",
"url": "https://github.com/geo-engine/geoengine/blob/main/LICENSE"
},
"version": "0.8.0"
Expand Down Expand Up @@ -653,7 +653,6 @@
}
],
"requestBody": {
"description": "",
"content": {
"application/json": {
"schema": {
Expand Down Expand Up @@ -9127,7 +9126,8 @@
"required": [
"name",
"display_name",
"description"
"description",
"tags"
],
"properties": {
"description": {
Expand All @@ -9138,6 +9138,12 @@
},
"name": {
"$ref": "#/components/schemas/DatasetName"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
Expand Down
4 changes: 2 additions & 2 deletions python/geoengine_openapi_client/api/datasets_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1258,7 +1258,7 @@ def update_dataset_handler(self, dataset : Annotated[StrictStr, Field(..., descr
:param dataset: Dataset Name (required)
:type dataset: str
:param update_dataset: (required)
:param update_dataset: (required)
:type update_dataset: UpdateDataset
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
Expand Down Expand Up @@ -1290,7 +1290,7 @@ def update_dataset_handler_with_http_info(self, dataset : Annotated[StrictStr, F
:param dataset: Dataset Name (required)
:type dataset: str
:param update_dataset: (required)
:param update_dataset: (required)
:type update_dataset: UpdateDataset
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
Expand Down
10 changes: 6 additions & 4 deletions python/geoengine_openapi_client/models/update_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
import json



from pydantic import BaseModel, Field, StrictStr
from typing import List
from pydantic import BaseModel, Field, StrictStr, conlist

class UpdateDataset(BaseModel):
"""
Expand All @@ -29,7 +29,8 @@ class UpdateDataset(BaseModel):
description: StrictStr = Field(...)
display_name: StrictStr = Field(...)
name: StrictStr = Field(...)
__properties = ["description", "display_name", "name"]
tags: conlist(StrictStr) = Field(...)
__properties = ["description", "display_name", "name", "tags"]

class Config:
"""Pydantic configuration"""
Expand Down Expand Up @@ -69,7 +70,8 @@ def from_dict(cls, obj: dict) -> UpdateDataset:
_obj = UpdateDataset.parse_obj({
"description": obj.get("description"),
"display_name": obj.get("display_name"),
"name": obj.get("name")
"name": obj.get("name"),
"tags": obj.get("tags")
})
return _obj

Expand Down
2 changes: 1 addition & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "geoengine_openapi_client"
version = "0.0.8"
description = "Geo Engine Pro API"
authors = ["Geo Engine Developers <dev@geoengine.de>"]
license = "Apache 2.0 (pro features excluded)"
license = "Apache-2.0"
readme = "README.md"
repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID"
keywords = ["OpenAPI", "OpenAPI-Generator", "Geo Engine Pro API"]
Expand Down
2 changes: 1 addition & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
install_requires=REQUIRES,
packages=find_packages(exclude=["test", "tests"]),
include_package_data=True,
license="Apache 2.0 (pro features excluded)",
license="Apache-2.0",
long_description_content_type='text/markdown',
long_description="""\
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
Expand Down
8 changes: 7 additions & 1 deletion python/test/test_update_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,19 @@ def make_instance(self, include_optional) -> UpdateDataset:
return UpdateDataset(
description = '',
display_name = '',
name = ''
name = '',
tags = [
''
]
)
else:
return UpdateDataset(
description = '',
display_name = '',
name = '',
tags = [
''
],
)
"""

Expand Down
6 changes: 6 additions & 0 deletions typescript/dist/esm/models/UpdateDataset.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ export interface UpdateDataset {
* @memberof UpdateDataset
*/
name: string;
/**
*
* @type {Array<string>}
* @memberof UpdateDataset
*/
tags: Array<string>;
}
/**
* Check if a given object implements the UpdateDataset interface.
Expand Down
3 changes: 3 additions & 0 deletions typescript/dist/esm/models/UpdateDataset.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export function instanceOfUpdateDataset(value) {
isInstance = isInstance && "description" in value;
isInstance = isInstance && "displayName" in value;
isInstance = isInstance && "name" in value;
isInstance = isInstance && "tags" in value;
return isInstance;
}
export function UpdateDatasetFromJSON(json) {
Expand All @@ -32,6 +33,7 @@ export function UpdateDatasetFromJSONTyped(json, ignoreDiscriminator) {
'description': json['description'],
'displayName': json['display_name'],
'name': json['name'],
'tags': json['tags'],
};
}
export function UpdateDatasetToJSON(value) {
Expand All @@ -45,5 +47,6 @@ export function UpdateDatasetToJSON(value) {
'description': value.description,
'display_name': value.displayName,
'name': value.name,
'tags': value.tags,
};
}
6 changes: 6 additions & 0 deletions typescript/dist/models/UpdateDataset.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ export interface UpdateDataset {
* @memberof UpdateDataset
*/
name: string;
/**
*
* @type {Array<string>}
* @memberof UpdateDataset
*/
tags: Array<string>;
}
/**
* Check if a given object implements the UpdateDataset interface.
Expand Down
3 changes: 3 additions & 0 deletions typescript/dist/models/UpdateDataset.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ function instanceOfUpdateDataset(value) {
isInstance = isInstance && "description" in value;
isInstance = isInstance && "displayName" in value;
isInstance = isInstance && "name" in value;
isInstance = isInstance && "tags" in value;
return isInstance;
}
exports.instanceOfUpdateDataset = instanceOfUpdateDataset;
Expand All @@ -37,6 +38,7 @@ function UpdateDatasetFromJSONTyped(json, ignoreDiscriminator) {
'description': json['description'],
'displayName': json['display_name'],
'name': json['name'],
'tags': json['tags'],
};
}
exports.UpdateDatasetFromJSONTyped = UpdateDatasetFromJSONTyped;
Expand All @@ -51,6 +53,7 @@ function UpdateDatasetToJSON(value) {
'description': value.description,
'display_name': value.displayName,
'name': value.name,
'tags': value.tags,
};
}
exports.UpdateDatasetToJSON = UpdateDatasetToJSON;
9 changes: 9 additions & 0 deletions typescript/src/models/UpdateDataset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ export interface UpdateDataset {
* @memberof UpdateDataset
*/
name: string;
/**
*
* @type {Array<string>}
* @memberof UpdateDataset
*/
tags: Array<string>;
}

/**
Expand All @@ -47,6 +53,7 @@ export function instanceOfUpdateDataset(value: object): boolean {
isInstance = isInstance && "description" in value;
isInstance = isInstance && "displayName" in value;
isInstance = isInstance && "name" in value;
isInstance = isInstance && "tags" in value;

return isInstance;
}
Expand All @@ -64,6 +71,7 @@ export function UpdateDatasetFromJSONTyped(json: any, ignoreDiscriminator: boole
'description': json['description'],
'displayName': json['display_name'],
'name': json['name'],
'tags': json['tags'],
};
}

Expand All @@ -79,6 +87,7 @@ export function UpdateDatasetToJSON(value?: UpdateDataset | null): any {
'description': value.description,
'display_name': value.displayName,
'name': value.name,
'tags': value.tags,
};
}

0 comments on commit 70863d3

Please sign in to comment.