-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug fixes, doc changes, updates to tests
- Loading branch information
1 parent
2614d57
commit eba3df7
Showing
34 changed files
with
2,879 additions
and
273 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,4 @@ dependency-reduced-pom.xml | |
|
||
## Test | ||
asyncapi-importer-core/src/test/resources/config.properties | ||
temp/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,64 @@ | ||
# AsyncApi Importer Core | ||
This module provides the core functionality to import AsyncApi spec files into Event Portal. | ||
|
||
## Build and Execute | ||
|
||
|
||
## Design (to be completed) | ||
|
||
|
||
|
||
## Field Mapping | ||
|
||
|
||
### Standard AsyncAPI | ||
In a *Standard* AsyncAPI specification, certain conventions are followed. There is a **components** section that contains **schemas** and **messages**. Message payloads reference schemas. And **channels** reference **messages**. See [AsyncApi](https://www.asyncapi.com/) for more details. The table below defines how fields are mapped from AsyncAPI specifications conforming to these practices. | ||
|
||
|Event Portal Field|Source Field Description|AsyncAPI Spec Path| | ||
|---|---|---| | ||
|Enumeration Name|Parameter ID in Channel Defintion|$.channels.[channel_name].parameters.[paramId]| | ||
|Enumeration Version Values|Values Array of `schema.enum` Field in Channel Defintion|$.channels.[channel_name].parameters.[paramId].schema.enum| | ||
|Schema Name|Schema Component ID|$.components.schemas.[schemaId]| | ||
|Schema Version Content|Serialized Schema Payload ⦿|$.components.schemas.[schemaId].[object value]| | ||
|Event Name|Message Component ID|$components.messages.[messageId]| | ||
|Event Version Topic Address|Channel Name|$.channels.[channel_name]| | ||
|Event Version Schema|Schema Payload → Message Component → Channel|| | ||
|
||
|
||
> ⦿ Both schemas found in Event Portal and in the AsyncAPI spec will be re-serialized for comparision. This step is performed to prevent non-material differences (whitespace, formatting) from resulting in differences between versions. | ||
|
||
### Enumerations | ||
|
||
Consider the following channel. The channel name is `importer/customer/updated/{customerId}/{IMP_regionId}`. The channel contains two parameters: `customerId` and `regionId`. **customerId** is an unbound parameter, meaning that it can effectively take on any value (there are some constraints). Whereas the **regionId** is bound to a set of discrete values: `CA-EAST`, `CA-WEST`, `USA-WEST`, etc. These values will be mapped into **Event Portal** as an Enumeration. | ||
|
||
```yaml | ||
channels: | ||
importer/customer/updated/{customerId}/{regionId}: | ||
subscribe: | ||
message: | ||
$ref: "#/components/messages/CustomerUpdated" | ||
parameters: | ||
customerId: | ||
schema: | ||
type: "string" | ||
regionId: | ||
schema: | ||
type: "string" | ||
enum: | ||
- "CA-EAST" | ||
- "CA-WEST" | ||
- "USA-WEST" | ||
- "USA-EAST" | ||
- "EU" | ||
- "SA" | ||
- "AP | ||
``` | ||
Details: | ||
- Upon import, an Enumeration with the parameter name will be created in Event Portal. | ||
- Example above: **regionId** | ||
- Each distinct value set imported for an enumeration will result in a new version | ||
### Schemas | ||
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
Oops, something went wrong.