Skip to content

feat: no longer throw unexpected NoPropertiesProvidedException #776

Closed
2 of 2 issues completed
Closed

Description

@jkowalleck

some classes have only optional arguments/properties.

for some reason, they throw NoPropertiesProvidedException('At least one of ... must be provided for ...').
this is (at least with CDX 1.6) not true for most data models. Per spec, most models really dont require any properties.

This is especially annoying when you wanted to start with an empty object and add properties later. You simply cant, starting with an empty one will just throw an Error and that is it.

goal

allow creation of empty objects/model where the spec allows it.

implementation

make all these NoPropertiesProvidedException warnings.
or remove them entirely.

Known Exceptions:

  • Licenses: either id or name must be given

see also

Activity

  1. changed the title [-]donoever throw a `NoPropertiesProvidedException`[/-] [+]feat: do longer throw unexpected `NoPropertiesProvidedException`[/+] on Feb 11, 2025
  2. indiVar0508 commented on Feb 11, 2025

    @indiVar0508
    Contributor

    Hi

    I would like to volunteer for this issue!

  3. jkowalleck commented on Feb 12, 2025

    @jkowalleck
    MemberAuthor

    I would like to volunteer for this issue!

    sure. go ahead, @indiVar0508
    please open a draft pullrequest early, and i will assign you this ticket then.

  4. changed the title [-]feat: do longer throw unexpected `NoPropertiesProvidedException`[/-] [+]feat: no longer throw unexpected `NoPropertiesProvidedException`[/+] on Feb 12, 2025
  5. indiVar0508 commented on Feb 18, 2025

    @indiVar0508
    Contributor

    Hi @jkowalleck ,
    raised a draft PR for in #786 , removed only for one place and documented in PR desc places where i found
    steps followed

    1. remove the condition
    2. update the test

    you can check once if you are ok with removal then will update PR removing all of them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions