Align NotificationConfigurationService eventTypes descriptions - #78
Open
compair-steven wants to merge 1 commit into
Open
Align NotificationConfigurationService eventTypes descriptions#78compair-steven wants to merge 1 commit into
compair-steven wants to merge 1 commit into
Conversation
This file contains hidden or 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
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.
Summary
This updates the
eventTypesdescriptions in the Notification Configuration API specs so the documented permitted values match the enum values already present in the schema.Why
While reviewing the OpenAPI definitions, I noticed the
TestNotificationConfigurationRequestandTestNotificationConfigurationResponsedescriptions list a narrower set of permitted event types than the actualitems.enum. The descriptions list 15 values, while the schema enum contains 25 values in both request and response schemas across NotificationConfigurationService v1-v6.I used the schema enum as the source of truth. The values added to the prose are already present in the current OpenAPI definitions'
items.enum; several of them are also represented in neighboring current API surfaces. For example,MarketPayNotificationService-v6exposes webhook endpoints/examples such as/ACCOUNT_CLOSED,/ACCOUNT_FUNDS_BELOW_THRESHOLD,/DIRECT_DEBIT_INITIATED, and/REFUND_FUNDS_TRANSFER, andFundService-v6links the direct-debit flow to theDIRECT_DEBIT_INITIATEDnotification webhook.The generated Node and Java SDKs also expose the same values on
TestNotificationConfigurationRequestandTestNotificationConfigurationResponse, so this change aligns the prose with values that are already visible to SDK users.This keeps the JSON and YAML definitions consistent for users importing the specs into API tooling.
Testing
jq empty json/NotificationConfigurationService-v{1,2,3,4,5,6}.jsonruby -e 'require "yaml"; ARGV.each { |f| YAML.load_file(f) }; puts "YAML parse OK"' yaml/NotificationConfigurationService-v{1,2,3,4,5,6}.yamleventTypesdescriptions now mention every enum value in v1-v6.