-
Notifications
You must be signed in to change notification settings - Fork 13
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
Unexpected response for POST policy-content - Purpose #68
Comments
@AnuragNagpure here the open points as discussed in the call. PolicyAttributes remove - ID Trace 3.1 from policy_attributes map attribute_values: purpose.trace.v1.traceBattery to polcy_id = 01a0fba3-9b6e-435a-b045-e0e890c300c2 Policies remove the following policies including the linked data 01a0fba3-9b6e-435a-b045-e0e890c300b7 add a check to the post endpoint to validate the value of the request to be existing in the attributes_value table for the given policy /cc @jjeroch |
* technicalkey validation with error message added * value validation with error message added --------- Refs: #68 Co-authored-by: Phil Schneider <[email protected]> Reviewed-by: Phil Schneider <[email protected]>
@AnuragNagpure I can not approve the development, still I can request the following:
and I receive a success message - this should not be allowed. The user can only request UsagePurposes which are configured in the DB - please recheck. Only the following "values" should get a 200 success message:
In detail: if the value for "UsagePurpose" does not match a value from the DB, an error is expected |
test execution was done in INT: https://policy-hub.int.demo.catena-x.net/api/policy-hub/swagger/index.html |
Just to clarify, the latest released version for the policy hub was the 1.0.0 version, depending on how extensive this fix will be, it might be released as part of the 1.1.0 version but probably it will be a 1.0.1 version. |
Refs: #68 Reviewed-By: Phil Schneider <[email protected]>
Detected in version: 24.03.
Endpoint: POST /api/policy-hub/policy-content
Request body
Current Behavior
Expected Behavior
Error message with http status code 400 that value is not allowed. Only backend stored purposes are allowed; any other should run on an error
The implementation should include the following requirements:
Please ensure that the implementation adheres to these guidelines.
NOTE - the new type ContractReference allows free text entries. Please make sure that you only fix the issue where it makes sense (purpose policy and likely also for frameworks)
The text was updated successfully, but these errors were encountered: