Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/Tasks/account-opening/create-bank-account.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"attributes": {
"type": "6",
"config": {
"url": "http://localhost:3001/api/banking/accounts/create",
"url": "http://mockoon:3001/api/banking/accounts/create",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The base URL for the mock service (http://mockoon:3001) is hardcoded. Since the PR description mentions these files might be generated, it would be best to address this in the generation script or template. Hardcoding URLs across many files can make future configuration changes difficult.

Consider using a placeholder for the base URL in the source template, for example {{mockoonBaseUrl}}, which can be substituted during the generation process. This would centralize the configuration and improve maintainability. This comment applies to all similar task definition files modified in this pull request.

"method": "POST",
"headers": {
"Content-Type": "application/json"
Expand Down
2 changes: 1 addition & 1 deletion core/Tasks/account-opening/validate-account-policies.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"attributes": {
"type": "6",
"config": {
"url": "http://localhost:3001/api/banking/policies/validate-account-opening",
"url": "http://mockoon:3001/api/banking/policies/validate-account-opening",
"method": "POST",
"headers": {
"Content-Type": "application/json"
Expand Down
2 changes: 1 addition & 1 deletion core/Tasks/contract/get-contract-documents.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"attributes": {
"type": "6",
"config": {
"url": "http://localhost:3001/api/contract/get-documents",
"url": "http://mockoon:3001/api/contract/get-documents",
"method": "POST",
"headers": {
"Content-Type": "application/json"
Expand Down
2 changes: 1 addition & 1 deletion core/Tasks/contract/render-document.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"attributes": {
"type": "6",
"config": {
"url": "http://localhost:3001/api/contract/render-document",
"url": "http://mockoon:3001/api/contract/render-document",
"method": "POST",
"headers": {
"Content-Type": "application/json"
Expand Down
2 changes: 1 addition & 1 deletion core/Tasks/oauth/check-device-registration.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"attributes": {
"type": "6",
"config": {
"url": "http://localhost:3001/api/oauth2/devices/check/",
"url": "http://mockoon:3001/api/oauth2/devices/check/",
"method": "GET",
"headers": {
"Content-Type": "application/json"
Expand Down
2 changes: 1 addition & 1 deletion core/Tasks/oauth/check-push-response.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"attributes": {
"type": "6",
"config": {
"url": "http://localhost:3001/api/oauth2/push/status",
"url": "http://mockoon:3001/api/oauth2/push/status",
"method": "POST",
"headers": {
"Content-Type": "application/json"
Expand Down
2 changes: 1 addition & 1 deletion core/Tasks/oauth/generate-tokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"attributes": {
"type": "6",
"config": {
"url": "http://localhost:3001/api/oauth2/tokens/generate",
"url": "http://mockoon:3001/api/oauth2/tokens/generate",
"method": "POST",
"headers": {
"Content-Type": "application/json"
Expand Down
2 changes: 1 addition & 1 deletion core/Tasks/oauth/register-device.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"attributes": {
"type": "6",
"config": {
"url": "http://localhost:3001/api/oauth2/devices/register",
"url": "http://mockoon:3001/api/oauth2/devices/register",
"method": "POST",
"headers": {
"Content-Type": "application/json"
Expand Down
2 changes: 1 addition & 1 deletion core/Tasks/oauth/send-otp-notification.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"attributes": {
"type": "6",
"config": {
"url": "http://localhost:3001/api/oauth2/otp/send",
"url": "http://mockoon:3001/api/oauth2/otp/send",
"method": "POST",
"headers": {
"Content-Type": "application/json"
Expand Down
2 changes: 1 addition & 1 deletion core/Tasks/oauth/send-push-notification.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"attributes": {
"type": "6",
"config": {
"url": "http://localhost:3001/api/oauth2/push/send",
"url": "http://mockoon:3001/api/oauth2/push/send",
"method": "POST",
"headers": {
"Content-Type": "application/json"
Expand Down
2 changes: 1 addition & 1 deletion core/Tasks/oauth/validate-authorization-code.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"attributes": {
"type": "6",
"config": {
"url": "http://localhost:3001/api/oauth2/user/validate-authorization-code",
"url": "http://mockoon:3001/api/oauth2/user/validate-authorization-code",
"method": "POST",
"headers": {
"Content-Type": "application/json"
Expand Down
2 changes: 1 addition & 1 deletion core/Tasks/oauth/validate-client.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"attributes": {
"type": "6",
"config": {
"url": "http://localhost:3001/api/oauth2/client/validate",
"url": "http://mockoon:3001/api/oauth2/client/validate",
"method": "POST",
"headers": {
"Content-Type": "application/json"
Expand Down
2 changes: 1 addition & 1 deletion core/Tasks/oauth/validate-user-credentials.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"attributes": {
"type": "6",
"config": {
"url": "http://localhost:3001/api/oauth2/user/authenticate",
"url": "http://mockoon:3001/api/oauth2/user/authenticate",
"method": "POST",
"headers": {
"Content-Type": "application/json"
Expand Down
2 changes: 1 addition & 1 deletion core/Tasks/oauth/verify-otp-code.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"attributes": {
"type": "6",
"config": {
"url": "http://localhost:3001/api/oauth2/otp/verify",
"url": "http://mockoon:3001/api/oauth2/otp/verify",
"method": "POST",
"headers": {
"Content-Type": "application/json"
Expand Down
2 changes: 1 addition & 1 deletion core/Tasks/payments/activate-payment-schedule.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"attributes": {
"type": "6",
"config": {
"url": "http://localhost:3001/api/payments/schedules/{scheduleId}/activate",
"url": "http://mockoon:3001/api/payments/schedules/{scheduleId}/activate",
"method": "PATCH",
"headers": {
"Content-Type": "application/json"
Expand Down
2 changes: 1 addition & 1 deletion core/Tasks/payments/archive-payment-record.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"attributes": {
"type": "6",
"config": {
"url": "http://localhost:3001/api/payments/schedules/{scheduleId}/archive",
"url": "http://mockoon:3001/api/payments/schedules/{scheduleId}/archive",
"method": "POST",
"headers": {
"Content-Type": "application/json"
Expand Down
2 changes: 1 addition & 1 deletion core/Tasks/payments/deactivate-payment-schedule.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"attributes": {
"type": "6",
"config": {
"url": "http://localhost:3001/api/payments/schedules/{scheduleId}/deactivate",
"url": "http://mockoon:3001/api/payments/schedules/{scheduleId}/deactivate",
"method": "PATCH",
"headers": {
"Content-Type": "application/json"
Expand Down
2 changes: 1 addition & 1 deletion core/Tasks/payments/get-user-info.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"type": "6",
"config": {
"method": "GET",
"url": "http://localhost:3001/api/payments/users/{userId}",
"url": "http://mockoon:3001/api/payments/users/{userId}",
"headers": {
"Content-Type": "application/json"
},
Expand Down
2 changes: 1 addition & 1 deletion core/Tasks/payments/increment-retry-counter.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"attributes": {
"type": "6",
"config": {
"url": "http://localhost:3001/api/payments/schedules/{scheduleId}/retry",
"url": "http://mockoon:3001/api/payments/schedules/{scheduleId}/retry",
"method": "PATCH",
"headers": {
"Content-Type": "application/json"
Expand Down
2 changes: 1 addition & 1 deletion core/Tasks/payments/process-payment.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"attributes": {
"type": "6",
"config": {
"url": "http://localhost:3001/api/payments/process",
"url": "http://mockoon:3001/api/payments/process",
"method": "POST",
"headers": {
"Content-Type": "application/json"
Expand Down
2 changes: 1 addition & 1 deletion core/Tasks/payments/save-payment-configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"attributes": {
"type": "6",
"config": {
"url": "http://localhost:3001/api/payments/schedules",
"url": "http://mockoon:3001/api/payments/schedules",
"method": "POST",
"headers": {
"Content-Type": "application/json"
Expand Down
2 changes: 1 addition & 1 deletion core/Tasks/payments/send-payment-notification-sms.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"type": "6",
"config": {
"method": "POST",
"url": "http://localhost:3001/api/payments/notify/sms",
"url": "http://mockoon:3001/api/payments/notify/sms",
"headers": {
"Content-Type": "application/json"
},
Expand Down
2 changes: 1 addition & 1 deletion core/Tasks/payments/send-payment-push-notification.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"type": "6",
"config": {
"method": "POST",
"url": "http://localhost:3001/api/payments/notify/push",
"url": "http://mockoon:3001/api/payments/notify/push",
"headers": {
"Content-Type": "application/json"
},
Expand Down
2 changes: 1 addition & 1 deletion core/Tasks/task-test/test-http-items.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"attributes": {
"type": "6",
"config": {
"url": "http://localhost:3001/api/task-test/list-items",
"url": "http://mockoon:3001/api/task-test/list-items",
"method": "POST",
"headers": {
"Content-Type": "application/json"
Expand Down
2 changes: 1 addition & 1 deletion core/Tasks/task-test/test-http-task.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"attributes": {
"type": "6",
"config": {
"url": "http://localhost:3001/api/task-test/http-endpoint",
"url": "http://mockoon:3001/api/task-test/http-endpoint",
"method": "POST",
"headers": {
"Content-Type": "application/json"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# Prerequisites:
# 1. vNext Runtime running on localhost:4201
# 2. Mockoon running on localhost:3001
# 2. Mockoon running on mockoon:3001
###############################################################################

@baseUrl = http://localhost:4201
Expand Down
8 changes: 4 additions & 4 deletions core/Workflows/contract/contract-approval-workflow.http
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# Prerequisites:
# 1. vNext Runtime running on localhost:4201
# 2. Mockoon running on localhost:3001
# 2. Mockoon running on mockoon:3001
###############################################################################

@baseUrl = http://localhost:4201
Expand Down Expand Up @@ -163,11 +163,11 @@ Accept: application/json
###############################################################################

### Test Get Contract Documents (Mockoon)
GET http://localhost:3001/api/contract/documents?groupCode=KG-2024-001
GET http://mockoon:3001/api/contract/documents?groupCode=KG-2024-001

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The Mockoon base URL is hardcoded here. This file already uses a variable @baseUrl for the main application's URL. For better maintainability and consistency, you should define a variable for the Mockoon URL and use it for all Mockoon requests.

Since the PR description mentions these files might be generated, this change should ideally be made in the generator or template for these .http files. For example, you could add @mockoonUrl = http://mockoon:3001 at the top of the template and then use the {{mockoonUrl}} variable in your requests as suggested.

This comment applies to all .http files modified in this pull request.

GET {{mockoonUrl}}/api/contract/documents?groupCode=KG-2024-001

Accept: application/json

### Test Render Document (Mockoon)
POST http://localhost:3001/api/contract/documents/render
POST http://mockoon:3001/api/contract/documents/render
Content-Type: application/json

{
Expand All @@ -177,7 +177,7 @@ Content-Type: application/json
}

### Test Notify Document Approved (Mockoon)
POST http://localhost:3001/api/contract/documents/notify-approved
POST http://mockoon:3001/api/contract/documents/notify-approved
Content-Type: application/json

{
Expand Down
2 changes: 1 addition & 1 deletion core/Workflows/oauth/oauth-authentication-workflow.http
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# Prerequisites:
# 1. vNext Runtime running on localhost:4201
# 2. Mockoon running on localhost:3001
# 2. Mockoon running on mockoon:3001
###############################################################################

@baseUrl = http://localhost:4201
Expand Down
2 changes: 1 addition & 1 deletion core/Workflows/payments/scheduled-payments-workflow.http
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# Prerequisites:
# 1. vNext Runtime running on localhost:4201
# 2. Mockoon running on localhost:3001
# 2. Mockoon running on mockoon:3001
###############################################################################

@baseUrl = http://localhost:4201
Expand Down
8 changes: 4 additions & 4 deletions core/Workflows/task-test/task-test-workflow.http
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
# Prerequisites:
# 1. vNext Runtime running on localhost:4201
# 2. Mockoon running on localhost:3001
# 2. Mockoon running on mockoon:3001
# 3. Dapr sidecar running (for DaprPubSub and DaprServiceTask)
###############################################################################

Expand Down Expand Up @@ -107,11 +107,11 @@ Content-Type: application/json
###############################################################################

### Test Mockoon Health Check
GET http://localhost:3001/health
GET http://mockoon:3001/health
Accept: application/json

### Test Task Test HTTP Endpoint (Mockoon)
POST http://localhost:3001/api/task-test/http-endpoint
POST http://mockoon:3001/api/task-test/http-endpoint
Content-Type: application/json

{
Expand All @@ -121,7 +121,7 @@ Content-Type: application/json
}

### Test Task Test HTTP Endpoint - Error Scenario
POST http://localhost:3001/api/task-test/http-endpoint
POST http://mockoon:3001/api/task-test/http-endpoint
Content-Type: application/json

{
Expand Down
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@
"node": ">=16.0.0"
},
"devDependencies": {
"@burgan-tech/vnext-schema": "^0.0.27",
"@burgan-tech/vnext-schema": "^0.0.28",
"ajv": "^8.12.0",
"ajv-formats": "^2.1.1"
},
"dependencies": {
"@burgan-tech/vnext-schema": "^0.0.27"
"@burgan-tech/vnext-schema": "^0.0.28"
}
}