Skip to content

Commit

Permalink
chore: fix datetime formats
Browse files Browse the repository at this point in the history
  • Loading branch information
shgokita committed Dec 26, 2024
1 parent 95b0788 commit ed39a02
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 54 deletions.
12 changes: 6 additions & 6 deletions backend/oas/provider/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ components:
updated_at:
type: string
format: date-time
example: '2022-10-19T11:45:34'
example: '2022-10-19T11:45:34+09:00'
required: []
example:
job_id: 7af020f6-2e38-4d70-8cf0-4349650ea08c
Expand Down Expand Up @@ -557,8 +557,8 @@ components:
job_type: sampling
shots: 1000
status: submitted
created_at: '2022-10-19T11:45:34'
updated_at: '2022-10-19T11:45:34'
created_at: '2022-10-19T11:45:34+09:00'
updated_at: '2022-10-19T11:45:34+09:00'
jobs.JobDef:
type: object
properties:
Expand Down Expand Up @@ -618,7 +618,7 @@ components:
updated_at:
type: string
format: date-time
example: '2022-10-19T11:45:34'
example: '2022-10-19T11:45:34+09:00'
required:
- job_id
- device_id
Expand Down Expand Up @@ -664,8 +664,8 @@ components:
job_type: sampling
shots: 1000
status: submitted
created_at: '2022-10-19T11:45:34'
updated_at: '2022-10-19T11:45:34'
created_at: '2022-10-19T11:45:34+09:00'
updated_at: '2022-10-19T11:45:34+09:00'
jobs.JobStatusUpdate:
type: object
properties:
Expand Down
12 changes: 6 additions & 6 deletions backend/oas/provider/schemas/jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ jobs.JobDef:
updated_at:
type: string
format: date-time
example: 2022-10-19T11:45:34
example: 2022-10-19T11:45:34+09:00
required:
- job_id
- device_id
Expand Down Expand Up @@ -211,8 +211,8 @@ jobs.JobDef:
job_type: sampling
shots: 1000
status: submitted
created_at: 2022-10-19T11:45:34
updated_at: 2022-10-19T11:45:34
created_at: 2022-10-19T11:45:34+09:00
updated_at: 2022-10-19T11:45:34+09:00

jobs.GetJobsResponse:
type: object
Expand Down Expand Up @@ -273,7 +273,7 @@ jobs.GetJobsResponse:
updated_at:
type: string
format: date-time
example: 2022-10-19T11:45:34
example: 2022-10-19T11:45:34+09:00
required: []
example:
job_id: 7af020f6-2e38-4d70-8cf0-4349650ea08c
Expand Down Expand Up @@ -319,8 +319,8 @@ jobs.GetJobsResponse:
job_type: sampling
shots: 1000
status: submitted
created_at: 2022-10-19T11:45:34
updated_at: 2022-10-19T11:45:34
created_at: 2022-10-19T11:45:34+09:00
updated_at: 2022-10-19T11:45:34+09:00

jobs.JobStatusUpdate:
type: object
Expand Down
12 changes: 6 additions & 6 deletions backend/oas/user/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -825,11 +825,11 @@ components:
created_at:
type: string
format: date-time
example: '2022-10-19T11:45:34'
example: '2022-10-19T11:45:34+09:00'
updated_at:
type: string
format: date-time
example: '2022-10-19T11:45:34'
example: '2022-10-19T11:45:34+09:00'
required:
- name
- device_id
Expand Down Expand Up @@ -884,11 +884,11 @@ components:
created_at:
type: string
format: date-time
example: '2022-10-19T11:45:34Z'
example: '2022-10-19T11:45:34+09:00'
updated_at:
type: string
format: date-time
example: '2022-10-19T11:45:34Z'
example: '2022-10-19T11:45:34+09:00'
required:
- job_id
- name
Expand All @@ -915,8 +915,8 @@ components:
mitigation_info: '{ "ro_error_mitigation": "pseudo_inverse" }'
shots: 1000
status: submitted
created_at: '2022-10-19T11:45:34'
updated_at: '2022-10-19T11:45:34'
created_at: '2022-10-19T11:45:34+09:00'
updated_at: '2022-10-19T11:45:34+09:00'
success.SuccessResponse:
type: object
properties:
Expand Down
12 changes: 6 additions & 6 deletions backend/oas/user/schemas/jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,11 @@ jobs.JobDef:
created_at:
type: string
format: date-time
example: 2022-10-19T11:45:34Z
example: 2022-10-19T11:45:34+09:00
updated_at:
type: string
format: date-time
example: 2022-10-19T11:45:34Z
example: 2022-10-19T11:45:34+09:00
required:
- job_id
- name
Expand Down Expand Up @@ -221,8 +221,8 @@ jobs.JobDef:
{ "ro_error_mitigation": "pseudo_inverse" }
shots: 1000
status: submitted
created_at: 2022-10-19T11:45:34
updated_at: 2022-10-19T11:45:34
created_at: 2022-10-19T11:45:34+09:00
updated_at: 2022-10-19T11:45:34+09:00


jobs.SubmitJobRequest:
Expand Down Expand Up @@ -270,11 +270,11 @@ jobs.SubmitJobRequest:
created_at:
type: string
format: date-time
example: 2022-10-19T11:45:34
example: 2022-10-19T11:45:34+09:00
updated_at:
type: string
format: date-time
example: 2022-10-19T11:45:34
example: 2022-10-19T11:45:34+09:00
required:
- name
- device_id
Expand Down
12 changes: 6 additions & 6 deletions backend/oqtopus_cloud/provider/schemas/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ class GetJobsResponse(BaseModel):
created_at: Annotated[
datetime | None, Field(examples=["2022-10-19T11:45:34+09:00"])
] = None
updated_at: Annotated[datetime | None, Field(examples=["2022-10-19T11:45:34"])] = (
None
)
updated_at: Annotated[
datetime | None, Field(examples=["2022-10-19T11:45:34+09:00"])
] = None


class JobDef(BaseModel):
Expand Down Expand Up @@ -144,9 +144,9 @@ class JobDef(BaseModel):
] = None
status: JobStatus
created_at: Annotated[datetime, Field(examples=["2022-10-19T11:45:34+09:00"])]
updated_at: Annotated[datetime | None, Field(examples=["2022-10-19T11:45:34"])] = (
None
)
updated_at: Annotated[
datetime | None, Field(examples=["2022-10-19T11:45:34+09:00"])
] = None


class JobStatusUpdate(BaseModel):
Expand Down
24 changes: 12 additions & 12 deletions backend/oqtopus_cloud/user/schemas/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,12 @@ class SubmitJobRequest(BaseModel):
"""
shots: Annotated[int, Field(examples=[1000])]
status: Annotated[JobStatus | None, Field(examples=["submitted"])] = None
created_at: Annotated[datetime | None, Field(examples=["2022-10-19T11:45:34"])] = (
None
)
updated_at: Annotated[datetime | None, Field(examples=["2022-10-19T11:45:34"])] = (
None
)
created_at: Annotated[
datetime | None, Field(examples=["2022-10-19T11:45:34+09:00"])
] = None
updated_at: Annotated[
datetime | None, Field(examples=["2022-10-19T11:45:34+09:00"])
] = None


class SubmitJobResponse(BaseModel):
Expand Down Expand Up @@ -191,12 +191,12 @@ class JobDef(BaseModel):
mitigation_info: Annotated[
str | None, Field(examples=['{\n "ro_error_mitigation": "pseudo_inverse"\n}'])
] = None
created_at: Annotated[datetime | None, Field(examples=["2022-10-19T11:45:34Z"])] = (
None
)
updated_at: Annotated[datetime | None, Field(examples=["2022-10-19T11:45:34Z"])] = (
None
)
created_at: Annotated[
datetime | None, Field(examples=["2022-10-19T11:45:34+09:00"])
] = None
updated_at: Annotated[
datetime | None, Field(examples=["2022-10-19T11:45:34+09:00"])
] = None


class GetJobStatusResponse(BaseModel):
Expand Down
12 changes: 6 additions & 6 deletions docs/oas/provider/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ components:
updated_at:
type: string
format: date-time
example: '2022-10-19T11:45:34'
example: '2022-10-19T11:45:34+09:00'
required: []
example:
job_id: 7af020f6-2e38-4d70-8cf0-4349650ea08c
Expand Down Expand Up @@ -557,8 +557,8 @@ components:
job_type: sampling
shots: 1000
status: submitted
created_at: '2022-10-19T11:45:34'
updated_at: '2022-10-19T11:45:34'
created_at: '2022-10-19T11:45:34+09:00'
updated_at: '2022-10-19T11:45:34+09:00'
jobs.JobDef:
type: object
properties:
Expand Down Expand Up @@ -618,7 +618,7 @@ components:
updated_at:
type: string
format: date-time
example: '2022-10-19T11:45:34'
example: '2022-10-19T11:45:34+09:00'
required:
- job_id
- device_id
Expand Down Expand Up @@ -664,8 +664,8 @@ components:
job_type: sampling
shots: 1000
status: submitted
created_at: '2022-10-19T11:45:34'
updated_at: '2022-10-19T11:45:34'
created_at: '2022-10-19T11:45:34+09:00'
updated_at: '2022-10-19T11:45:34+09:00'
jobs.JobStatusUpdate:
type: object
properties:
Expand Down
12 changes: 6 additions & 6 deletions docs/oas/user/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -825,11 +825,11 @@ components:
created_at:
type: string
format: date-time
example: '2022-10-19T11:45:34'
example: '2022-10-19T11:45:34+09:00'
updated_at:
type: string
format: date-time
example: '2022-10-19T11:45:34'
example: '2022-10-19T11:45:34+09:00'
required:
- name
- device_id
Expand Down Expand Up @@ -884,11 +884,11 @@ components:
created_at:
type: string
format: date-time
example: '2022-10-19T11:45:34Z'
example: '2022-10-19T11:45:34+09:00'
updated_at:
type: string
format: date-time
example: '2022-10-19T11:45:34Z'
example: '2022-10-19T11:45:34+09:00'
required:
- job_id
- name
Expand All @@ -915,8 +915,8 @@ components:
mitigation_info: '{ "ro_error_mitigation": "pseudo_inverse" }'
shots: 1000
status: submitted
created_at: '2022-10-19T11:45:34'
updated_at: '2022-10-19T11:45:34'
created_at: '2022-10-19T11:45:34+09:00'
updated_at: '2022-10-19T11:45:34+09:00'
success.SuccessResponse:
type: object
properties:
Expand Down

0 comments on commit ed39a02

Please sign in to comment.