Skip to content
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

Update template to generate route to use path parameters in URI #977

Merged
merged 1 commit into from
Mar 28, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
id: from-4257
uri: timer:template
parameters:
timerName: timer-name
repeatCount: "5"
steps:
- setBody:
Expand Down
3 changes: 1 addition & 2 deletions packages/ui/src/hooks/entities.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,9 @@ describe('useEntities', () => {
id: route-1234
from:
id: from-1234
uri: timer
uri: timer:template
parameters:
period: "1000"
timerName: template
steps:
- log:
id: log-1234
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ exports[`createCamelResource should create an empty KameletResource if no args i
"id": "from-1234",
"parameters": {
"period": "{{period}}",
"timerName": "user",
},
"steps": [
{
Expand All @@ -18,7 +17,7 @@ exports[`createCamelResource should create an empty KameletResource if no args i
"to": "kamelet:sink",
},
],
"uri": "timer",
"uri": "timer:user",
},
"id": "kamelet-1234",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ exports[`KameletResource should convert to JSON 1`] = `
"id": "from-1234",
"parameters": {
"period": "{{period}}",
"timerName": "user",
},
"steps": [
{
Expand All @@ -52,7 +51,7 @@ exports[`KameletResource should convert to JSON 1`] = `
"to": "kamelet:sink",
},
],
"uri": "timer",
"uri": "timer:user",
},
},
"types": {
Expand Down Expand Up @@ -106,7 +105,6 @@ exports[`KameletResource should create a new KameletResource 1`] = `
"id": "from-1234",
"parameters": {
"period": "{{period}}",
"timerName": "user",
},
"steps": [
{
Expand All @@ -116,7 +114,7 @@ exports[`KameletResource should create a new KameletResource 1`] = `
"to": "kamelet:sink",
},
],
"uri": "timer",
"uri": "timer:user",
},
},
"types": {
Expand Down Expand Up @@ -171,7 +169,6 @@ exports[`KameletResource should get the visual entities (Camel Route Visual Enti
"id": "from-1234",
"parameters": {
"period": "{{period}}",
"timerName": "user",
},
"steps": [
{
Expand All @@ -181,7 +178,7 @@ exports[`KameletResource should get the visual entities (Camel Route Visual Enti
"to": "kamelet:sink",
},
],
"uri": "timer",
"uri": "timer:user",
},
"id": "kamelet-1234",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@ spec:
template:
from:
id: ${getCamelRandomId('from')}
uri: "timer"
uri: "timer:user"
parameters:
timerName: user
period: "{{period}}"
steps:
- to: https://random-data-api.com/api/v2/users
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ export const routeTemplate = () => {
id: ${getCamelRandomId('route')}
from:
id: ${getCamelRandomId('from')}
uri: timer
uri: timer:template
parameters:
timerName: template
period: "1000"
steps:
- log:
Expand Down
6 changes: 2 additions & 4 deletions packages/ui/src/utils/get-custom-schema-from-kamelet.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,8 @@ describe('getCustomSchemaFromKamelet', () => {
id: 'from-3836',
parameters: {
period: '{{period}}',
timerName: 'user',
},
uri: 'timer',
uri: 'timer:user',
},
},
types: {
Expand Down Expand Up @@ -195,9 +194,8 @@ describe('getCustomSchemaFromKamelet', () => {
id: 'from-3836',
parameters: {
period: '{{period}}',
timerName: 'user',
},
uri: 'timer',
uri: 'timer:user',
},
},
types: {
Expand Down
15 changes: 5 additions & 10 deletions packages/ui/src/utils/update-kamelet-from-custom-schema.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,8 @@ describe('updateKameletFromCustomSchema', () => {
id: 'from-3836',
parameters: {
period: '{{period}}',
timerName: 'user',
},
uri: 'timer',
uri: 'timer:user',
},
},
types: {
Expand Down Expand Up @@ -150,9 +149,8 @@ describe('updateKameletFromCustomSchema', () => {
id: 'from-3836',
parameters: {
period: '{{period}}',
timerName: 'user',
},
uri: 'timer',
uri: 'timer:user',
},
},
types: {
Expand Down Expand Up @@ -230,9 +228,8 @@ describe('updateKameletFromCustomSchema', () => {
id: 'from-3836',
parameters: {
period: '{{period}}',
timerName: 'user',
},
uri: 'timer',
uri: 'timer:user',
},
},
types: {
Expand Down Expand Up @@ -350,9 +347,8 @@ describe('updateKameletFromCustomSchema', () => {
id: 'from-3836',
parameters: {
period: '{{period}}',
timerName: 'user',
},
uri: 'timer',
uri: 'timer:user',
},
},
types: {
Expand Down Expand Up @@ -428,9 +424,8 @@ describe('updateKameletFromCustomSchema', () => {
id: 'from-3836',
parameters: {
period: '{{period}}',
timerName: 'user',
},
uri: 'timer',
uri: 'timer:user',
},
},
types: {
Expand Down
Loading