Skip to content

Generator: Update SDK /services/iaas #2211

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

import json
import pprint
import re
from typing import Any, Dict, Optional, Set, Union

from pydantic import (
Expand All @@ -37,13 +38,35 @@ class AllowedAddressesInner(BaseModel):
"""

# data type: str
# BEGIN of the workaround until upstream issues are fixed:
# https://github.com/OpenAPITools/openapi-generator/issues/19034 from Jun 28, 2024
# and https://github.com/OpenAPITools/openapi-generator/issues/19842 from Oct 11, 2024
# Tracking issue on our side: https://jira.schwarz/browse/STACKITSDK-227
oneof_schema_1_validator: Optional[Annotated[str, Field(strict=True)]] = Field(
default=None, description="Object that represents an IP address."
default=None,
description="Object that represents an IP address.",
pattern=re.sub(
r"^\/|\/$",
"",
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*$))/",
),
)
# END of the workaround
# data type: str
# BEGIN of the workaround until upstream issues are fixed:
# https://github.com/OpenAPITools/openapi-generator/issues/19034 from Jun 28, 2024
# and https://github.com/OpenAPITools/openapi-generator/issues/19842 from Oct 11, 2024
# Tracking issue on our side: https://jira.schwarz/browse/STACKITSDK-227
oneof_schema_2_validator: Optional[Annotated[str, Field(strict=True)]] = Field(
default=None, description="Classless Inter-Domain Routing (CIDR)."
default=None,
description="Classless Inter-Domain Routing (CIDR).",
pattern=re.sub(
r"^\/|\/$",
"",
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])))?$/",
),
)
# END of the workaround
actual_instance: Optional[Union[str]] = None
one_of_schemas: Set[str] = {"str"}

Expand Down
17 changes: 15 additions & 2 deletions services/iaas/src/stackit/iaas/models/area_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

import json
import pprint
import re
from typing import Any, Dict, Optional, Set, Union

from pydantic import (
Expand All @@ -39,11 +40,23 @@ class AreaId(BaseModel):
"""

# data type: str
oneof_schema_1_validator: Optional[Annotated[str, Field(min_length=36, strict=True, max_length=36)]] = Field(
default=None, description="Universally Unique Identifier (UUID)."
# BEGIN of the workaround until upstream issues are fixed:
# https://github.com/OpenAPITools/openapi-generator/issues/19034 from Jun 28, 2024
# and https://github.com/OpenAPITools/openapi-generator/issues/19842 from Oct 11, 2024
# Tracking issue on our side: https://jira.schwarz/browse/STACKITSDK-227
oneof_schema_1_validator: Optional[Annotated[str, Field(strict=True)]] = Field(
default=None,
description="Universally Unique Identifier (UUID).",
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}$/"),
)
# END of the workaround
# data type: StaticAreaID
# BEGIN of the workaround until upstream issues are fixed:
# https://github.com/OpenAPITools/openapi-generator/issues/19034 from Jun 28, 2024
# and https://github.com/OpenAPITools/openapi-generator/issues/19842 from Oct 11, 2024
# Tracking issue on our side: https://jira.schwarz/browse/STACKITSDK-227
oneof_schema_2_validator: Optional[StaticAreaID] = None
# END of the workaround
actual_instance: Optional[Union[StaticAreaID, str]] = None
one_of_schemas: Set[str] = {"StaticAreaID", "str"}

Expand Down
13 changes: 11 additions & 2 deletions services/iaas/src/stackit/iaas/models/create_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
BaseModel,
ConfigDict,
Field,
StrictStr,
ValidationError,
field_validator,
)
Expand All @@ -38,14 +37,24 @@ class CreateProtocol(BaseModel):
"""

# data type: int
# BEGIN of the workaround until upstream issues are fixed:
# https://github.com/OpenAPITools/openapi-generator/issues/19034 from Jun 28, 2024
# and https://github.com/OpenAPITools/openapi-generator/issues/19842 from Oct 11, 2024
# Tracking issue on our side: https://jira.schwarz/browse/STACKITSDK-227
oneof_schema_1_validator: Optional[Annotated[int, Field(le=255, strict=True, ge=0)]] = Field(
default=None, description="The protocol number which the rule should match."
)
# END of the workaround
# data type: str
oneof_schema_2_validator: Optional[StrictStr] = Field(
# BEGIN of the workaround until upstream issues are fixed:
# https://github.com/OpenAPITools/openapi-generator/issues/19034 from Jun 28, 2024
# and https://github.com/OpenAPITools/openapi-generator/issues/19842 from Oct 11, 2024
# Tracking issue on our side: https://jira.schwarz/browse/STACKITSDK-227
oneof_schema_2_validator: Optional[Annotated[str, Field(strict=True)]] = Field(
default=None,
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`.",
)
# END of the workaround
actual_instance: Optional[Union[int, str]] = None
one_of_schemas: Set[str] = {"int", "str"}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,19 @@ class CreateServerPayloadNetworking(BaseModel):
"""

# data type: CreateServerNetworking
# BEGIN of the workaround until upstream issues are fixed:
# https://github.com/OpenAPITools/openapi-generator/issues/19034 from Jun 28, 2024
# and https://github.com/OpenAPITools/openapi-generator/issues/19842 from Oct 11, 2024
# Tracking issue on our side: https://jira.schwarz/browse/STACKITSDK-227
oneof_schema_1_validator: Optional[CreateServerNetworking] = None
# END of the workaround
# data type: CreateServerNetworkingWithNics
# BEGIN of the workaround until upstream issues are fixed:
# https://github.com/OpenAPITools/openapi-generator/issues/19034 from Jun 28, 2024
# and https://github.com/OpenAPITools/openapi-generator/issues/19842 from Oct 11, 2024
# Tracking issue on our side: https://jira.schwarz/browse/STACKITSDK-227
oneof_schema_2_validator: Optional[CreateServerNetworkingWithNics] = None
# END of the workaround
actual_instance: Optional[Union[CreateServerNetworking, CreateServerNetworkingWithNics]] = None
one_of_schemas: Set[str] = {"CreateServerNetworking", "CreateServerNetworkingWithNics"}

Expand Down
Loading