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

adding sample models for applications and connectivity #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
# models
AML-defined models (aka Vocabularies and Dialects)

# Samples
The samples folder contains documents for instances of the different dialects/vocabularies.

Not all samples have related dialects/vocabularies but they exists to start developing the model and providing a simple view of the information we would like to see in a certain model.
22 changes: 22 additions & 0 deletions samples/application.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#% Application model 0.1
# Application model instance sample

name: Order process service
description: Process API that manages customers orders.
tenantId: 9980b85-d338-3e3f-2fb4-5eb7d0066a4
groupId: f1e97bc6-315a-4490-82a7-23abe036327
assetId: order-process-service
version: 1.1.3

dependsOn:
- /assets/9980b85-d338-3e3f-2fb4-5eb7d0066a4/f1e97bc6-315a-44990-82a7-23abe036327/orders-api/1/0/0
- /assets/9980b85-d338-3e3f-2fb4-5eb7d0066a4/f1e97bc6-315a-44990-82a7-23abe036327/inventory-api/2/3/2

services:
- id: "CreateOrderFlow"
service:
inboundEndpoint:
operation: "/apiSpecs/mythical/ordersapi/endpoints/orders/operation/post"
outboundEndpoints:
- operation: "/apiSpecs/mythical/inverntoryapi/endpoints/inventory/{sku}/operation/get"
- operation: "/apiSpecs/mythical/inverntoryapi/endpoints/inventory/{sku}/operation/post"
58 changes: 58 additions & 0 deletions samples/connectivity.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#% REST connecitivty model 1.0
# REST Connectivity model sample
name: Inventory API Connectivity
description: Connectivity descriptor for Inventory API
tenantId: f1e97bc6-315a-4490-82a7-23abe036327
groupId: 9980b85-d338-3e3f-2fb4-5eb7d0066a4
assetId: inventory-api
version: 1.0.0

apiSpec:
tenantId:
groupId: 9980b85-315a-4490-82a7-23abe036327
assetId: inverntory-api
version: 2.3.2

operations:
- id: "get:inventory"
restOperation: "/apiSpecs/mythical/inverntoryapi/endpoints/inventory/operation/get"
defaultName: Retrieve Inventory
params:
- name: page
defaultName: Page Number
restParam: "/apiSpecs/mythical/inverntoryapi/endpoints/inventory/operation/get/query-params/page"
output:
- restResponse: "/apiSpecs/mythical/inverntoryapi/endpoints/inventory/operation/get/response/200/content"
pagination: inventoryPagination

- id: "get:inventory/{sku}"
restOperation: "/apiSpecs/mythical/inverntoryapi/endpoints/inventory/{sku}/operation/get"
defaultName: Retrieve Inventory
params:
- name: sku
defaultName: SKU
restParam: "/apiSpecs/mythical/inverntoryapi/endpoints/inventory/{sku}/operation/get/uri-params/sku"
- name: page
defaultName: Page Number
restParam: "/apiSpecs/mythical/inverntoryapi/endpoints/inventory/operation/get/query-params/page"
output:
- restResponse: "/apiSpecs/mythical/inverntoryapi/endpoints/inventory/{sku}/operation/get/response/200/content"
pagination: inventoryPagination

testConnection:
operation:
designlink: "inventory/get"
params:
- name: sku
- value: 0
responseValidation:
validationExpression:
content: "#[output.statusCode == 200]"

paginations:
inventoryPagination:
type: pageNumber
parameters:
pageNumberParamName: page
initialPageNumber: 1
pagingResponseExpression: "#[output.items]"