DependencyTrack / dependency-track

Dependency-Track is an intelligent Component Analysis platform that allows organizations to identify and reduce risk in the software supply chain.
https://dependencytrack.org/
Apache License 2.0
2.61k stars 553 forks source link

Fix OpenAPI types of UNIX timestamp fields #3731

Closed nscuro closed 4 months ago

nscuro commented 4 months ago

Description

Fields of type Date that are not explicitly serialized with Iso8601DateSerializer are automatically serialized as UNIX epoch timestamp in milliseconds. However the OpenAPI spec declared them to be of type string in date-time format, which is incorrect.

Instead of changing the field's actual type, causing a breaking change, provide a type hint to the OpenAPI generator.

Addressed Issue

Fixes #1276 Fixes #2591

Additional Details

image

Checklist

codacy-production[bot] commented 4 months ago

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
:white_check_mark: +0.00% (target: -1.00%) :white_check_mark: (target: 70.00%)
Coverage variation details | | Coverable lines | Covered lines | Coverage | | ------------- | ------------- | ------------- | ------------- | | Common ancestor commit (7573f394d7892c913e2b46d38f2cbbd901bc806c) | 21648 | 16402 | 75.77% | | | Head commit (a7119e8d237334099edeeabad689880157466f2b) | 21648 (+0) | 16402 (+0) | 75.77% (**+0.00%**) | **Coverage variation** is the difference between the coverage for the head and common ancestor commits of the pull request branch: ` - `
Diff coverage details | | Coverable lines | Covered lines | Diff coverage | | ------------- | ------------- | ------------- | ------------- | | Pull request (#3731) | 0 | 0 | **∅ (not applicable)** | **Diff coverage** is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: `/ * 100%`

See your quality gate settings    Change summary preferences

Codacy will stop sending the deprecated coverage status from June 5th, 2024. Learn more