-
Notifications
You must be signed in to change notification settings - Fork 65
feat: added support for AsyncAPI v3 #367
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
Open
nashjain
wants to merge
22
commits into
OAI:v1.1-dev
Choose a base branch
from
specmatic:dev
base: v1.1-dev
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
22 commits
Select commit
Hold shift + click to select a range
4235d97
Added support for AsyncAPI v3
nashjain 37a5151
Update arazzo.md file with AsyncAPI related changes along with a samp…
nashjain 37d911f
fix: update operationId and correlationId references in arazzo.md AND…
nashjain 75d1cb0
fix: enhance dependsOn description in schema.yaml and arazzo.md, and …
nashjain ff01227
fix: update stepId in examples
nashjain fd1bc7d
Apply suggestion from @frankkilcommins
nashjain f53a80b
refactor: update dependsOn references to remove $steps prefix and cla…
nashjain 37a4127
fix: remove quotes from YAML runtime expressions and dependsOn refere…
nashjain 65b796b
fix: update dependsOn format to use a list in arazzo.md
nashjain d06e43a
fix: remove quotes from YAML keys and update formatting in openapi-an…
nashjain 8ef01ec
refactor: move default successCriteria to workflow-step from step-obj…
nashjain 7112d95
refactor: move successCriteria back to step-object-base. If successCr…
nashjain 5ed90c7
test: add invalid workflow step example with operationId restriction
nashjain 471e327
fix: clarify description of dependsOn field in schema.yaml and update…
nashjain 0daa4d7
fix: remove fully qualified dependsOn field from async-depends-on.yaml
nashjain 39364e4
fix: refactor step schema to isolate operation-specific fields and de…
nashjain 2f5b21a
Merge branch 'v1.1-dev' into dev
nashjain 5414803
chore: move pet-asyncapi.yaml to examples folder
nashjain cc7e8ff
docs: clarify async workflow step dependencies and success criteria
nashjain b672729
docs: fix markdown headings
nashjain fe5913d
docs: clarify async step dependencies and completion semantics
nashjain 57f98de
docs: clarify async step dependencies and completion semantics
nashjain 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
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| asyncapi: 3.0.0 | ||
|
|
||
| info: | ||
| title: Simple Pet Purchase API | ||
| version: "1.0.0" | ||
|
|
||
| servers: | ||
| localKafka: | ||
| host: localhost:9092 | ||
| protocol: kafka | ||
|
|
||
| channels: | ||
| place-order: | ||
| address: place-order | ||
| messages: | ||
| placeOrder.message: | ||
| $ref: "#/components/messages/OrderRequest" | ||
|
|
||
| confirm-order: | ||
| address: confirm-order | ||
| messages: | ||
| confirmOrder.message: | ||
| $ref: "#/components/messages/OrderResponse" | ||
|
|
||
| operations: | ||
| placeOrder: | ||
| description: Place an order | ||
| action: receive | ||
| channel: | ||
| $ref: "#/channels/place-order" | ||
| messages: | ||
| - $ref: "#/channels/place-order/messages/placeOrder.message" | ||
| reply: | ||
| channel: | ||
| $ref: "#/channels/confirm-order" | ||
| messages: | ||
| - $ref: "#/channels/confirm-order/messages/confirmOrder.message" | ||
|
|
||
| components: | ||
| messages: | ||
| OrderRequest: | ||
| contentType: application/json | ||
| correlationId: | ||
| description: Identifier that correlates this request with a response | ||
| location: $message.header#/orderRequestId | ||
| headers: | ||
| type: object | ||
| required: | ||
| - orderRequestId | ||
| properties: | ||
| orderRequestId: | ||
| type: string | ||
| description: Unique ID for tracking the order flow | ||
| payload: | ||
| type: object | ||
| required: | ||
| - petId | ||
| properties: | ||
| petId: | ||
| type: integer | ||
|
|
||
| OrderResponse: | ||
| contentType: application/json | ||
| correlationId: | ||
| description: Identifier that correlates this response with a request | ||
| location: $message.header#/orderRequestId | ||
| headers: | ||
| type: object | ||
| required: | ||
| - orderRequestId | ||
| properties: | ||
| orderRequestId: | ||
| type: string | ||
| description: Unique ID for tracking the order flow | ||
| payload: | ||
| type: object | ||
| required: | ||
| - orderId | ||
| properties: | ||
| orderId: | ||
| type: integer |
Large diffs are not rendered by default.
Oops, something went wrong.
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
13 changes: 13 additions & 0 deletions
13
tests/schema/fail/channel-path-is-invalid-for-openapi.arazzo.yaml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| arazzo: 1.1.0 | ||
| info: | ||
| title: Minimal Arazzo Example for AsyncAPI | ||
| version: 1.0.0 | ||
| sourceDescriptions: | ||
| - name: exampleAPI | ||
| url: https://example.com/openapi.yaml | ||
| type: openapi | ||
| workflows: | ||
| - workflowId: basicWorkflow | ||
| steps: | ||
| - stepId: step1 | ||
| channelPath: createUser |
15 changes: 15 additions & 0 deletions
15
tests/schema/fail/invalid-async-correlation-id-non-receive-action.arazzo.yaml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| arazzo: 1.1.0 | ||
| info: | ||
| title: CorrelationId should only be present when action is receive | ||
| version: 1.0.0 | ||
| sourceDescriptions: | ||
| - name: exampleAPI | ||
| url: https://example.com/asyncapi.yaml | ||
| type: asyncapi | ||
| workflows: | ||
| - workflowId: basicWorkflow | ||
| steps: | ||
| - stepId: step1 | ||
| operationId: createUser | ||
| action: send | ||
| correlationId: invalid |
17 changes: 17 additions & 0 deletions
17
tests/schema/fail/invalid-async-parameter-without-in.arazzo.yaml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| arazzo: 1.1.0 | ||
| info: | ||
| title: Async step parameter requires in | ||
| version: 1.0.0 | ||
| sourceDescriptions: | ||
| - name: eventAPI | ||
| url: https://events.com/asyncapi.yaml | ||
| type: asyncapi | ||
| workflows: | ||
| - workflowId: asyncWorkflow | ||
| steps: | ||
| - stepId: sendEvent | ||
| operationId: $sourceDescriptions.eventAPI.orderCreated | ||
| action: send | ||
| parameters: | ||
| - name: correlationId | ||
| value: abc123 |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.