Skip to content

Commit

Permalink
🐛 fix constraints extract
Browse files Browse the repository at this point in the history
  • Loading branch information
yanyongyu authored Jan 10, 2024
1 parent 695c65e commit 30e4d94
Show file tree
Hide file tree
Showing 59 changed files with 214 additions and 245 deletions.
37 changes: 21 additions & 16 deletions codegen/parser/schemas/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ class SchemaData:

_type_string: ClassVar[str] = "Any"

def get_type_string(self) -> str:
def get_type_string(self, include_constraints: bool = True) -> str:
"""Get schema typing string in any place"""
if args := self._get_field_args():
if include_constraints and (args := self._get_field_args()):
return f"Annotated[{self._type_string}, {self._get_field_string(args)}]"
return self._type_string

Expand Down Expand Up @@ -66,9 +66,11 @@ class Property:
required: bool
schema_data: SchemaData

def get_type_string(self) -> str:
def get_type_string(self, include_constraints: bool = True) -> str:
"""Get schema typing string in any place"""
type_string = self.schema_data.get_type_string()
type_string = self.schema_data.get_type_string(
include_constraints=include_constraints
)
return type_string if self.required else f"Missing[{type_string}]"

def get_param_type_string(self) -> str:
Expand All @@ -78,8 +80,11 @@ def get_param_type_string(self) -> str:

def get_model_defination(self) -> str:
"""Get defination used by model codegen"""
type_ = self.get_type_string()
default = self._get_field_string(self._get_field_args())
# extract the outermost type constraints to the field
type_ = self.get_type_string(include_constraints=False)
args = self.schema_data._get_field_args()
args.update(self._get_field_args())
default = self._get_field_string(args)
return f"{self.prop_name}: {type_} = {default}"

def get_type_defination(self) -> str:
Expand Down Expand Up @@ -351,9 +356,9 @@ class ListSchema(SchemaData):
_type_string: ClassVar[str] = "List"

@override
def get_type_string(self) -> str:
def get_type_string(self, include_constraints: bool = True) -> str:
type_string = f"List[{self.item_schema.get_type_string()}]"
if args := self._get_field_args():
if include_constraints and (args := self._get_field_args()):
return f"Annotated[{type_string}, {self._get_field_string(args)}]"
return type_string

Expand Down Expand Up @@ -419,9 +424,9 @@ class UniqueListSchema(SchemaData):
_type_string: ClassVar[str] = "UniqueList"

@override
def get_type_string(self) -> str:
def get_type_string(self, include_constraints: bool = True) -> str:
type_string = f"UniqueList[{self.item_schema.get_type_string()}]"
if args := self._get_field_args():
if include_constraints and (args := self._get_field_args()):
return f"Annotated[{type_string}, {self._get_field_string(args)}]"
return type_string

Expand Down Expand Up @@ -495,9 +500,9 @@ def is_float_enum(self) -> bool:
return all(isinstance(value, int | float) for value in self.values)

@override
def get_type_string(self) -> str:
def get_type_string(self, include_constraints: bool = True) -> str:
type_string = f"Literal[{', '.join(repr(value) for value in self.values)}]"
if args := self._get_field_args():
if include_constraints and (args := self._get_field_args()):
return f"Annotated[{type_string}, {self._get_field_string(args)}]"
return type_string

Expand Down Expand Up @@ -539,8 +544,8 @@ class ModelSchema(SchemaData):
_type_string: ClassVar[str] = "dict"

@override
def get_type_string(self) -> str:
if args := self._get_field_args():
def get_type_string(self, include_constraints: bool = True) -> str:
if include_constraints and (args := self._get_field_args()):
return f"Annotated[{self.class_name}, {self._get_field_string(args)}]"
return self.class_name

Expand Down Expand Up @@ -595,15 +600,15 @@ class UnionSchema(SchemaData):
discriminator: str | None = None

@override
def get_type_string(self) -> str:
def get_type_string(self, include_constraints: bool = True) -> str:
if len(self.schemas) == 0:
return "Any"
elif len(self.schemas) == 1:
return self.schemas[0].get_type_string()
type_string = (
f"Union[{', '.join(schema.get_type_string() for schema in self.schemas)}]"
)
if args := self._get_field_args():
if include_constraints and (args := self._get_field_args()):
return f"Annotated[{type_string}, {self._get_field_string(args)}]"
return type_string

Expand Down
4 changes: 2 additions & 2 deletions githubkit/versions/v2022_11_28/models/group_0002.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ class GlobalAdvisory(GitHubModel):
repository_advisory_url: Union[str, None] = Field(
description="The API URL for the repository advisory."
)
summary: Annotated[str, Field(max_length=1024)] = Field(
description="A short summary of the advisory."
summary: str = Field(

Check warning on line 59 in githubkit/versions/v2022_11_28/models/group_0002.py

View check run for this annotation

Codecov / codecov/patch

githubkit/versions/v2022_11_28/models/group_0002.py#L59

Added line #L59 was not covered by tests
max_length=1024, description="A short summary of the advisory."
)
description: Union[Annotated[str, Field(max_length=65535)], None] = Field(
description="A detailed description of what the advisory entails."
Expand Down
8 changes: 3 additions & 5 deletions githubkit/versions/v2022_11_28/models/group_0027.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ class DependabotAlertSecurityAdvisory(GitHubModel):
cve_id: Union[str, None] = Field(
description="The unique CVE ID assigned to the advisory."
)
summary: Annotated[str, Field(max_length=1024)] = Field(
description="A short, plain text summary of the advisory."
summary: str = Field(
max_length=1024, description="A short, plain text summary of the advisory."
)
description: str = Field(
description="A long-form Markdown-supported description of the advisory."
Expand Down Expand Up @@ -74,9 +74,7 @@ class DependabotAlertSecurityAdvisoryPropCvss(GitHubModel):
Details for the advisory pertaining to the Common Vulnerability Scoring System.
"""

score: Annotated[float, Field(le=10.0)] = Field(
description="The overall CVSS score of the advisory."
)
score: float = Field(le=10.0, description="The overall CVSS score of the advisory.")
vector_string: Union[str, None] = Field(
description="The full CVSS vector string for the advisory."
)
Expand Down
4 changes: 1 addition & 3 deletions githubkit/versions/v2022_11_28/models/group_0041.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ class GistComment(GitHubModel):
id: int = Field()
node_id: str = Field()
url: str = Field()
body: Annotated[str, Field(max_length=65535)] = Field(
description="The comment text."
)
body: str = Field(max_length=65535, description="The comment text.")

Check warning on line 35 in githubkit/versions/v2022_11_28/models/group_0041.py

View check run for this annotation

Codecov / codecov/patch

githubkit/versions/v2022_11_28/models/group_0041.py#L35

Added line #L35 was not covered by tests
user: Union[None, SimpleUser] = Field()
created_at: datetime = Field()
updated_at: datetime = Field()
Expand Down
5 changes: 3 additions & 2 deletions githubkit/versions/v2022_11_28/models/group_0112.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ class RepositoryRulePullRequestPropParameters(GitHubModel):
require_last_push_approval: bool = Field(
description="Whether the most recent reviewable push must be approved by someone other than the person who pushed it."
)
required_approving_review_count: Annotated[int, Field(le=10.0)] = Field(
description="The number of approving reviews that are required before a pull request can be merged."
required_approving_review_count: int = Field(
le=10.0,
description="The number of approving reviews that are required before a pull request can be merged.",
)
required_review_thread_resolution: bool = Field(
description="All conversations on code must be resolved before a pull request can be merged."
Expand Down
4 changes: 2 additions & 2 deletions githubkit/versions/v2022_11_28/models/group_0131.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ class RepositoryAdvisory(GitHubModel):
)
url: str = Field(description="The API URL for the advisory.")
html_url: str = Field(description="The URL for the advisory.")
summary: Annotated[str, Field(max_length=1024)] = Field(
description="A short summary of the advisory."
summary: str = Field(
max_length=1024, description="A short summary of the advisory."
)
description: Union[Annotated[str, Field(max_length=65535)], None] = Field(
description="A detailed description of what the advisory entails."
Expand Down
4 changes: 1 addition & 3 deletions githubkit/versions/v2022_11_28/models/group_0169.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ class ProtectedBranchPullRequestReview(GitHubModel):
)
dismiss_stale_reviews: bool = Field()
require_code_owner_reviews: bool = Field()
required_approving_review_count: Missing[Annotated[int, Field(le=6.0)]] = Field(
default=UNSET
)
required_approving_review_count: Missing[int] = Field(le=6.0, default=UNSET)

Check warning on line 47 in githubkit/versions/v2022_11_28/models/group_0169.py

View check run for this annotation

Codecov / codecov/patch

githubkit/versions/v2022_11_28/models/group_0169.py#L47

Added line #L47 was not covered by tests
require_last_push_approval: Missing[bool] = Field(
default=UNSET,
description="Whether the most recent push must be approved by someone other than the person who pushed it.",
Expand Down
9 changes: 5 additions & 4 deletions githubkit/versions/v2022_11_28/models/group_0190.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ class CodeScanningAnalysis(GitHubModel):
ref: str = Field(
description="The Git reference, formatted as `refs/pull/<number>/merge`, `refs/pull/<number>/head`,\n`refs/heads/<branch name>` or simply `<branch name>`."
)
commit_sha: Annotated[
str, Field(min_length=40, max_length=40, pattern="^[0-9a-fA-F]+$")
] = Field(
description="The SHA of the commit to which the analysis you are uploading relates."
commit_sha: str = Field(

Check warning on line 32 in githubkit/versions/v2022_11_28/models/group_0190.py

View check run for this annotation

Codecov / codecov/patch

githubkit/versions/v2022_11_28/models/group_0190.py#L32

Added line #L32 was not covered by tests
min_length=40,
max_length=40,
pattern="^[0-9a-fA-F]+$",
description="The SHA of the commit to which the analysis you are uploading relates.",
)
analysis_key: str = Field(
description="Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name."
Expand Down
3 changes: 2 additions & 1 deletion githubkit/versions/v2022_11_28/models/group_0225.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
class Dependency(GitHubModel):
"""Dependency"""

package_url: Missing[Annotated[str, Field(pattern="^pkg")]] = Field(
package_url: Missing[str] = Field(

Check warning on line 28 in githubkit/versions/v2022_11_28/models/group_0225.py

View check run for this annotation

Codecov / codecov/patch

githubkit/versions/v2022_11_28/models/group_0225.py#L28

Added line #L28 was not covered by tests
pattern="^pkg",
default=UNSET,
description="Package-url (PURL) of dependency. See https://github.com/package-url/purl-spec for more details.",
)
Expand Down
11 changes: 7 additions & 4 deletions githubkit/versions/v2022_11_28/models/group_0227.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,14 @@ class Snapshot(GitHubModel):
description="The version of the repository snapshot submission."
)
job: SnapshotPropJob = Field()
sha: Annotated[str, Field(min_length=40, max_length=40)] = Field(
description="The commit SHA associated with this dependency snapshot. Maximum length: 40 characters."
sha: str = Field(

Check warning on line 35 in githubkit/versions/v2022_11_28/models/group_0227.py

View check run for this annotation

Codecov / codecov/patch

githubkit/versions/v2022_11_28/models/group_0227.py#L35

Added line #L35 was not covered by tests
min_length=40,
max_length=40,
description="The commit SHA associated with this dependency snapshot. Maximum length: 40 characters.",
)
ref: Annotated[str, Field(pattern="^refs/")] = Field(
description="The repository branch that triggered this snapshot."
ref: str = Field(

Check warning on line 40 in githubkit/versions/v2022_11_28/models/group_0227.py

View check run for this annotation

Codecov / codecov/patch

githubkit/versions/v2022_11_28/models/group_0227.py#L40

Added line #L40 was not covered by tests
pattern="^refs/",
description="The repository branch that triggered this snapshot.",
)
detector: SnapshotPropDetector = Field(
description="A description of the detector used."
Expand Down
4 changes: 2 additions & 2 deletions githubkit/versions/v2022_11_28/models/group_0228.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ class DeploymentStatus(GitHubModel):
"error", "failure", "inactive", "pending", "success", "queued", "in_progress"
] = Field(description="The state of the status.")
creator: Union[None, SimpleUser] = Field()
description: Annotated[str, Field(max_length=140)] = Field(
default="", description="A short description of the status."
description: str = Field(

Check warning on line 40 in githubkit/versions/v2022_11_28/models/group_0228.py

View check run for this annotation

Codecov / codecov/patch

githubkit/versions/v2022_11_28/models/group_0228.py#L40

Added line #L40 was not covered by tests
max_length=140, default="", description="A short description of the status."
)
environment: Missing[str] = Field(
default=UNSET,
Expand Down
4 changes: 1 addition & 3 deletions githubkit/versions/v2022_11_28/models/group_0240.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ class GitRefPropObject(GitHubModel):
"""GitRefPropObject"""

type: str = Field()
sha: Annotated[str, Field(min_length=40, max_length=40)] = Field(
description="SHA for the reference"
)
sha: str = Field(min_length=40, max_length=40, description="SHA for the reference")

Check warning on line 36 in githubkit/versions/v2022_11_28/models/group_0240.py

View check run for this annotation

Codecov / codecov/patch

githubkit/versions/v2022_11_28/models/group_0240.py#L36

Added line #L36 was not covered by tests
url: str = Field()


Expand Down
9 changes: 5 additions & 4 deletions githubkit/versions/v2022_11_28/models/group_0313.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@
class RepositoryAdvisoryCreate(GitHubModel):
"""RepositoryAdvisoryCreate"""

summary: Annotated[str, Field(max_length=1024)] = Field(
description="A short summary of the advisory."
summary: str = Field(

Check warning on line 26 in githubkit/versions/v2022_11_28/models/group_0313.py

View check run for this annotation

Codecov / codecov/patch

githubkit/versions/v2022_11_28/models/group_0313.py#L26

Added line #L26 was not covered by tests
max_length=1024, description="A short summary of the advisory."
)
description: Annotated[str, Field(max_length=65535)] = Field(
description="A detailed description of what the advisory impacts."
description: str = Field(

Check warning on line 29 in githubkit/versions/v2022_11_28/models/group_0313.py

View check run for this annotation

Codecov / codecov/patch

githubkit/versions/v2022_11_28/models/group_0313.py#L29

Added line #L29 was not covered by tests
max_length=65535,
description="A detailed description of what the advisory impacts.",
)
cve_id: Missing[Union[str, None]] = Field(
default=UNSET, description="The Common Vulnerabilities and Exposures (CVE) ID."
Expand Down
9 changes: 5 additions & 4 deletions githubkit/versions/v2022_11_28/models/group_0314.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@
class PrivateVulnerabilityReportCreate(GitHubModel):
"""PrivateVulnerabilityReportCreate"""

summary: Annotated[str, Field(max_length=1024)] = Field(
description="A short summary of the advisory."
summary: str = Field(

Check warning on line 26 in githubkit/versions/v2022_11_28/models/group_0314.py

View check run for this annotation

Codecov / codecov/patch

githubkit/versions/v2022_11_28/models/group_0314.py#L26

Added line #L26 was not covered by tests
max_length=1024, description="A short summary of the advisory."
)
description: Annotated[str, Field(max_length=65535)] = Field(
description="A detailed description of what the advisory impacts."
description: str = Field(

Check warning on line 29 in githubkit/versions/v2022_11_28/models/group_0314.py

View check run for this annotation

Codecov / codecov/patch

githubkit/versions/v2022_11_28/models/group_0314.py#L29

Added line #L29 was not covered by tests
max_length=65535,
description="A detailed description of what the advisory impacts.",
)
vulnerabilities: Missing[
Union[List[PrivateVulnerabilityReportCreatePropVulnerabilitiesItems], None]
Expand Down
7 changes: 4 additions & 3 deletions githubkit/versions/v2022_11_28/models/group_0315.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@
class RepositoryAdvisoryUpdate(GitHubModel):
"""RepositoryAdvisoryUpdate"""

summary: Missing[Annotated[str, Field(max_length=1024)]] = Field(
default=UNSET, description="A short summary of the advisory."
summary: Missing[str] = Field(

Check warning on line 26 in githubkit/versions/v2022_11_28/models/group_0315.py

View check run for this annotation

Codecov / codecov/patch

githubkit/versions/v2022_11_28/models/group_0315.py#L26

Added line #L26 was not covered by tests
max_length=1024, default=UNSET, description="A short summary of the advisory."
)
description: Missing[Annotated[str, Field(max_length=65535)]] = Field(
description: Missing[str] = Field(

Check warning on line 29 in githubkit/versions/v2022_11_28/models/group_0315.py

View check run for this annotation

Codecov / codecov/patch

githubkit/versions/v2022_11_28/models/group_0315.py#L29

Added line #L29 was not covered by tests
max_length=65535,
default=UNSET,
description="A detailed description of what the advisory impacts.",
)
Expand Down
4 changes: 1 addition & 3 deletions githubkit/versions/v2022_11_28/models/group_0824.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@
class GistsGistIdCommentsPostBody(GitHubModel):
"""GistsGistIdCommentsPostBody"""

body: Annotated[str, Field(max_length=65535)] = Field(
description="The comment text."
)
body: str = Field(max_length=65535, description="The comment text.")

Check warning on line 23 in githubkit/versions/v2022_11_28/models/group_0824.py

View check run for this annotation

Codecov / codecov/patch

githubkit/versions/v2022_11_28/models/group_0824.py#L23

Added line #L23 was not covered by tests


model_rebuild(GistsGistIdCommentsPostBody)
Expand Down
4 changes: 1 addition & 3 deletions githubkit/versions/v2022_11_28/models/group_0825.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@
class GistsGistIdCommentsCommentIdPatchBody(GitHubModel):
"""GistsGistIdCommentsCommentIdPatchBody"""

body: Annotated[str, Field(max_length=65535)] = Field(
description="The comment text."
)
body: str = Field(max_length=65535, description="The comment text.")

Check warning on line 23 in githubkit/versions/v2022_11_28/models/group_0825.py

View check run for this annotation

Codecov / codecov/patch

githubkit/versions/v2022_11_28/models/group_0825.py#L23

Added line #L23 was not covered by tests


model_rebuild(GistsGistIdCommentsCommentIdPatchBody)
Expand Down
6 changes: 4 additions & 2 deletions githubkit/versions/v2022_11_28/models/group_0838.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ class OrgsOrgActionsRunnersGenerateJitconfigPostBody(GitHubModel):
runner_group_id: int = Field(
description="The ID of the runner group to register the runner to."
)
labels: Annotated[List[str], Field(max_length=100, min_length=1)] = Field(
description="The names of the custom labels to add to the runner. **Minimum items**: 1. **Maximum items**: 100."
labels: List[str] = Field(

Check warning on line 30 in githubkit/versions/v2022_11_28/models/group_0838.py

View check run for this annotation

Codecov / codecov/patch

githubkit/versions/v2022_11_28/models/group_0838.py#L30

Added line #L30 was not covered by tests
max_length=100,
min_length=1,
description="The names of the custom labels to add to the runner. **Minimum items**: 1. **Maximum items**: 100.",
)
work_folder: Missing[str] = Field(
default=UNSET,
Expand Down
5 changes: 3 additions & 2 deletions githubkit/versions/v2022_11_28/models/group_0841.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@
class OrgsOrgActionsRunnersRunnerIdLabelsPutBody(GitHubModel):
"""OrgsOrgActionsRunnersRunnerIdLabelsPutBody"""

labels: Annotated[List[str], Field(max_length=100)] = Field(
description="The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels."
labels: List[str] = Field(
max_length=100,
description="The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels.",
)


Expand Down
6 changes: 4 additions & 2 deletions githubkit/versions/v2022_11_28/models/group_0842.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@
class OrgsOrgActionsRunnersRunnerIdLabelsPostBody(GitHubModel):
"""OrgsOrgActionsRunnersRunnerIdLabelsPostBody"""

labels: Annotated[List[str], Field(max_length=100, min_length=1)] = Field(
description="The names of the custom labels to add to the runner."
labels: List[str] = Field(

Check warning on line 24 in githubkit/versions/v2022_11_28/models/group_0842.py

View check run for this annotation

Codecov / codecov/patch

githubkit/versions/v2022_11_28/models/group_0842.py#L24

Added line #L24 was not covered by tests
max_length=100,
min_length=1,
description="The names of the custom labels to add to the runner.",
)


Expand Down
10 changes: 2 additions & 8 deletions githubkit/versions/v2022_11_28/models/group_0845.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,8 @@
class OrgsOrgActionsSecretsSecretNamePutBody(GitHubModel):
"""OrgsOrgActionsSecretsSecretNamePutBody"""

encrypted_value: Missing[
Annotated[
str,
Field(
pattern="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$"
),
]
] = Field(
encrypted_value: Missing[str] = Field(

Check warning on line 26 in githubkit/versions/v2022_11_28/models/group_0845.py

View check run for this annotation

Codecov / codecov/patch

githubkit/versions/v2022_11_28/models/group_0845.py#L26

Added line #L26 was not covered by tests
pattern="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$",
default=UNSET,
description="Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/actions/secrets#get-an-organization-public-key) endpoint.",
)
Expand Down
3 changes: 2 additions & 1 deletion githubkit/versions/v2022_11_28/models/group_0854.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ class OrgsOrgCodespacesAccessPutBody(GitHubModel):
] = Field(
description="Which users can access codespaces in the organization. `disabled` means that no users can access codespaces in the organization."
)
selected_usernames: Missing[Annotated[List[str], Field(max_length=100)]] = Field(
selected_usernames: Missing[List[str]] = Field(

Check warning on line 34 in githubkit/versions/v2022_11_28/models/group_0854.py

View check run for this annotation

Codecov / codecov/patch

githubkit/versions/v2022_11_28/models/group_0854.py#L34

Added line #L34 was not covered by tests
max_length=100,
default=UNSET,
description="The usernames of the organization members who should have access to codespaces in the organization. Required when `visibility` is `selected_members`. The provided list of usernames will replace any existing value.",
)
Expand Down
5 changes: 3 additions & 2 deletions githubkit/versions/v2022_11_28/models/group_0855.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@
class OrgsOrgCodespacesAccessSelectedUsersPostBody(GitHubModel):
"""OrgsOrgCodespacesAccessSelectedUsersPostBody"""

selected_usernames: Annotated[List[str], Field(max_length=100)] = Field(
description="The usernames of the organization members whose codespaces be billed to the organization."
selected_usernames: List[str] = Field(

Check warning on line 24 in githubkit/versions/v2022_11_28/models/group_0855.py

View check run for this annotation

Codecov / codecov/patch

githubkit/versions/v2022_11_28/models/group_0855.py#L24

Added line #L24 was not covered by tests
max_length=100,
description="The usernames of the organization members whose codespaces be billed to the organization.",
)


Expand Down
Loading

0 comments on commit 30e4d94

Please sign in to comment.