Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #5389
Closed
Open
Issue created Feb 20, 2020 by Administrator@rootContributor5 of 6 checklist items completed5/6 checklist items

[BUG][SPRING] SpringBoot module generates api with wrong date format on nested objects

Created by: qbixsd

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • What's the version of OpenAPI Generator used?
  • Have you search for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Bounty to sponsor the fix (example)
Description

When setting contract, that accepts object with string defined as date, the default format to parse that is still SHORT, instead of ISO. The issue https://github.com/OpenAPITools/openapi-generator/issues/2053 has fixed the problem only when the controller method accepts the date directly. It's not working as supposed, when the controller accepts the objects based on query params.

openapi-generator version

4.2.3

OpenAPI declaration file content or url

https://github.com/qbixsd/openapi-test/blob/master/openapi-test-contract/src/main/resources/api.yaml

Command line used for generation

mvn clean compile

Steps to reproduce

run tests for openapi-test-implementation module from https://github.com/qbixsd/openapi-test

  • test for firstEndpoint (with dates defined at contract root) passes with ISO dates
  • both tests for secondEndpoint (with dates defined in nested objects) fail due to contract accepting dates as SHORT instead of ISO
Related issues/PRs

https://github.com/OpenAPITools/openapi-generator/issues/2053

Suggest a fix

Maybe it would be a good idea to fill in Json deserializing annotations on given properties in a model?

Assignee
Assign to
Time tracking