Skip to content

Request: add active flag support for ConstructorItem #170

Closed

Description

@ahmedmaazin

Add active flag support

  • Introduce a new active boolean property in ConstructorItem.
  • Ideally a new signature when initialising the ConstructorItem
  • The default could be true.

E.g.

   public ConstructorItem(String id, String name, Boolean active) throws IllegalArgumentException {
        if (id == null) {
            throw new IllegalArgumentException("id is required");
        }

        this.id = id;
        this.name = name;
        this.active = active;
        this.suggestedScore = null;
        this.keywords = null;
        this.url = null;
        this.imageUrl = null;
        this.description = null;
        this.facets = null;
        this.metadata = null;
        this.groupIds = null;
    }

p.s. I am raising this issue because I couldn't verify if the active is by default true for createOrReplaceItems endpoint. I also couldn't not find in the sdk the logic for it. Lastly, I tried to contribute and I could not push my branch into this repo :)

Activity

  1. esezen commented on Oct 20, 2025

    @esezen
    Contributor

    Hey @ahmedmaazin , thanks for opening this issue. We don't have any special logic for active field at the moment but you can still put it into your metadata object and it will work as expected. However, I understand it would be more convenient if it was a field that you can set similar to description. Let me look into this and open up a PR. In the meantime, if you would like to contribute, you can always fork this repository and open up a PR that way. Let me know if that works!

  2. esezen commented on Oct 20, 2025

    @esezen
    Contributor

    Hey @ahmedmaazin , I created a PR here: #171
    It does not change the constructor but it gives you the getters/setters to set it. If setting this field when initializing the class is important for you, please let me know and we will discuss it internally to see if we can support it

  3. ahmedmaazin commented on Oct 20, 2025

    @ahmedmaazin
    ContributorAuthor

    Hey @ahmedmaazin , I created a PR here: #171 It does not change the constructor but it gives you the getters/setters to set it. If setting this field when initializing the class is important for you, please let me know and we will discuss it internally to see if we can support it

    Hey thanks a lot, I did not see this comment/pr at the time and went ahead and pushed my branch with the desired changes. Let me take a look what you have added :)

  4. ahmedmaazin commented on Oct 20, 2025

    @ahmedmaazin
    ContributorAuthor

    Hey @ahmedmaazin , I created a PR here: #171 It does not change the constructor but it gives you the getters/setters to set it. If setting this field when initializing the class is important for you, please let me know and we will discuss it internally to see if we can support it

    Hey thanks a lot, I did not see this comment/pr at the time and went ahead and pushed my branch with the desired changed. Let me take a look what you have added :)

    It is actually not important to set it when I initialise the ConstructorItem if I can later use the setActive() method when I need it.

  5. esezen commented on Oct 23, 2025

    @esezen
    Contributor

    Hey @ahmedmaazin , the change has been merged and it's available in the latest version of the library. Thanks again for the suggestion!

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions