Skip to content

Commit

Permalink
set all nullable dates to not required in openapi spec
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewsy-opal committed Nov 26, 2024
1 parent 1d9b095 commit c617448
Show file tree
Hide file tree
Showing 13 changed files with 14 additions and 20 deletions.
6 changes: 0 additions & 6 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3611,7 +3611,6 @@ components:
nullable: true
type: string
required:
- expiration_date
- resource_id
- status
- user_id
Expand Down Expand Up @@ -3664,7 +3663,6 @@ components:
type: string
required:
- email
- expiration_date
- full_name
- resource_id
- user_id
Expand Down Expand Up @@ -3722,7 +3720,6 @@ components:
type: integer
required:
- email
- expiration_date
- full_name
- resource_id
- user_id
Expand Down Expand Up @@ -3806,7 +3803,6 @@ components:
- principal_type
- entity_id
- entity_type
- expiration_date
- has_direct_access
- num_access_paths
type: object
Expand Down Expand Up @@ -3841,7 +3837,6 @@ components:
required:
- resource_id
- non_human_identity_id
- expiration_date
type: object
SessionsList:
example:
Expand Down Expand Up @@ -4334,7 +4329,6 @@ components:
type: string
required:
- email
- expiration_date
- full_name
- group_id
- user_id
Expand Down
2 changes: 1 addition & 1 deletion docs/Access.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Name | Type | Description | Notes
**entity_id** | **str** | The ID of the entity being accessed. |
**entity_type** | [**EntityTypeEnum**](EntityTypeEnum.md) | |
**access_level** | [**ResourceAccessLevel**](ResourceAccessLevel.md) | | [optional]
**expiration_date** | **datetime** | The day and time the principal's access will expire. |
**expiration_date** | **datetime** | The day and time the principal's access will expire. | [optional]
**has_direct_access** | **bool** | The principal has direct access to this entity (vs. inherited access). |
**num_access_paths** | **int** | The number of ways in which the principal has access to this entity (directly and inherited). |

Expand Down
2 changes: 1 addition & 1 deletion docs/GroupUser.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Name | Type | Description | Notes
**access_level** | [**GroupAccessLevel**](GroupAccessLevel.md) | | [optional]
**full_name** | **str** | The user's full name. |
**email** | **str** | The user's email. |
**expiration_date** | **datetime** | The day and time the user's access will expire. |
**expiration_date** | **datetime** | The day and time the user's access will expire. | [optional]

## Example

Expand Down
2 changes: 1 addition & 1 deletion docs/ResourceAccessUser.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Name | Type | Description | Notes
**access_level** | [**ResourceAccessLevel**](ResourceAccessLevel.md) | |
**full_name** | **str** | The user's full name. |
**email** | **str** | The user's email. |
**expiration_date** | **datetime** | The day and time the user's access will expire. |
**expiration_date** | **datetime** | The day and time the user's access will expire. | [optional]
**has_direct_access** | **bool** | The user has direct access to this resources (vs. indirectly, like through a group). |
**num_access_paths** | **int** | The number of ways in which the user has access through this resource (directly and indirectly). |

Expand Down
2 changes: 1 addition & 1 deletion docs/ResourceNHI.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Name | Type | Description | Notes
**resource_id** | **str** | The ID of the resource. |
**non_human_identity_id** | **str** | The resource ID of the non-human identity. |
**access_level** | [**ResourceAccessLevel**](ResourceAccessLevel.md) | | [optional]
**expiration_date** | **datetime** | The day and time the non-human identity's access will expire. |
**expiration_date** | **datetime** | The day and time the non-human identity's access will expire. | [optional]

## Example

Expand Down
2 changes: 1 addition & 1 deletion docs/ResourceUser.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Name | Type | Description | Notes
**access_level** | [**ResourceAccessLevel**](ResourceAccessLevel.md) | |
**full_name** | **str** | The user's full name. |
**email** | **str** | The user's email. |
**expiration_date** | **datetime** | The day and time the user's access will expire. |
**expiration_date** | **datetime** | The day and time the user's access will expire. | [optional]

## Example

Expand Down
2 changes: 1 addition & 1 deletion docs/ResourceUserAccessStatus.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Name | Type | Description | Notes
**user_id** | **str** | The ID of the user. |
**access_level** | [**ResourceAccessLevel**](ResourceAccessLevel.md) | | [optional]
**status** | [**ResourceUserAccessStatusEnum**](ResourceUserAccessStatusEnum.md) | |
**expiration_date** | **datetime** | The day and time the user's access will expire. |
**expiration_date** | **datetime** | The day and time the user's access will expire. | [optional]

## Example

Expand Down
2 changes: 1 addition & 1 deletion opal/models/access.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class Access(BaseModel):
entity_id: StrictStr = Field(description="The ID of the entity being accessed.")
entity_type: EntityTypeEnum
access_level: Optional[ResourceAccessLevel] = None
expiration_date: datetime = Field(description="The day and time the principal's access will expire.")
expiration_date: Optional[datetime] = Field(default=None, description="The day and time the principal's access will expire.")
has_direct_access: StrictBool = Field(description="The principal has direct access to this entity (vs. inherited access).")
num_access_paths: StrictInt = Field(description="The number of ways in which the principal has access to this entity (directly and inherited).")
additional_properties: Dict[str, Any] = {}
Expand Down
2 changes: 1 addition & 1 deletion opal/models/group_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class GroupUser(BaseModel):
access_level: Optional[GroupAccessLevel] = None
full_name: StrictStr = Field(description="The user's full name.")
email: StrictStr = Field(description="The user's email.")
expiration_date: datetime = Field(description="The day and time the user's access will expire.")
expiration_date: Optional[datetime] = Field(default=None, description="The day and time the user's access will expire.")
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["group_id", "user_id", "access_level", "full_name", "email", "expiration_date"]

Expand Down
4 changes: 2 additions & 2 deletions opal/models/resource_access_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

from datetime import datetime
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List
from typing import Any, ClassVar, Dict, List, Optional
from opal.models.resource_access_level import ResourceAccessLevel
from typing import Optional, Set
from typing_extensions import Self
Expand All @@ -34,7 +34,7 @@ class ResourceAccessUser(BaseModel):
access_level: ResourceAccessLevel
full_name: StrictStr = Field(description="The user's full name.")
email: StrictStr = Field(description="The user's email.")
expiration_date: datetime = Field(description="The day and time the user's access will expire.")
expiration_date: Optional[datetime] = Field(default=None, description="The day and time the user's access will expire.")
has_direct_access: StrictBool = Field(description="The user has direct access to this resources (vs. indirectly, like through a group).")
num_access_paths: StrictInt = Field(description="The number of ways in which the user has access through this resource (directly and indirectly).")
additional_properties: Dict[str, Any] = {}
Expand Down
2 changes: 1 addition & 1 deletion opal/models/resource_nhi.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class ResourceNHI(BaseModel):
resource_id: StrictStr = Field(description="The ID of the resource.")
non_human_identity_id: StrictStr = Field(description="The resource ID of the non-human identity.")
access_level: Optional[ResourceAccessLevel] = None
expiration_date: datetime = Field(description="The day and time the non-human identity's access will expire.")
expiration_date: Optional[datetime] = Field(default=None, description="The day and time the non-human identity's access will expire.")
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["resource_id", "non_human_identity_id", "access_level", "expiration_date"]

Expand Down
4 changes: 2 additions & 2 deletions opal/models/resource_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

from datetime import datetime
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List
from typing import Any, ClassVar, Dict, List, Optional
from opal.models.resource_access_level import ResourceAccessLevel
from typing import Optional, Set
from typing_extensions import Self
Expand All @@ -34,7 +34,7 @@ class ResourceUser(BaseModel):
access_level: ResourceAccessLevel
full_name: StrictStr = Field(description="The user's full name.")
email: StrictStr = Field(description="The user's email.")
expiration_date: datetime = Field(description="The day and time the user's access will expire.")
expiration_date: Optional[datetime] = Field(default=None, description="The day and time the user's access will expire.")
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["resource_id", "user_id", "access_level", "full_name", "email", "expiration_date"]

Expand Down
2 changes: 1 addition & 1 deletion opal/models/resource_user_access_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class ResourceUserAccessStatus(BaseModel):
user_id: StrictStr = Field(description="The ID of the user.")
access_level: Optional[ResourceAccessLevel] = None
status: ResourceUserAccessStatusEnum
expiration_date: datetime = Field(description="The day and time the user's access will expire.")
expiration_date: Optional[datetime] = Field(default=None, description="The day and time the user's access will expire.")
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["resource_id", "user_id", "access_level", "status", "expiration_date"]

Expand Down

0 comments on commit c617448

Please sign in to comment.