Skip to content

Commit ececf1a

Browse files
committed
fix(js core): get only resources
1 parent 2ffbf9e commit ececf1a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/generator/core.clj

+3-1
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,9 @@
191191
(.write r "export interface SubsSubscription {\nid?:string;\nresourceType: 'SubsSubscription';\nstatus: 'active' | 'off';trigger: Partial<Record<ResourceType, { event: Array<'all' | 'create' | 'update' | 'delete'>; filter?: unknown }>>; channel: {\ntype: 'rest-hook';\nendpoint: string;\npayload?: { content: string; contentType: string; context: unknown };headers?: Record<string, string>;\ntimeout?: number;\n};\n}")
192192
(.write r "export type ResourceTypeMap = {\n SubsSubscription: SubsSubscription;\n User: Record<string,any>;\n")
193193
(mapv #(when-not (contains? #{"string" "boolean"} %) (.write r (format " %s: %s;\n" % %)))
194-
(keys (get @r/schema package)))
194+
(map first
195+
(filter #(not (nil? (get-in (last %) [:base :isResource])))
196+
(get @r/schema "hl7-fhir-r4-core"))))
195197
(.write r "}\n")
196198
(.write r "export type ResourceType = keyof ResourceTypeMap;\n")))
197199
(w/generate-types :typescript @r/schema {:target-path path})))

0 commit comments

Comments
 (0)