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

Interface spectral fix #124

Merged
merged 8 commits into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from 6 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 .github/workflows/spectral-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ jobs:
with:
node-version: v20
- run: npm install @stoplight/spectral-cli
- run: npx spectral lint --ruleset spectral/calm-validation-rules.yaml 'calm/samples/**/*(*.json|*.yaml)'
- run: npx spectral lint --ruleset spectral/instantiation/validation-rules.yaml 'calm/samples/**/*(*.json|*.yaml)'

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ docs/contributing.md
# We use YARN
website/package-lock.json
/.idea/

**/.vscode/
8 changes: 6 additions & 2 deletions calm/samples/api-gateway-implementation.json
rocketstack-matt marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://raw.githubusercontent.com/finos-labs/architecture-as-code/main/calm/pattern/api-gateway.json",
"nodes": [
{
"well-known-endpoint": "{{ WELL_KNOWN_ENDPOINT }}",

Check warning on line 5 in calm/samples/api-gateway-implementation.json

View workflow job for this annotation

GitHub Actions / Run Spectral

no-placeholder-properties-string String placeholder detected in instantiated pattern.
"name": "API Gateway",
"description": "The API Gateway used to verify authorization and access to downstream system",
"node-type": "system",
Expand All @@ -10,8 +10,8 @@
"interfaces": [
{
"unique-id": "api-gateway-ingress",
"host": "{{ INGRESS_HOST }}",

Check warning on line 13 in calm/samples/api-gateway-implementation.json

View workflow job for this annotation

GitHub Actions / Run Spectral

no-placeholder-properties-string String placeholder detected in instantiated pattern.
"port": -1

Check warning on line 14 in calm/samples/api-gateway-implementation.json

View workflow job for this annotation

GitHub Actions / Run Spectral

no-placeholder-properties-numerical Numerical placeholder (-1) detected in instantiated pattern.
}
]
},
Expand All @@ -25,8 +25,8 @@
"interfaces": [
{
"unique-id": "producer-ingress",
"host": "{{ INGRESS_HOST }}",

Check warning on line 28 in calm/samples/api-gateway-implementation.json

View workflow job for this annotation

GitHub Actions / Run Spectral

no-placeholder-properties-string String placeholder detected in instantiated pattern.
"port": -1

Check warning on line 29 in calm/samples/api-gateway-implementation.json

View workflow job for this annotation

GitHub Actions / Run Spectral

no-placeholder-properties-numerical Numerical placeholder (-1) detected in instantiated pattern.
}
],
"node-type": "system",
Expand Down Expand Up @@ -60,8 +60,12 @@
"unique-id": "api-gateway-idp",
"relationship-type": {
"connects": {
"destination": "idp",
"source": "api-gateway"
"destination": {
"node": "idp"
},
"source": {
"node": "api-gateway"
}
}
}
},
Expand Down
148 changes: 106 additions & 42 deletions calm/samples/traderx/traderx.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,12 @@
"description": "Web client interacts with the Web GUI process.",
"relationship-type": {
"connects": {
"source": "web-client",
"destination": "web-gui-process"
"source": {
"node": "web-client"
},
"destination": {
"node": "web-gui-process"
}
}
},
"protocol": "HTTPS"
Expand All @@ -162,8 +166,12 @@
"description": "Load positions for account.",
"relationship-type": {
"connects": {
"source": "web-gui-process",
"destination": "position-service"
"source": {
"node": "web-gui-process"
},
"destination": {
"node": "position-service"
}
}
},
"protocol": "HTTPS"
Expand All @@ -173,8 +181,12 @@
"description": "Load trades for account.",
"relationship-type": {
"connects": {
"source": "web-gui-process",
"destination": "position-service"
"source": {
"node": "web-gui-process"
},
"destination": {
"node": "position-service"
}
}
},
"protocol": "HTTPS"
Expand All @@ -184,8 +196,12 @@
"description": "Looks up default positions for a given account.",
"relationship-type": {
"connects": {
"source": "position-service",
"destination": "traderx-db"
"source": {
"node": "position-service"
},
"destination": {
"node": "traderx-db"
}
}
},
"protocol": "JDBC"
Expand All @@ -195,8 +211,12 @@
"description": "Looks up all trades for a given account.",
"relationship-type": {
"connects": {
"source": "position-service",
"destination": "traderx-db"
"source": {
"node": "position-service"
},
"destination": {
"node": "traderx-db"
}
}
},
"protocol": "JDBC"
Expand Down Expand Up @@ -258,8 +278,12 @@
"description": "Looks up securities to assist with creating a trade ticket.",
"relationship-type": {
"connects": {
"source": "web-gui-process",
"destination": "reference-data-service"
"source": {
"node": "web-gui-process"
},
"destination": {
"node": "reference-data-service"
}
}
},
"protocol": "HTTPS"
Expand All @@ -269,8 +293,12 @@
"description": "Creates new trades and cancels existing trades.",
"relationship-type": {
"connects": {
"source": "web-gui-process",
"destination": "trading-services"
"source": {
"node": "web-gui-process"
},
"destination": {
"node": "trading-services"
}
}
},
"protocol": "HTTPS"
Expand All @@ -280,8 +308,12 @@
"description": "Subscribes to trade/position updates feed for currently viewed account.",
"relationship-type": {
"connects": {
"source": "web-gui-process",
"destination": "trade-feed"
"source": {
"nodes": "web-gui-process"
},
"destination": {
"nodes": "trade-feed"
}
}
},
"protocol": "WebSocket"
Expand All @@ -291,8 +323,12 @@
"description": "Processes incoming trade requests, persist and publish updates.",
"relationship-type": {
"connects": {
"source": "trade-processor",
"destination": "trade-feed"
"source": {
"nodes": "trade-processor"
},
"destination": {
"nodes": "trade-feed"
}
}
},
"protocol": "SocketIO"
Expand All @@ -302,8 +338,12 @@
"description": "Looks up current positions when bootstrapping state, persist trade state and position state.",
"relationship-type": {
"connects": {
"source": "trade-processor",
"destination": "traderx-db"
"source": {
"nodes": "trade-processor"
},
"destination": {
"nodes": "traderx-db"
}
}
},
"protocol": "JDBC"
Expand All @@ -313,8 +353,12 @@
"description": "Creates/Updates accounts. Gets list of accounts.",
"relationship-type": {
"connects": {
"source": "web-gui-process",
"destination": "accounts-service"
"source": {
"nodes": "web-gui-process"
},
"destination": {
"nodes": "accounts-service"
}
}
},
"protocol": "HTTPS"
Expand All @@ -324,8 +368,12 @@
"description": "Looks up people data based on typeahead from GUI.",
"relationship-type": {
"connects": {
"source": "web-gui-process",
"destination": "people-service"
"source": {
"nodes": "web-gui-process"
},
"destination": {
"nodes": "people-service"
}
}
},
"protocol": "HTTPS"
Expand All @@ -335,8 +383,12 @@
"description": "Looks up people data.",
"relationship-type": {
"connects": {
"source": "people-service",
"destination": "user-directory"
"source": {
"nodes": "people-service"
},
"destination": {
"nodes": "user-directory"
}
}
},
"protocol": "LDAP"
Expand All @@ -346,33 +398,45 @@
"description": "Validates securities when creating trades.",
"relationship-type": {
"connects": {
"source": "trading-services",
"destination": "reference-data-service"
},
"protocol": "HTTPS"
}
"source": {
"nodes": "trading-services"
},
"destination": {
"nodes": "reference-data-service"
}
}
},
"protocol": "HTTPS"
},
{
"unique-id": "trading-services-uses-trade-feed",
"description": "Publishes updates to trades and positions after persisting in the DB.",
"relationship-type": {
"connects": {
"source": "trading-services",
"destination": "trade-feed"
},
"protocol": "HTTPS"
}
"source": {
"nodes": "trading-services"
},
"destination": {
"nodes": "trade-feed"
}
}
},
"protocol": "HTTPS"
},
{
"unique-id": "trading-services-uses-account-service",
"description": "Validates accounts when creating trades.",
"relationship-type": {
"connects": {
"source": "trading-services",
"destination": "accounts-service"
},
"protocol": "HTTPS"
}
"source": {
"nodes": "trading-services"
},
"destination": {
"nodes": "accounts-service"
}
}
},
"protocol": "HTTPS"
}
]
}
}
Loading