diff --git a/src/rally/api/data.clj b/src/rally/api/data.clj index d557152..adc02fd 100644 --- a/src/rally/api/data.clj +++ b/src/rally/api/data.clj @@ -26,7 +26,8 @@ (metadata-name? n) (str "_" (csk/->camelCaseString n)) (custom-field-name? n) (str "c_" (csk/->PascalCaseString n)) :else (-> (csk/->PascalCaseString n) - (.replace "Id" "ID")))) + (.replace "Id" "ID") + (.replace "Uuid" "UUID")))) (defn ->clojure-case [k] (cond (metadata-name? k) (keyword "metadata" (csk/->kebab-case-string k)) diff --git a/test/rally/api/data_test.clj b/test/rally/api/data_test.clj index 0370ee3..b3e4158 100644 --- a/test/rally/api/data_test.clj +++ b/test/rally/api/data_test.clj @@ -25,6 +25,7 @@ (is (= "_ref" (data/->rally-case :metadata/ref))) (is (= "FormattedID" (data/->rally-case :formatted-id))) (is (= "_objectVersion" (data/->rally-case :metadata/object-version))) + (is (= "SubscriptionUUID" (data/->rally-case :subscription-uuid))) (is (= "c_MyCustomField" (data/->rally-case :custom/my-custom-field)))) (deftest convert-from-rally-to-clojure-case @@ -179,4 +180,4 @@ (is (false? (data/metadata-name? :name))) (is (true? (data/uri-like? {:metadata/ref "http://localhost:7001/slm/webservice/v2.0/defect"}))) (is (true? (data/uri-like? [{:metadata/ref "http://localhost:7001/slm/webservice/v2.0/defect"} :tasks]))) - (is (true? (data/uri-like? (URI. "http://localhost:7001/slm/webservice/v2.0/defect"))))) \ No newline at end of file + (is (true? (data/uri-like? (URI. "http://localhost:7001/slm/webservice/v2.0/defect")))))