-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add endpoints for managing API delivery channel policies #739
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fa80cbb
to
078bafe
Compare
…model, basic DeliveryChannelPoliciesController
…cy request, implement GetDeliveryChannelPolicy in policies controller
…o DeliveryChannelPolicy hydra model, add ToDlcsModel() method to DeliveryChannelPolicyConverter
…_IfNotFound() tests
…lPolicy to IsValidDeliveryChannel
… /deliveryChannelPolicies/{deliveryChannelName} is valid
…for clarity, turn IsValidDeliveryChannel into a separate method, check isPermittedDeliveryChannel in DELETE
…y qualified name for DeliveryChannelPolicy, add tests for HydraDeliveryChannelPolicyValidator
…e DeliveryChannelPolicyDataValidator non-static, change iiif-av policyData validation to just require a single string value
…annelInvalid tests
… capital letters, add tests that ensure this rule is enforced
0d1fa83
to
8fc766a
Compare
…its Id (e.g customer/27/iiif-img would appear instead of customer/27/deliveryChannelPolicies/iiif-img), Null coalesce Created and Modified in HydraDeliveryChannelPolicy.ToDlcsModel
donaldgray
reviewed
Feb 22, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall lgtm, left some comments - mostly around where things sit
src/protagonist/API/Features/DeliveryChannels/DeliveryChannelPoliciesController.cs
Outdated
Show resolved
Hide resolved
src/protagonist/API/Features/DeliveryChannels/DeliveryChannelPoliciesController.cs
Outdated
Show resolved
Hide resolved
src/protagonist/API/Features/DeliveryChannels/DeliveryChannelPoliciesController.cs
Outdated
Show resolved
Hide resolved
src/protagonist/API/Features/DeliveryChannels/DeliveryChannelPoliciesController.cs
Show resolved
Hide resolved
src/protagonist/API/Features/DeliveryChannels/DeliveryChannelPoliciesController.cs
Outdated
Show resolved
Hide resolved
src/protagonist/Test.Helpers/Integration/DlcsDatabaseFixture.cs
Outdated
Show resolved
Hide resolved
src/protagonist/API/Features/DeliveryChannels/Validation/HydraDeliveryChannelPolicyValidator.cs
Show resolved
Hide resolved
...st/API.Tests/Features/DeliveryChannels/Validation/DeliveryChannelPolicyDataValidatorTests.cs
Outdated
Show resolved
Hide resolved
...t/API.Tests/Features/DeliveryChannels/Validation/HydraDeliveryChannelPolicyValidatorTests.cs
Outdated
Show resolved
Hide resolved
… nothing is changed)
…ger documentation, Replace IsValidDeliveryChannel() in DeliveryChannelPoliciesController to AssetDeliveryChannels.IsValidChannel(),Add DeliveryChannelPolicyDataValidator as singleton, Fix 'iif-img' typo
Remove implicit conversion of customer Ids in database fixture Shorten ValidateTimeBasedPolicyData checks Remove redundant setters Change DELETE delivery channel policy to only allow delivery channel policies owned by the customer to be deleted Return false instead of setting isInvalid to true when parsing size parameter Allow iiif-av policyData to contain multiple transcode policies, update tests
JackLewis-digirati
approved these changes
Feb 23, 2024
src/protagonist/API/Features/DeliveryChannels/Requests/GetDeliveryChannelPolicies.cs
Outdated
Show resolved
Hide resolved
…remove redundant exception definition from DeliveryChannelPolicyDataValidator
a09c450
to
b0e9ef6
Compare
Rename GetDeliveryChannelPolicies to GetPoliciesFromDeliveryChannel Remove whitespace in AssetDeliveryChannels Add test for ensuring that attempting to POST a delivery channel with a name that's taken returns a 409 Include displayName and policyData in PatchDeliveryChannelPolicy request constructor Only attempt to patch a delivery channel policy if a field has been changed Allow empty strings to be specified in delivery channel policy PATCH Move policy data validation into HydraDeliveryChannelPolicyValidator Handle channel validation logic in HydraDeliveryChannelPolicyValidator
JackLewis-digirati
approved these changes
Feb 26, 2024
donaldgray
reviewed
Feb 27, 2024
src/protagonist/API/Features/DeliveryChannels/Requests/GetPoliciesFromDeliveryChannel.cs
Outdated
Show resolved
Hide resolved
src/protagonist/API/Features/DeliveryChannels/Requests/GetDeliveryChannelPolicyCollections.cs
Show resolved
Hide resolved
src/protagonist/API/Features/DeliveryChannels/Requests/CreateDeliveryChannelPolicy.cs
Outdated
Show resolved
Hide resolved
Add DbUpdateException extensions, use GetDatabaseError() to determine conflict when creating new delivery channel policies Remove redundant setters Rename GetPoliciesFromDeliveryChannel to GetPoliciesForDeliveryChannel
7b96654
to
a60fe8f
Compare
… return type of GetDeliveryChannelPolicyCollections handler to Dictionary<string,string>
donaldgray
approved these changes
Feb 27, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #719
This PR adds:
DeliveryChannelPolicy
Hydra modelDeliveryChannelPolicy
policyData