From 7977676acbe32319f8bb52353d0bf7c620837522 Mon Sep 17 00:00:00 2001 From: Kanwar Saad Bin Liaqat Date: Thu, 19 Sep 2019 03:40:48 +0300 Subject: [PATCH] parse datetime as string due to bug in sushi emulator, we will parse manager's time as string instead of datetime. --- client/api/openapi.yaml | 4 ++-- client/docs/Manager.md | 2 +- client/model_manager.go | 5 +---- spec/openapi.yaml | 3 ++- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/client/api/openapi.yaml b/client/api/openapi.yaml index c04453d..ca7e105 100644 --- a/client/api/openapi.yaml +++ b/client/api/openapi.yaml @@ -879,7 +879,7 @@ components: ServiceEntryPointUUID: ServiceEntryPointUUID '@odata.type': '@odata.type' '@odata.context': '@odata.context' - DateTime: 2000-01-23T04:56:07.000+00:00 + DateTime: DateTime FirmwareVersion: FirmwareVersion Name: Name '@odata.id': '@odata.id' @@ -945,7 +945,7 @@ components: Status: $ref: '#/components/schemas/Status' DateTime: - format: date-time + format: string nullable: true readOnly: false type: string diff --git a/client/docs/Manager.md b/client/docs/Manager.md index 3ff97bc..5fc6a35 100644 --- a/client/docs/Manager.md +++ b/client/docs/Manager.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes **Model** | Pointer to **string** | | [optional] **ManagerType** | [**ManagerType**](ManagerType.md) | | [optional] **Status** | [**Status**](Status.md) | | [optional] -**DateTime** | Pointer to [**time.Time**](time.Time.md) | | [optional] +**DateTime** | Pointer to **string** | | [optional] **DateTimeLocalOffset** | Pointer to **string** | The time offset from UTC that the DateTime property is set to in format: +06:00 . | [optional] **Description** | Pointer to **string** | description | [optional] **EthernetInterfaces** | [**IdRef**](idRef.md) | | [optional] diff --git a/client/model_manager.go b/client/model_manager.go index bc09d47..d2b5849 100644 --- a/client/model_manager.go +++ b/client/model_manager.go @@ -8,9 +8,6 @@ */ package client -import ( - "time" -) // Redfish manager resource. type Manager struct { @@ -31,7 +28,7 @@ type Manager struct { Model *string `json:"Model,omitempty"` ManagerType ManagerType `json:"ManagerType,omitempty"` Status Status `json:"Status,omitempty"` - DateTime *time.Time `json:"DateTime,omitempty"` + DateTime *string `json:"DateTime,omitempty"` // The time offset from UTC that the DateTime property is set to in format: +06:00 . DateTimeLocalOffset *string `json:"DateTimeLocalOffset,omitempty"` // description diff --git a/spec/openapi.yaml b/spec/openapi.yaml index a5df3be..b15988d 100644 --- a/spec/openapi.yaml +++ b/spec/openapi.yaml @@ -465,7 +465,8 @@ components: 'Status': $ref: '#/components/schemas/Status' 'DateTime': - format: date-time + #format: date-time + format: string nullable: true readOnly: false type: string