-
Notifications
You must be signed in to change notification settings - Fork 4
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
[CDSADAPTERS-2187]: Added integration dependency for cds import for events #94
Open
Dipto-at-sap
wants to merge
12
commits into
main
Choose a base branch
from
integration_dependency
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
f94a447
Add integration depencdency cds import for events
Dipto-at-sap feb6537
Update based on Suggestions
Dipto-at-sap 1190849
Small Fix
Dipto-at-sap 2ec62d7
Fix conflicting branch
Dipto-at-sap 383486d
Merge branch 'main' into integration_dependency
RoshniNaveenaS 2b5f7b7
Add validation for cds requires
Dipto-at-sap 6b50416
Merge branch 'main' into integration_dependency
Dipto-at-sap cbb0808
Add Test case for integrationDependency and update snapshots
Dipto-at-sap 9268a91
Add more test cases for integrationDependency
Dipto-at-sap b4f60c4
Modify the integrationDependencies attribute name
Dipto-at-sap 2b2e379
Fix branch conflicts
Dipto-at-sap 6d0f266
Update the PR based on review comments
Dipto-at-sap File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
30 changes: 30 additions & 0 deletions
30
__tests__/bookshop/srv/external/CE_BUSINESSPARTNEREVENTS.asyncapi.cds
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* checksum : 7c2129da2e89fec3fefa1cfb12090b2c */ | ||
@cds.external : 'true' | ||
@AsyncAPI.Extensions : { | ||
![sap-catalog-spec-version]: '1.0', | ||
![sap-api-type]: 'EVENT' | ||
} | ||
@AsyncAPI.ShortText : 'Informs a remote system about created and changed business partners in an SAP S/4HANA Cloud tenant.' | ||
@AsyncAPI.StateInfo : { state: 'ACTIVE' } | ||
@AsyncAPI.Title : 'Business Partner Events' | ||
@AsyncAPI.SchemaVersion : '1.0.0' | ||
@AsyncAPI.Description : ``` | ||
A business partner is an organization (company, subsidiary), person or group of people or organizations in which your company has a business interest. The following events are available for business partner:\r | ||
\r | ||
* Business partner changed\r | ||
* Business partner created | ||
``` | ||
service sap.s4.beh.businesspartner.v1.BusinessPartner {}; | ||
|
||
@cds.external : 'true' | ||
@topic : 'sap.s4.beh.businesspartner.v1.BusinessPartner.Changed.v1' | ||
event sap.s4.beh.businesspartner.v1.BusinessPartner.Changed.v1 { | ||
BusinessPartner : LargeString; | ||
}; | ||
|
||
@cds.external : 'true' | ||
@topic : 'sap.s4.beh.businesspartner.v1.BusinessPartner.Created.v1' | ||
event sap.s4.beh.businesspartner.v1.BusinessPartner.Created.v1 { | ||
BusinessPartner : LargeString; | ||
Dipto-at-sap marked this conversation as resolved.
Show resolved
Hide resolved
|
||
}; | ||
|
162 changes: 162 additions & 0 deletions
162
__tests__/bookshop/srv/external/CE_BUSINESSPARTNEREVENTS.asyncapi.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,162 @@ | ||
{ | ||
"asyncapi": "2.0.0", | ||
"x-sap-catalog-spec-version": "1.0", | ||
"info": { | ||
"title": "Business Partner Events", | ||
"version": "1.0.0", | ||
"description": "A business partner is an organization (company, subsidiary), person or group of people or organizations in which your company has a business interest. The following events are available for business partner:\r\n\r\n* Business partner changed\r\n* Business partner created" | ||
}, | ||
"x-sap-api-type": "EVENT", | ||
"x-sap-shortText": "Informs a remote system about created and changed business partners in an SAP S/4HANA Cloud tenant.", | ||
"x-sap-stateInfo": { | ||
"state": "ACTIVE" | ||
}, | ||
"channels": { | ||
"ce/sap/s4/beh/businesspartner/v1/BusinessPartner/Changed/v1": { | ||
"subscribe": { | ||
"message": { | ||
"$ref": "#/components/messages/sap_s4_beh_businesspartner_v1_BusinessPartner_Changed_v1" | ||
} | ||
} | ||
}, | ||
"ce/sap/s4/beh/businesspartner/v1/BusinessPartner/Created/v1": { | ||
"subscribe": { | ||
"message": { | ||
"$ref": "#/components/messages/sap_s4_beh_businesspartner_v1_BusinessPartner_Created_v1" | ||
} | ||
} | ||
} | ||
}, | ||
"components": { | ||
"messages": { | ||
"sap_s4_beh_businesspartner_v1_BusinessPartner_Changed_v1": { | ||
"name": "sap.s4.beh.businesspartner.v1.BusinessPartner.Changed.v1", | ||
"summary": "BusinessPartner Changed", | ||
"description": "This event is raised when Business Partner is changed.", | ||
"headers": { | ||
"properties": { | ||
"type": { | ||
"const": "sap.s4.beh.businesspartner.v1.BusinessPartner.Changed.v1" | ||
}, | ||
"datacontenttype": { | ||
"const": "application/json" | ||
} | ||
} | ||
}, | ||
"payload": { | ||
"$ref": "#/components/schemas/sap_s4_beh_businesspartner_v1_BusinessPartner_Changed_v1" | ||
}, | ||
"traits": [ | ||
{ | ||
"$ref": "#/components/messageTraits/CloudEventContext" | ||
} | ||
] | ||
}, | ||
"sap_s4_beh_businesspartner_v1_BusinessPartner_Created_v1": { | ||
"name": "sap.s4.beh.businesspartner.v1.BusinessPartner.Created.v1", | ||
"summary": "BusinessPartner Created", | ||
"description": "This event is raised when Business Partner is created.", | ||
"headers": { | ||
"properties": { | ||
"type": { | ||
"const": "sap.s4.beh.businesspartner.v1.BusinessPartner.Created.v1" | ||
}, | ||
"datacontenttype": { | ||
"const": "application/json" | ||
} | ||
} | ||
}, | ||
"payload": { | ||
"$ref": "#/components/schemas/sap_s4_beh_businesspartner_v1_BusinessPartner_Created_v1" | ||
}, | ||
"traits": [ | ||
{ | ||
"$ref": "#/components/messageTraits/CloudEventContext" | ||
} | ||
] | ||
} | ||
}, | ||
"schemas": { | ||
"sap_s4_beh_businesspartner_v1_BusinessPartner_Changed_v1": { | ||
"type": "object", | ||
"properties": { | ||
"BusinessPartner": { | ||
"description": "# Definition\r\n\r\nKey identifying a **business partner** in the SAP system. The key is unique within a client.", | ||
"type": "string", | ||
"maxLength": 10 | ||
} | ||
} | ||
}, | ||
"sap_s4_beh_businesspartner_v1_BusinessPartner_Created_v1": { | ||
"type": "object", | ||
"properties": { | ||
"BusinessPartner": { | ||
"description": "# Definition\r\n\r\nKey identifying a **business partner** in the SAP system. The key is unique within a client.", | ||
"type": "string", | ||
"maxLength": 10 | ||
} | ||
} | ||
} | ||
}, | ||
"messageTraits": { | ||
"CloudEventContext": { | ||
"headers": { | ||
"type": "object", | ||
"properties": { | ||
"specversion": { | ||
"description": "The version of the CloudEvents specification which the event uses. This enables the interpretation of the context.", | ||
"type": "string", | ||
"const": "1.0" | ||
}, | ||
"type": { | ||
"description": "Type of occurrence which has happened. Often this property is used for routing, observability, policy enforcement, etc.", | ||
"type": "string", | ||
"minLength": 1 | ||
}, | ||
"source": { | ||
"description": "This describes the event producer.", | ||
"type": "string", | ||
"format": "uri-reference" | ||
}, | ||
"subject": { | ||
"description": "The subject of the event in the context of the event producer (identified by source).", | ||
"type": "string", | ||
"minLength": 1 | ||
}, | ||
"id": { | ||
"description": "ID of the event.", | ||
"type": "string", | ||
"minLength": 1, | ||
"examples": [ | ||
"6925d08e-bc19-4ad7-902e-bd29721cc69b" | ||
] | ||
}, | ||
"time": { | ||
"description": "Timestamp of when the occurrence happened. Must adhere to RFC 3339.", | ||
"type": "string", | ||
"format": "date-time", | ||
"examples": [ | ||
"2018-04-05T17:31:00Z" | ||
] | ||
}, | ||
"datacontenttype": { | ||
"description": "Describe the data encoding format", | ||
"type": "string", | ||
"const": "application/json" | ||
} | ||
}, | ||
"required": [ | ||
"id", | ||
"specversion", | ||
"source", | ||
"type" | ||
] | ||
} | ||
} | ||
} | ||
}, | ||
"externalDocs": { | ||
"description": "Business Documentation", | ||
"url": "https://help.sap.com/http.svc/ahp2/SAP_S4HANA_CLOUD/2408.latest/EN/a7/5345282ddd4054a1e5ce7687e4b088/frameset.htm" | ||
} | ||
} |
Oops, something went wrong.
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.
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.
Shouldn't we have a similar structure/content in the
ORD/xmpl
folder?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.
@David-Kunz , is this a correct cds.requires statement? Kind odata sounds like API required, but model is an async API, so events...
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.
Yes, that is weird. I've only seen
*.cds
or*.json
files here.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.
But I don't know if
*.asyncapi
is also supported...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.
I think this should be a
.json
file. You could make it.asyncapi.json
if you want to state it. But it definately is a JSON file, encoded in application/jsonThere 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.
it's indeed a json file, the name is given like that to state it's an asyncapi file.
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.
This statement doesn't match: https://pages.github.tools.sap/cap/docs/guides/messaging/s4#configure-cap
Therefore I have my strong doubts the code is sitting on the right funcationality. @David-Kunz , can you help @Dipto-at-sap on how event consumption must be configured for a CAP app?
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.
This was the requirement:
And for that issue, let me know if we're missing out on anything.