Skip to content

Instantly share code, notes, and snippets.

#%RAML Async 0.1
title: Loan Async API
version: 1.0
description: Asynchronous API used to track changes in the loans processing pipeline.
transport: amqp
types:
asyncapi: "1.0.0"
info:
title: Loan Async API
version: "1.0"
description: Asynchronous API used to track changes in the loans processing pipeline.
servers:
- url: rabbit.myorg.com:5676
scheme: amqp
"http://raml.org/vocabularies/document#sources": [
{
"@id": "/Users/antoniogarrote/Development/raml-tck/tests/syntax/raml-1.0/root-section/baseuri.raml#/web-api/source-map",
"@type": [
"http://raml.org/vocabularies/document#SourceMap"
],
"http://raml.org/vocabularies/document#lexical": [
{
"http://raml.org/vocabularies/document#element": [
{
{
"raml-http:path": "?path",
"hydra:supportedOperation":
{
"hydra:method": "?method",
"hydra:returns": {
"hydra:statusCode": "200"
}
}
}
{
"@id": "http://localhost:4567/customers/$ID",
"payload:email": "?email",
"payload:account_owner": {
"payload:amount": "?amount"
},
"payload:reports": {
"payload:provider": "?provider",
"payload:score": "?score"
},
(deftest error-1
(let [input {"Foo" {:properties {:id "string"}}
"Foos" "Foo[]"}
expanded (expanded-form "Foos" input)
canonical (canonical-form expanded)]
(is (= canonical
{:type "array",
:items
{:properties {"id" {:type "string", :required true}},
:additionalProperties true,
(defn apply-template [uri parameters {:keys [result]}]
(reduce (fn [acc {:keys [name property]}]
(let [value (get result property)
value (or (get value "@value") (get value "@id"))]
(if (nil? value)
(throw (Exception. (str "Missing parameter " name " for template " uri)))
(string/replace uri (str "{" name "}") (str value)))))
uri
parameters))
(defn apply-template [uri parameters {:keys [result]}]
(reduce (fn [acc {:keys [name property]}]
(let [value (get result property)
value (or (get value "@value") (get value "@id"))]
(if (nil? value)
(throw (Exception. (str "Missing parameter " name " for template " uri)))
(string/replace uri (str "{" name "}") (str value)))))
uri
parameters))
(ns api-modelling-framework.parser.domain.common-test
#?(:cljs (:require-macros [cljs.test :refer [deftest is async]]))
(:require #?(:clj [clojure.test :refer :all])
[api-modelling-framework.parser.domain.common :as common]
[api-modelling-framework.model.document :as document]
[api-modelling-framework.model.vocabulary :as v]
[api-modelling-framework.utils :as utils]))
(deftest wrapped-ast-token?-test