OpenConext / OpenConext-attribute-aggregation

OpenConext attribute aggregation
Apache License 2.0
1 stars 2 forks source link

Add filter support for mapping in REST Attribute Aggregator #47

Closed Jong-Vincent closed 1 year ago

Jong-Vincent commented 1 year ago

Made some changes to the REST Attribute Aggregator:

The latter can be used to support a response such as

{
  "results": [
    {
      "prop1": "<val1>",
      "prop2": [
        {
          "subProp1": "<subVal1a>",
          "subProp2": false
        },
        {
          "subProp1": "<subVal1b>",
          "subProp2": false
        },
        {
          "subProp1": "<subVal1c>",
          "subProp2": true
        }
      ]
    }
  ],
  "count": 1
}

In this case it is now possible to map 'subProp2' where subProp1='subVal1c' to a specific attribute.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.27 :tada:

Comparison is base (5140a96) 92.11% compared to head (3fa7497) 92.39%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #47 +/- ## ============================================ + Coverage 92.11% 92.39% +0.27% - Complexity 366 376 +10 ============================================ Files 65 66 +1 Lines 977 986 +9 Branches 59 59 ============================================ + Hits 900 911 +11 + Misses 54 53 -1 + Partials 23 22 -1 ``` | [Impacted Files](https://app.codecov.io/gh/OpenConext/OpenConext-attribute-aggregation/pull/47?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=OpenConext) | Coverage Δ | | |---|---|---| | [...a/aa/aggregators/rest/RestAttributeAggregator.java](https://app.codecov.io/gh/OpenConext/OpenConext-attribute-aggregation/pull/47?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=OpenConext#diff-YWEtc2VydmVyL3NyYy9tYWluL2phdmEvYWEvYWdncmVnYXRvcnMvcmVzdC9SZXN0QXR0cmlidXRlQWdncmVnYXRvci5qYXZh) | `98.59% <100.00%> (+3.00%)` | :arrow_up: | | [aa-server/src/main/java/aa/model/Mapping.java](https://app.codecov.io/gh/OpenConext/OpenConext-attribute-aggregation/pull/47?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=OpenConext#diff-YWEtc2VydmVyL3NyYy9tYWluL2phdmEvYWEvbW9kZWwvTWFwcGluZy5qYXZh) | `66.66% <100.00%> (+6.66%)` | :arrow_up: | | [...a-server/src/main/java/aa/model/MappingFilter.java](https://app.codecov.io/gh/OpenConext/OpenConext-attribute-aggregation/pull/47?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=OpenConext#diff-YWEtc2VydmVyL3NyYy9tYWluL2phdmEvYWEvbW9kZWwvTWFwcGluZ0ZpbHRlci5qYXZh) | `100.00% <100.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

oharsta commented 1 year ago

@Jong-Vincent Github reports that the code coverage has dropped and therefore some checks were not successful. Is it possible for you to add tests to remedy this?

Jong-Vincent commented 1 year ago

Added additional test and made a minor improvement in the mapping filter handling