diff --git a/routes/sample.json b/routes/sample.json deleted file mode 100644 index c25cfbd..0000000 --- a/routes/sample.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "$schema":"http://interagent.github.io/interagent-hyper-schema", - "title":"Credit Decision Service", - "description":"External service example for Dreamforce", - "properties":{ - "creditDecision":{ - "$ref":"#/definitions/creditDecision" - } - }, - "definitions":{ - "creditDecision":{ - "title":"Credit Decision", - "description":"Specifies what payment terms are offered, based on credit rating.", - "type":[ - "object" - ], - "properties":{ - "orderAmount":{ - "$ref":"#/definitions/creditDecision/definitions/orderAmount" - }, - "accountId":{ - "$ref":"#/definitions/creditDecision/definitions/accountId" - }, - "creditRating":{ - "$ref":"#/definitions/creditDecision/definitions/creditRating" - }, - "paymentTerm":{ - "$ref":"#/definitions/creditDecision/definitions/paymentTerm" - } - }, - "definitions":{ - "accountId":{ - "description":"The unique identifier of the account.", - "example":"ACMECORP", - "type":[ - "string" - ] - }, - "orderAmount":{ - "description":"Total value of the order.", - "example":99999.99, - "type":[ - "number" - ] - }, - "creditRating":{ - "description":"The customer's current credit rating.", - "example":"Good", - "type":[ - "string" - ] - }, - "paymentTerm":{ - "description":"The payment terms offered (in days) when this decision was made.", - "example":"30 Days", - "type":[ - "string" - ] - } - }, - "links":[ - { - "title":"CreditRating", - "description":"Retrieve the credit rating associated with an order", - "href":"/account/{(%23%2Fdefinitions%2FcreditDecision%2Fdefinitions%2FaccountId)}/creditrating", - "method":"GET", - "targetSchema":{ - "$ref":"#/definitions/creditDecision/definitions/creditRating" - } - }, - { - "title":"Evaluate", - "description":"Evaluates credit rating and decides what payment terms to offer.", - "href":"/paymentTerms", - "method":"POST", - "schema":{ - "type":[ - "object" - ], - "description":"Specifies input parameters to calculate payment term", - "properties":{ - "orderAmount":{ - "$ref":"#/definitions/creditDecision/definitions/orderAmount" - }, - "creditRating":{ - "$ref":"#/definitions/creditDecision/definitions/creditRating" - } - }, - "required":[ - "orderAmount", - "creditRating" - ] - }, - "targetSchema":{ - "$ref":"#/definitions/creditDecision/definitions/paymentTerm" - } - } - ] - } - } -} \ No newline at end of file diff --git a/routes/schema.json b/routes/schema.json index acac85c..4e56e0a 100644 --- a/routes/schema.json +++ b/routes/schema.json @@ -19,10 +19,21 @@ "description":"a.", "example":"1", "type":[ - "int" + "number" ] } - } + }, + "links": [ + { + "title": "MyAction", + "description": "This is my action", + "href": "/", + "method": "GET", + "targetSchema": { + "$ref": "#/definitions/sampleService/definitions/a" + } + } + ] } } } \ No newline at end of file