Skip to content

Commit 0bc3eb0

Browse files
committed
uses AnyHttpUrl
1 parent 4982ae5 commit 0bc3eb0

File tree

6 files changed

+14
-32
lines changed

6 files changed

+14
-32
lines changed

services/api-server/openapi.json

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5544,8 +5544,6 @@
55445544
"urls": {
55455545
"items": {
55465546
"type": "string",
5547-
"maxLength": 2083,
5548-
"minLength": 1,
55495547
"format": "uri"
55505548
},
55515549
"type": "array",
@@ -5681,8 +5679,6 @@
56815679
"anyOf": [
56825680
{
56835681
"type": "string",
5684-
"maxLength": 2083,
5685-
"minLength": 1,
56865682
"format": "uri"
56875683
},
56885684
{
@@ -5696,8 +5692,6 @@
56965692
"anyOf": [
56975693
{
56985694
"type": "string",
5699-
"maxLength": 2083,
5700-
"minLength": 1,
57015695
"format": "uri"
57025696
},
57035697
{
@@ -5711,8 +5705,6 @@
57115705
"anyOf": [
57125706
{
57135707
"type": "string",
5714-
"maxLength": 2083,
5715-
"minLength": 1,
57165708
"format": "uri"
57175709
},
57185710
{
@@ -5894,8 +5886,6 @@
58945886
"anyOf": [
58955887
{
58965888
"type": "string",
5897-
"maxLength": 2083,
5898-
"minLength": 1,
58995889
"format": "uri"
59005890
},
59015891
{
@@ -6159,8 +6149,6 @@
61596149
},
61606150
"download_link": {
61616151
"type": "string",
6162-
"maxLength": 2083,
6163-
"minLength": 1,
61646152
"format": "uri",
61656153
"title": "Download Link"
61666154
}
@@ -6201,15 +6189,11 @@
62016189
},
62026190
"docs_url": {
62036191
"type": "string",
6204-
"maxLength": 2083,
6205-
"minLength": 1,
62066192
"format": "uri",
62076193
"title": "Docs Url"
62086194
},
62096195
"docs_dev_url": {
62106196
"type": "string",
6211-
"maxLength": 2083,
6212-
"minLength": 1,
62136197
"format": "uri",
62146198
"title": "Docs Dev Url"
62156199
}
@@ -6733,8 +6717,6 @@
67336717
"anyOf": [
67346718
{
67356719
"type": "string",
6736-
"maxLength": 2083,
6737-
"minLength": 1,
67386720
"format": "uri"
67396721
},
67406722
{

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
from models_library.basic_types import SHA256Str
1212
from models_library.projects_nodes_io import StorageFileID
1313
from pydantic import (
14+
AnyHttpUrl,
1415
BaseModel,
1516
ConfigDict,
1617
Field,
17-
HttpUrl,
1818
NonNegativeInt,
1919
StringConstraints,
2020
TypeAdapter,
@@ -169,7 +169,7 @@ class UploadLinks(BaseModel):
169169

170170
class FileUploadData(BaseModel):
171171
chunk_size: NonNegativeInt
172-
urls: list[Annotated[HttpUrl, UriSchema()]]
172+
urls: list[Annotated[AnyHttpUrl, UriSchema()]]
173173
links: UploadLinks
174174

175175

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
from models_library.projects_nodes_io import NodeID
99
from models_library.projects_state import RunningState
1010
from pydantic import (
11+
AnyHttpUrl,
1112
BaseModel,
1213
ConfigDict,
1314
Field,
14-
HttpUrl,
1515
PositiveInt,
1616
StrictBool,
1717
StrictFloat,
@@ -153,7 +153,7 @@ class JobMetadata(BaseModel):
153153
metadata: dict[str, MetaValueType] = Field(..., description="Custom key-value map")
154154

155155
# Links
156-
url: Annotated[HttpUrl, UriSchema()] | None = Field(
156+
url: Annotated[AnyHttpUrl, UriSchema()] | None = Field(
157157
..., description="Link to get this resource (self)"
158158
)
159159

@@ -201,13 +201,13 @@ class Job(BaseModel):
201201
)
202202

203203
# Get links to other resources
204-
url: Annotated[HttpUrl, UriSchema()] | None = Field(
204+
url: Annotated[AnyHttpUrl, UriSchema()] | None = Field(
205205
..., description="Link to get this resource (self)"
206206
)
207-
runner_url: Annotated[HttpUrl, UriSchema()] | None = Field(
207+
runner_url: Annotated[AnyHttpUrl, UriSchema()] | None = Field(
208208
..., description="Link to the solver's job (parent collection)"
209209
)
210-
outputs_url: Annotated[HttpUrl, UriSchema()] | None = Field(
210+
outputs_url: Annotated[AnyHttpUrl, UriSchema()] | None = Field(
211211
..., description="Link to the job outputs (sub-collection)"
212212
)
213213

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
from typing import Annotated
22

33
from models_library.api_schemas__common.meta import BaseMeta
4-
from pydantic import ConfigDict, HttpUrl
4+
from pydantic import AnyHttpUrl, ConfigDict
55
from simcore_service_api_server.models._utils_pydantic import UriSchema
66

77

88
class Meta(BaseMeta):
9-
docs_url: Annotated[HttpUrl, UriSchema()]
10-
docs_dev_url: Annotated[HttpUrl, UriSchema()]
9+
docs_url: Annotated[AnyHttpUrl, UriSchema()]
10+
docs_dev_url: Annotated[AnyHttpUrl, UriSchema()]
1111
model_config = ConfigDict(
1212
json_schema_extra={
1313
"example": {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from models_library.services import ServiceMetaDataPublished
77
from models_library.services_regex import COMPUTATIONAL_SERVICE_KEY_RE
88
from packaging.version import Version
9-
from pydantic import BaseModel, ConfigDict, Field, HttpUrl, StringConstraints
9+
from pydantic import AnyHttpUrl, BaseModel, ConfigDict, Field, StringConstraints
1010
from simcore_service_api_server.models._utils_pydantic import UriSchema
1111

1212
from ..api_resources import compose_resource_name
@@ -54,7 +54,7 @@ class Solver(BaseModel):
5454

5555
# Get links to other resources
5656
url: Annotated[
57-
Annotated[HttpUrl, UriSchema()] | None,
57+
Annotated[AnyHttpUrl, UriSchema()] | None,
5858
Field(..., description="Link to get this resource"),
5959
]
6060

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
from typing import Annotated, TypeAlias
22

33
from models_library import projects, projects_nodes_io
4-
from pydantic import BaseModel, ConfigDict, Field, HttpUrl
4+
from pydantic import AnyHttpUrl, BaseModel, ConfigDict, Field
55
from simcore_service_api_server.models._utils_pydantic import UriSchema
66

77
from .. import api_resources
88
from . import solvers
99

1010
StudyID: TypeAlias = projects.ProjectID
1111
NodeName: TypeAlias = str
12-
DownloadLink: TypeAlias = Annotated[HttpUrl, UriSchema()]
12+
DownloadLink: TypeAlias = Annotated[AnyHttpUrl, UriSchema()]
1313

1414

1515
class Study(BaseModel):

0 commit comments

Comments
 (0)