Skip to content

Commit 2309964

Browse files
committed
begin to make api compatible
1 parent 6835b73 commit 2309964

File tree

2 files changed

+5
-5
lines changed
  • packages/models-library/src/models_library/api_schemas_webserver
  • services/api-server/src/simcore_service_api_server/models/schemas

2 files changed

+5
-5
lines changed

packages/models-library/src/models_library/api_schemas_webserver/product.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ class GetCreditPrice(OutputSchema):
2222
usd_per_credit: Annotated[
2323
NonNegativeDecimal,
2424
PlainSerializer(float, return_type=NonNegativeFloat, when_used="json"),
25-
] | None = Field(
25+
] = Field(
2626
...,
2727
description="Price of a credit in USD. "
2828
"If None, then this product's price is UNDEFINED",
2929
)
30-
min_payment_amount_usd: NonNegativeInt | None = Field(
30+
min_payment_amount_usd: NonNegativeInt = Field(
3131
...,
3232
description="Minimum amount (included) in USD that can be paid for this product"
3333
"Can be None if this product's price is UNDEFINED",

services/api-server/src/simcore_service_api_server/models/schemas/files.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,17 @@ class File(BaseModel):
4646
id: UUID = Field(..., description="Resource identifier") # noqa: A003
4747

4848
filename: str = Field(..., description="Name of the file with extension")
49-
content_type: str | None = Field(
49+
content_type: str = Field(
5050
default=None,
5151
description="Guess of type content [EXPERIMENTAL]",
5252
validate_default=True,
5353
)
54-
sha256_checksum: SHA256Str | None = Field(
54+
sha256_checksum: SHA256Str = Field(
5555
default=None,
5656
description="SHA256 hash of the file's content",
5757
alias="checksum", # alias for backwards compatibility
5858
)
59-
e_tag: ETag | None = Field(default=None, description="S3 entity tag")
59+
e_tag: ETag = Field(default=None, description="S3 entity tag")
6060

6161
model_config = ConfigDict(
6262
populate_by_name=True,

0 commit comments

Comments
 (0)