Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf0b65e7

Browse files
Generate iaas
1 parentdc197c5 commitf0b65e7

File tree

3 files changed

+41
-6
lines changed

3 files changed

+41
-6
lines changed

‎services/iaas/src/stackit/iaas/models/allowed_addresses_inner.py‎

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
importjson
1818
importpprint
19+
importre
1920
fromtypingimportAny,Dict,Optional,Set,Union
2021

2122
frompydanticimport (
@@ -37,13 +38,35 @@ class AllowedAddressesInner(BaseModel):
3738
"""
3839

3940
# data type: str
41+
# BEGIN of the workaround until upstream issues are fixed:
42+
# https://github.com/OpenAPITools/openapi-generator/issues/19034 from Jun 28, 2024
43+
# and https://github.com/OpenAPITools/openapi-generator/issues/19842 from Oct 11, 2024
44+
# Tracking issue on our side: https://jira.schwarz/browse/STACKITSDK-227
4045
oneof_schema_1_validator:Optional[Annotated[str,Field(strict=True)]]=Field(
41-
default=None,description="Object that represents an IP address."
46+
default=None,
47+
description="Object that represents an IP address.",
48+
pattern=re.sub(
49+
r"^\/|\/$",
50+
"",
51+
r"/((^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$)|(^\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$))/",
52+
),
4253
)
54+
# END of the workaround
4355
# data type: str
56+
# BEGIN of the workaround until upstream issues are fixed:
57+
# https://github.com/OpenAPITools/openapi-generator/issues/19034 from Jun 28, 2024
58+
# and https://github.com/OpenAPITools/openapi-generator/issues/19842 from Oct 11, 2024
59+
# Tracking issue on our side: https://jira.schwarz/browse/STACKITSDK-227
4460
oneof_schema_2_validator:Optional[Annotated[str,Field(strict=True)]]=Field(
45-
default=None,description="Classless Inter-Domain Routing (CIDR)."
61+
default=None,
62+
description="Classless Inter-Domain Routing (CIDR).",
63+
pattern=re.sub(
64+
r"^\/|\/$",
65+
"",
66+
r"/^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(\/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$/",
67+
),
4668
)
69+
# END of the workaround
4770
actual_instance:Optional[Union[str]]=None
4871
one_of_schemas:Set[str]= {"str"}
4972

‎services/iaas/src/stackit/iaas/models/area_id.py‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
importjson
1818
importpprint
19+
importre
1920
fromtypingimportAny,Dict,Optional,Set,Union
2021

2122
frompydanticimport (
@@ -39,9 +40,16 @@ class AreaId(BaseModel):
3940
"""
4041

4142
# data type: str
42-
oneof_schema_1_validator:Optional[Annotated[str,Field(min_length=36,strict=True,max_length=36)]]=Field(
43-
default=None,description="Universally Unique Identifier (UUID)."
43+
# BEGIN of the workaround until upstream issues are fixed:
44+
# https://github.com/OpenAPITools/openapi-generator/issues/19034 from Jun 28, 2024
45+
# and https://github.com/OpenAPITools/openapi-generator/issues/19842 from Oct 11, 2024
46+
# Tracking issue on our side: https://jira.schwarz/browse/STACKITSDK-227
47+
oneof_schema_1_validator:Optional[Annotated[str,Field(strict=True)]]=Field(
48+
default=None,
49+
description="Universally Unique Identifier (UUID).",
50+
pattern=re.sub(r"^\/|\/$","",r"/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/"),
4451
)
52+
# END of the workaround
4553
# data type: StaticAreaID
4654
oneof_schema_2_validator:Optional[StaticAreaID]=None
4755
actual_instance:Optional[Union[StaticAreaID,str]]=None

‎services/iaas/src/stackit/iaas/models/create_protocol.py‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
BaseModel,
2323
ConfigDict,
2424
Field,
25-
StrictStr,
2625
ValidationError,
2726
field_validator,
2827
)
@@ -42,10 +41,15 @@ class CreateProtocol(BaseModel):
4241
default=None,description="The protocol number which the rule should match."
4342
)
4443
# data type: str
45-
oneof_schema_2_validator:Optional[StrictStr]=Field(
44+
# BEGIN of the workaround until upstream issues are fixed:
45+
# https://github.com/OpenAPITools/openapi-generator/issues/19034 from Jun 28, 2024
46+
# and https://github.com/OpenAPITools/openapi-generator/issues/19842 from Oct 11, 2024
47+
# Tracking issue on our side: https://jira.schwarz/browse/STACKITSDK-227
48+
oneof_schema_2_validator:Optional[Annotated[str,Field(strict=True)]]=Field(
4649
default=None,
4750
description="The protocol name which the rule should match. Possible values: `ah`, `dccp`, `egp`, `esp`, `gre`, `icmp`, `igmp`, `ipip`, `ipv6-encap`, `ipv6-frag`, `ipv6-icmp`, `ipv6-nonxt`, `ipv6-opts`, `ipv6-route`, `ospf`, `pgm`, `rsvp`, `sctp`, `tcp`, `udp`, `udplite`, `vrrp`.",
4851
)
52+
# END of the workaround
4953
actual_instance:Optional[Union[int,str]]=None
5054
one_of_schemas:Set[str]= {"int","str"}
5155

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp