-
Notifications
You must be signed in to change notification settings - Fork 0
Adds create flow call #63
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
b18e3f1
Update `CreateFlow` to return Flow struct instead of rows affected
jlpdeveloper 75a3de1
Add `CreateFlow` handler with request validation and tests
jlpdeveloper 10aabbb
Refactor router to consolidate handlers and add `CreateFlow` route
jlpdeveloper f2bd195
Update `CreateFlow` to extract `productID` from path and update tests
jlpdeveloper 0f0b053
Add Bruno collection for `Flows` with `Create Flow` request
jlpdeveloper 016274b
Update `Create Flow` assertion to expect status code `201`
jlpdeveloper a731c94
Add documentation for `Create Flow` API response codes and usage details
jlpdeveloper 071b5ed
Handle errors for missing product in `CreateFlow` and improve name va…
jlpdeveloper b5709cf
Fix incorrect route in `GetPlatform` endpoint registration
jlpdeveloper 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 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,86 @@ | ||
| info: | ||
| name: Create Flow | ||
| type: http | ||
| seq: 1 | ||
|
|
||
| http: | ||
| method: POST | ||
| url: "{{baseUrl}}/api/products/:id/flows" | ||
| params: | ||
| - name: id | ||
| value: "2" | ||
| type: path | ||
| body: | ||
| type: json | ||
| data: |- | ||
| { | ||
| "name": "Flow 1", | ||
| "description": "flow 1 desc" | ||
| } | ||
| auth: inherit | ||
|
|
||
| runtime: | ||
| assertions: | ||
| - expression: res.status | ||
| operator: eq | ||
| value: "201" | ||
|
|
||
| settings: | ||
| encodeUrl: true | ||
| timeout: 0 | ||
| followRedirects: true | ||
| maxRedirects: 5 | ||
|
|
||
| examples: | ||
| - name: sample | ||
| description: sample successful call to create a product flow | ||
| request: | ||
| url: "{{baseUrl}}/api/products/:id/flows" | ||
| method: POST | ||
| params: | ||
| - name: id | ||
| value: "2" | ||
| type: path | ||
| body: | ||
| type: json | ||
| data: |- | ||
| { | ||
| "name": "Flow 1", | ||
| "description": "flow 1 desc" | ||
| } | ||
| response: | ||
| status: 201 | ||
| statusText: Created | ||
| headers: | ||
| - name: content-type | ||
| value: application/json | ||
| - name: vary | ||
| value: Origin, Accept-Encoding | ||
| - name: date | ||
| value: Sat, 16 May 2026 00:11:09 GMT | ||
| - name: content-length | ||
| value: "134" | ||
| body: | ||
| type: json | ||
| data: |- | ||
| { | ||
| "id": 1, | ||
| "product_id": 2, | ||
| "name": "Flow 1", | ||
| "description": "flow 1 desc", | ||
| "created_at": "2026-05-15T19:11:09.35732-05:00", | ||
| "updated_at": "2026-05-15T19:11:09.35732-05:00" | ||
| } | ||
|
|
||
| docs: |- | ||
| # Create Flow | ||
|
|
||
| Creates a new flow for a specific product. The product ID is passed as a path parameter. | ||
|
|
||
| ## Possible Status Codes | ||
| | Status Code | Notes | | ||
| | -- | --| | ||
| | 201 | Created | | ||
| | 400 | Invalid product ID or request body | | ||
| | 404 | Product not found | | ||
| | 500 | Internal server error | |
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,7 @@ | ||
| info: | ||
| name: Flows | ||
| type: folder | ||
| seq: 3 | ||
|
|
||
| request: | ||
| auth: inherit |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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.