Skip to content

Commit

Permalink
fix(js reader): use full property names
Browse files Browse the repository at this point in the history
  • Loading branch information
letzabelin committed Feb 7, 2024
1 parent 2ec0cbb commit 5186f52
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/generator/reader.clj
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,10 @@
(println k (:resource config))
acc)
(if (not-empty-values? v)
(let [schema (read-schema ztx v (assoc config :property k))]
(let [schema (read-schema ztx v (assoc config
:property k
:full-resource-name (str (:full-resource-name config)
(str/capitalize (name k)))))]
(cond
(vector? schema)
(reduce (fn [ac [property target]]
Expand Down Expand Up @@ -204,8 +207,8 @@
seq)]
result))

(defn parse-value-set [ztx schema {:keys [resource property parent package-name] :as config}]
(let [enum-name (str resource (when property (capitalize-first (name property))))
(defn parse-value-set [ztx schema {:keys [resource property parent package-name full-resource-name] :as config}]
(let [enum-name full-resource-name
sym (get-in schema [:zen.fhir/value-set :symbol])
result (get-valueset-values ztx sym)]
(cond
Expand Down Expand Up @@ -405,6 +408,7 @@
{:base-path base-path
:imports-path (conj base-path :imports)
:resource (or sub-name main-name)
:full-resource-name (or sub-name main-name)
:parent (when (and sub-name (not (contains? wrong-main-names main-name))) main-name)
:package-name package-name})]
(update-visited sym true)
Expand Down

0 comments on commit 5186f52

Please sign in to comment.