Bug Report Checklist
Description
The JSON object mapper used for deserialization of java OffsetDateTimes does not keep the timezone as returned by the service.
openapi-generator version
5.0.0
OpenAPI declaration file content or url
openapi: 3.0.3
info:
title: keep-timezone
version: 1.0.0
paths:
/test:
get:
operationId: test
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Response'
components:
schemas:
Response:
type: object
properties:
date:
nullable: true
type: string
format: date-time
Generation Details
Generate java client with native library.
Steps to reproduce
Related issues/PRs
Suggest a fix
Adding mapper.disable(DeserializationFeature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE) to the object mapper configuration fixes the bug.
Bug Report Checklist
Description
The JSON object mapper used for deserialization of java OffsetDateTimes does not keep the timezone as returned by the service.
openapi-generator version
5.0.0
OpenAPI declaration file content or url
Generation Details
Generate java client with native library.
Steps to reproduce
Related issues/PRs
Suggest a fix
Adding mapper.disable(DeserializationFeature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE) to the object mapper configuration fixes the bug.