File tree 1 file changed +6
-3
lines changed
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 48
48
(defn url->resource-name [reference]
49
49
(last (str/split (str reference) #"/" )))
50
50
51
+ (defn class-alias [class-name]
52
+ (get {" List" " FhirList" } class-name class-name))
53
+
51
54
(defn class-name
52
55
" Generate class name from schema url."
53
56
[url]
54
57
(-> url
55
58
url->resource-name
56
- uppercase-first-letter
57
- ( str/replace #"-" " _ " ) ))
59
+ ->pascal-case
60
+ class-alias ))
58
61
59
62
(defn generate-deps [deps]
60
63
(->> deps
290
293
:content (generate-module
291
294
:deps (concat [{:module " typing" :members [" Optional" " List" ]}
292
295
{:module " dataclasses" :members [" dataclass" ]}]
293
- (map (fn [d] {:module " base" :members [d ]})
296
+ (map (fn [d] {:module " base" :members [( class-alias d) ]})
294
297
(:deps ir-schema)))
295
298
:classes [(generate-class ir-schema
296
299
(map generate-class (:backbone-elements ir-schema)))])})
You can’t perform that action at this time.
0 commit comments