Skip to content
New issue

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

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

Already on GitHub? # to your account

fix: policy hub post and get policy rules response structuring and error mapping #198

Conversation

leandro-cavalcante
Copy link
Contributor

Description

Enhanced the filter GET/POST for policyContent end point

Why

The current implementation of the GET/POST endpoint in the Policy Hub does not respond as expected when fetching a policy based on specific criteria. When a user makes a call to retrieve a policy rule with a precise value, such as through the following curl command:

curl -X 'GET'
'https://policy-hub.int.catena-x.net/api/policy-hub/policy-content?type=Usage&policyName=UsagePurpose&operatorType=Equals&value=DataExchangeGovernance%3A1.0'
The API is expected to return the specific policy rule that matches the input criteria. However, the endpoint is currently returning an optional attribute response instead of the expected policy rule response.

Issue

N/A

Checklist

Please delete options that are not relevant.

  • I have followed the contributing guidelines

  • I have performed a self-review of my own code

  • I have successfully tested my changes locally

  • I have added tests that prove my changes work

  • I have checked that new and existing tests pass locally with my changes

niteshsakhiya and others added 15 commits June 26, 2024 18:13
…ctusx#3)

Added workflow for PR linting and updated PR template
- Added Github workflows for CI automation
…clipse-tractusx#17)

Co-authored-by: Nitesh Sakhiya <37956326+niteshsakhiya@users.noreply.github.com>
Co-authored-by: Arnab Kumar Nandy (Cofinity-X) <150015794+arnabcx@users.noreply.github.com>
…m chart structure (eclipse-tractusx#18)

Co-authored-by: Arnab Kumar Nandy <arnab.nandy˛cofinity-x.com>
…cfx-1

feat: **R24.08** with application version `v1.1.0`
…ctusx#19)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Arnab Kumar Nandy <arnab.nandy˛cofinity-x.com>
Co-authored-by: leandro-cavalcante <leandro.cavalcante@cofinity-x.com>
…olicy-Hub-POST/GET-Policy-Rules-Response-Structuring' into bugfix/Policy-Hub-POST-and-GET-Policy-Rules-Response-Structuring-and-error-mapping

	modified:   src/hub/PolicyHub.Service/BusinessLogic/PolicyHubBusinessLogic.cs
	modified:   src/hub/PolicyHub.Service/Controllers/PolicyHubController.cs
	modified:   tests/hub/PolicyHub.Service.Tests/BusinessLogic/PolicyHubBusinessLogicTests.cs
@leandro-cavalcante leandro-cavalcante deleted the bugfix/Policy-Hub-POST-and-GET-Policy-Rules-Response-Structuring-and-error-mapping branch September 16, 2024 15:16
@leandro-cavalcante leandro-cavalcante restored the bugfix/Policy-Hub-POST-and-GET-Policy-Rules-Response-Structuring-and-error-mapping branch September 16, 2024 15:16
@leandro-cavalcante leandro-cavalcante deleted the bugfix/Policy-Hub-POST-and-GET-Policy-Rules-Response-Structuring-and-error-mapping branch September 16, 2024 15:16
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
Status: USER READY
Development

Successfully merging this pull request may close these issues.

3 participants