Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing Signature model JsonInclude.Include.NON_EMPTY #272

Merged
merged 1 commit into from
Feb 27, 2023

Conversation

andrew-m-leonard
Copy link
Contributor

Adds JsonInclude.Include.NON_EMPTY to the Signature model, to prevent "null" or "" property generation.

Fixes: #271

Signed-off-by: Andrew Leonard <anleonar@redhat.com>
@andrew-m-leonard
Copy link
Contributor Author

andrew-m-leonard commented Feb 27, 2023

PR resolves issue:
Signed openkeystore JSON:

{
   "bomFormat": "CycloneDX",
   "specVersion": "1.4",
   "version": 1,
   "signature": {
        "algorithm": "RS256",
        "value": "key......"
   }
}

Generated CycloneDX JSON with Signature having round-tripped JSON->Bom->JSON:

{
    "bomFormat" : "CycloneDX",
    "specVersion" : "1.4",
    "version" : 1,
    "signature" : {
        "algorithm" : "RS256",
        "value" : "key............"
    }
}

@stevespringett stevespringett merged commit 576a357 into CycloneDX:master Feb 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BomJsonGenerator of Signature JSON produces "null" properties
2 participants