Skip to content

Instantly share code, notes, and snippets.

Antonio Garrote antoniogarrote

Block or report user

Report or block antoniogarrote

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View loans_api.raml
#%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:
View loans_api.yaml
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
View source-map.jsonld
"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": [
{
View raml.json
{
"raml-http:path": "?path",
"hydra:supportedOperation":
{
"hydra:method": "?method",
"hydra:returns": {
"hydra:statusCode": "200"
}
}
}
View 360.json
{
"@id": "http://localhost:4567/customers/$ID",
"payload:email": "?email",
"payload:account_owner": {
"payload:amount": "?amount"
},
"payload:reports": {
"payload:provider": "?provider",
"payload:score": "?score"
},
View test.clj
(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,
View FAIL.clj
(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))
View idiot.cljl
(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))
View common_test.cljc
(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
View link.bash
You can’t perform that action at this time.