Skip to content

Commit

Permalink
update openapi-client
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelmattig committed Nov 21, 2024
1 parent c997933 commit 09dcfc8
Show file tree
Hide file tree
Showing 9 changed files with 70 additions and 33 deletions.
12 changes: 8 additions & 4 deletions .generation/input/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -7458,17 +7458,21 @@
"OperatorQuota": {
"type": "object",
"required": [
"operatorPath",
"bla",
"blub",
"count"
],
"properties": {
"bla": {
"type": "string"
},
"blub": {
"type": "string"
},
"count": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"operatorPath": {
"type": "string"
}
}
},
Expand Down
10 changes: 6 additions & 4 deletions python/geoengine_openapi_client/models/operator_quota.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ class OperatorQuota(BaseModel):
"""
OperatorQuota
"""
bla: StrictStr = Field(...)
blub: StrictStr = Field(...)
count: conint(strict=True, ge=0) = Field(...)
operator_path: StrictStr = Field(..., alias="operatorPath")
__properties = ["count", "operatorPath"]
__properties = ["bla", "blub", "count"]

class Config:
"""Pydantic configuration"""
Expand Down Expand Up @@ -66,8 +67,9 @@ def from_dict(cls, obj: dict) -> OperatorQuota:
return OperatorQuota.parse_obj(obj)

_obj = OperatorQuota.parse_obj({
"count": obj.get("count"),
"operator_path": obj.get("operatorPath")
"bla": obj.get("bla"),
"blub": obj.get("blub"),
"count": obj.get("count")
})
return _obj

Expand Down
10 changes: 6 additions & 4 deletions python/test/test_computation_quota.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ def make_instance(self, include_optional) -> ComputationQuota:
computation_id = '',
operators = [
geoengine_openapi_client.models.operator_quota.OperatorQuota(
count = 0,
operator_path = '', )
bla = '',
blub = '',
count = 0, )
],
timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
workflow_id = ''
Expand All @@ -51,8 +52,9 @@ def make_instance(self, include_optional) -> ComputationQuota:
computation_id = '',
operators = [
geoengine_openapi_client.models.operator_quota.OperatorQuota(
count = 0,
operator_path = '', )
bla = '',
blub = '',
count = 0, )
],
timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
workflow_id = '',
Expand Down
8 changes: 5 additions & 3 deletions python/test/test_operator_quota.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,15 @@ def make_instance(self, include_optional) -> OperatorQuota:
model = OperatorQuota() # noqa: E501
if include_optional:
return OperatorQuota(
count = 0,
operator_path = ''
bla = '',
blub = '',
count = 0
)
else:
return OperatorQuota(
bla = '',
blub = '',
count = 0,
operator_path = '',
)
"""

Expand Down
12 changes: 9 additions & 3 deletions typescript/dist/esm/models/OperatorQuota.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,22 @@
export interface OperatorQuota {
/**
*
* @type {number}
* @type {string}
* @memberof OperatorQuota
*/
count: number;
bla: string;
/**
*
* @type {string}
* @memberof OperatorQuota
*/
operatorPath: string;
blub: string;
/**
*
* @type {number}
* @memberof OperatorQuota
*/
count: number;
}
/**
* Check if a given object implements the OperatorQuota interface.
Expand Down
9 changes: 6 additions & 3 deletions typescript/dist/esm/models/OperatorQuota.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
*/
export function instanceOfOperatorQuota(value) {
let isInstance = true;
isInstance = isInstance && "bla" in value;
isInstance = isInstance && "blub" in value;
isInstance = isInstance && "count" in value;
isInstance = isInstance && "operatorPath" in value;
return isInstance;
}
export function OperatorQuotaFromJSON(json) {
Expand All @@ -28,8 +29,9 @@ export function OperatorQuotaFromJSONTyped(json, ignoreDiscriminator) {
return json;
}
return {
'bla': json['bla'],
'blub': json['blub'],
'count': json['count'],
'operatorPath': json['operatorPath'],
};
}
export function OperatorQuotaToJSON(value) {
Expand All @@ -40,7 +42,8 @@ export function OperatorQuotaToJSON(value) {
return null;
}
return {
'bla': value.bla,
'blub': value.blub,
'count': value.count,
'operatorPath': value.operatorPath,
};
}
12 changes: 9 additions & 3 deletions typescript/dist/models/OperatorQuota.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,22 @@
export interface OperatorQuota {
/**
*
* @type {number}
* @type {string}
* @memberof OperatorQuota
*/
count: number;
bla: string;
/**
*
* @type {string}
* @memberof OperatorQuota
*/
operatorPath: string;
blub: string;
/**
*
* @type {number}
* @memberof OperatorQuota
*/
count: number;
}
/**
* Check if a given object implements the OperatorQuota interface.
Expand Down
9 changes: 6 additions & 3 deletions typescript/dist/models/OperatorQuota.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ exports.OperatorQuotaToJSON = exports.OperatorQuotaFromJSONTyped = exports.Opera
*/
function instanceOfOperatorQuota(value) {
let isInstance = true;
isInstance = isInstance && "bla" in value;
isInstance = isInstance && "blub" in value;
isInstance = isInstance && "count" in value;
isInstance = isInstance && "operatorPath" in value;
return isInstance;
}
exports.instanceOfOperatorQuota = instanceOfOperatorQuota;
Expand All @@ -33,8 +34,9 @@ function OperatorQuotaFromJSONTyped(json, ignoreDiscriminator) {
return json;
}
return {
'bla': json['bla'],
'blub': json['blub'],
'count': json['count'],
'operatorPath': json['operatorPath'],
};
}
exports.OperatorQuotaFromJSONTyped = OperatorQuotaFromJSONTyped;
Expand All @@ -46,8 +48,9 @@ function OperatorQuotaToJSON(value) {
return null;
}
return {
'bla': value.bla,
'blub': value.blub,
'count': value.count,
'operatorPath': value.operatorPath,
};
}
exports.OperatorQuotaToJSON = OperatorQuotaToJSON;
21 changes: 15 additions & 6 deletions typescript/src/models/OperatorQuota.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,32 @@ import { exists, mapValues } from '../runtime';
export interface OperatorQuota {
/**
*
* @type {number}
* @type {string}
* @memberof OperatorQuota
*/
count: number;
bla: string;
/**
*
* @type {string}
* @memberof OperatorQuota
*/
operatorPath: string;
blub: string;
/**
*
* @type {number}
* @memberof OperatorQuota
*/
count: number;
}

/**
* Check if a given object implements the OperatorQuota interface.
*/
export function instanceOfOperatorQuota(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "bla" in value;
isInstance = isInstance && "blub" in value;
isInstance = isInstance && "count" in value;
isInstance = isInstance && "operatorPath" in value;

return isInstance;
}
Expand All @@ -54,8 +61,9 @@ export function OperatorQuotaFromJSONTyped(json: any, ignoreDiscriminator: boole
}
return {

'bla': json['bla'],
'blub': json['blub'],
'count': json['count'],
'operatorPath': json['operatorPath'],
};
}

Expand All @@ -68,8 +76,9 @@ export function OperatorQuotaToJSON(value?: OperatorQuota | null): any {
}
return {

'bla': value.bla,
'blub': value.blub,
'count': value.count,
'operatorPath': value.operatorPath,
};
}

0 comments on commit 09dcfc8

Please sign in to comment.