fhirsmith 0.14.1 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/README.md +3 -2
  3. package/config-template.json +9 -0
  4. package/library/changelog.js +57 -0
  5. package/library/fhir-openapi-schema.js +441 -0
  6. package/library/html-server.js +9 -3
  7. package/library/npm-audit.js +265 -0
  8. package/library/openapi-doc.js +557 -0
  9. package/library/utilities.js +21 -0
  10. package/package.json +10 -4
  11. package/packages/openapi.js +13 -0
  12. package/packages/openapi.yaml +603 -0
  13. package/packages/packages-template.html +4 -2
  14. package/packages/packages.js +286 -81
  15. package/packages/readme.md +120 -0
  16. package/registry/api.js +117 -41
  17. package/registry/crawler.js +41 -0
  18. package/registry/fhirsmith-releases.js +167 -0
  19. package/registry/model.js +13 -0
  20. package/registry/openapi.js +13 -0
  21. package/registry/openapi.yaml +311 -0
  22. package/registry/readme.md +107 -208
  23. package/registry/registry-template.html +4 -1
  24. package/registry/registry.js +198 -19
  25. package/server.js +19 -5
  26. package/testing/openapi-schemas.config.js +58 -0
  27. package/testing/openapi-schemas.json +1920 -0
  28. package/testing/openapi.js +15 -0
  29. package/testing/openapi.yaml +273 -0
  30. package/testing/readme.md +43 -1
  31. package/testing/search.js +1 -1
  32. package/testing/testing-template.html +2 -0
  33. package/testing/testing.js +24 -0
  34. package/translations/Messages.properties +1 -0
  35. package/tx/README.md +78 -4
  36. package/tx/cm/cm-api.js +25 -10
  37. package/tx/cm/cm-database.js +10 -5
  38. package/tx/cm/cm-package.js +61 -15
  39. package/tx/cs/cs-provider-api.js +22 -7
  40. package/tx/cs/cs-provider-list.js +10 -9
  41. package/tx/cs/cs-rxnorm.js +23 -6
  42. package/tx/html/tx-template.html +2 -0
  43. package/tx/library/canonical-resource.js +50 -1
  44. package/tx/library/codesystem.js +1 -0
  45. package/tx/library/conceptmap.js +1 -0
  46. package/tx/library/resource-ids.js +107 -0
  47. package/tx/library/valueset.js +16 -0
  48. package/tx/library.js +113 -26
  49. package/tx/ocl/cm-ocl.cjs +23 -15
  50. package/tx/ocl/cs-ocl.cjs +9 -10
  51. package/tx/ocl/vs-ocl.cjs +17 -17
  52. package/tx/openapi-operations.js +363 -0
  53. package/tx/openapi-schemas.config.js +118 -0
  54. package/tx/openapi-schemas.json +7903 -0
  55. package/tx/openapi.js +289 -0
  56. package/tx/openapi.yaml +151 -0
  57. package/tx/operation-context.js +15 -0
  58. package/tx/params.js +3 -12
  59. package/tx/provider.js +90 -14
  60. package/tx/tx-html.js +6 -0
  61. package/tx/tx.fhir.org.yml +16 -8
  62. package/tx/tx.js +62 -1
  63. package/tx/vs/vs-api.js +25 -10
  64. package/tx/vs/vs-database.js +14 -9
  65. package/tx/vs/vs-package.js +58 -31
  66. package/tx/vs/vs-vsac.js +20 -5
  67. package/tx/workers/expand.js +35 -16
  68. package/tx/workers/metadata.js +2 -14
  69. package/tx/workers/read.js +3 -18
  70. package/tx/workers/validate.js +65 -19
  71. package/tx/workers/worker.js +29 -8
  72. package/utilities/extract-schema-json.js +167 -0
  73. package/utilities/generate-openapi-schemas.js +49 -0
  74. package/xig/xig.js +2 -4
@@ -0,0 +1,603 @@
1
+ # OpenAPI description of the FHIRsmith package server (/packages).
2
+ #
3
+ # This file is the contract for the public, read-only package API. It is maintained by
4
+ # hand, and tests/packages/openapi.test.js keeps it honest: every route the router
5
+ # registers must be described here or explicitly excluded, and the query parameter
6
+ # names, lengths and patterns must match the validation rules in packages.js.
7
+ #
8
+ # Administrative endpoints (crawl, update-package) and operational pages (log, stats,
9
+ # status) are deliberately not described. info.version is filled in from package.json
10
+ # when the spec is served.
11
+
12
+ openapi: 3.1.0
13
+ info:
14
+ title: FHIRsmith Package Server
15
+ version: "0.0.0"
16
+ summary: Search and download FHIR NPM packages
17
+ description: |
18
+ A registry of FHIR packages, built by crawling the package feeds listed in the
19
+ FHIR package registry. It implements the parts of the npm registry protocol that
20
+ FHIR tooling uses (package documents and tarball downloads), plus FHIR-specific
21
+ search by canonical URL, FHIR version and dependency.
22
+
23
+ **Content negotiation.** Most endpoints return JSON. If the request's `Accept`
24
+ header contains `text/html`, they return a browsable HTML page instead. The JSON
25
+ form is the contract; the HTML form is for people and may change at any time.
26
+
27
+ **Query parameters are strict.** An unknown parameter, a repeated parameter, a
28
+ value that is too long, or one that does not match the documented pattern is
29
+ rejected with a 400 `Error` response rather than being ignored.
30
+ license:
31
+ name: BSD-3-Clause
32
+ url: https://opensource.org/license/bsd-3-clause
33
+ externalDocs:
34
+ description: FHIR NPM package specification
35
+ url: https://hl7.org/fhir/packages.html
36
+ servers:
37
+ - url: /packages
38
+ tags:
39
+ - name: search
40
+ description: Find packages
41
+ - name: registry
42
+ description: npm-compatible package documents and downloads
43
+ - name: reports
44
+ description: Registry-wide reports
45
+
46
+ paths:
47
+ /catalog:
48
+ get:
49
+ tags: [search]
50
+ operationId: searchCatalog
51
+ summary: Search packages
52
+ description: |
53
+ Returns the packages matching all of the supplied criteria. With no criteria,
54
+ returns every package.
55
+
56
+ Unless `name` contains a `#version`, each package appears once, described by
57
+ its current version, and `count` gives its total download count. When `name`
58
+ contains `#`, every matching version is returned and `count` is omitted.
59
+
60
+ Results are ordered by publication date unless `sort` is given.
61
+ parameters:
62
+ - $ref: '#/components/parameters/name'
63
+ - $ref: '#/components/parameters/dependson'
64
+ - $ref: '#/components/parameters/pkgcanonical'
65
+ - $ref: '#/components/parameters/canonical'
66
+ - $ref: '#/components/parameters/fhirversion'
67
+ - $ref: '#/components/parameters/dependency'
68
+ - $ref: '#/components/parameters/sort'
69
+ - $ref: '#/components/parameters/objWrapper'
70
+ - $ref: '#/components/parameters/prerelease'
71
+ responses:
72
+ '200':
73
+ description: The matching packages
74
+ content:
75
+ application/json:
76
+ schema:
77
+ oneOf:
78
+ - type: array
79
+ items: { $ref: '#/components/schemas/PackageSummary' }
80
+ - $ref: '#/components/schemas/WrappedSearchResult'
81
+ text/html:
82
+ schema: { type: string }
83
+ '400': { $ref: '#/components/responses/BadRequest' }
84
+ '500': { $ref: '#/components/responses/ServerError' }
85
+
86
+ /-/v1/search:
87
+ get:
88
+ tags: [search]
89
+ operationId: searchV1
90
+ summary: Search packages (npm registry search API)
91
+ description: |
92
+ The npm registry search API, so `npm search --registry` works against this
93
+ server. It takes npm's `text`, `size` and `from` parameters as well as the FHIR
94
+ search parameters of `/catalog`, and returns npm's result shape.
95
+
96
+ Differences from the npm registry:
97
+
98
+ * `text` terms match the package id or description; every term must match.
99
+ npm qualifiers (`keywords:`, `author:`, `scope:`, `not:`, `is:` ...) are
100
+ ignored.
101
+ * There is no relevance ranking: `quality`, `popularity` and `maintenance` are
102
+ accepted and ignored, every `score` is 1, and results are in publication
103
+ order unless `sort` is given.
104
+ * Without `size`, every result is returned (npm defaults to 20, but npm's own
105
+ clients always send `size`).
106
+ * `keywords` and `maintainers` are always empty, and there is no `publisher`.
107
+ parameters:
108
+ - name: text
109
+ in: query
110
+ description: Space-separated search terms.
111
+ schema:
112
+ type: string
113
+ maxLength: 200
114
+ pattern: '^[a-zA-Z0-9._:@/#| -]*$'
115
+ example: ips
116
+ - name: size
117
+ in: query
118
+ description: Maximum number of results to return (at most 250).
119
+ schema:
120
+ type: string
121
+ maxLength: 3
122
+ pattern: '^\d{1,3}$'
123
+ example: '20'
124
+ - name: from
125
+ in: query
126
+ description: Offset of the first result to return.
127
+ schema:
128
+ type: string
129
+ default: '0'
130
+ maxLength: 6
131
+ pattern: '^\d{1,6}$'
132
+ - name: quality
133
+ in: query
134
+ description: npm ranking weight. Ignored.
135
+ schema: { type: string, maxLength: 10, pattern: '^(\d+(\.\d+)?)?$' }
136
+ - name: popularity
137
+ in: query
138
+ description: npm ranking weight. Ignored.
139
+ schema: { type: string, maxLength: 10, pattern: '^(\d+(\.\d+)?)?$' }
140
+ - name: maintenance
141
+ in: query
142
+ description: npm ranking weight. Ignored.
143
+ schema: { type: string, maxLength: 10, pattern: '^(\d+(\.\d+)?)?$' }
144
+ - $ref: '#/components/parameters/name'
145
+ - $ref: '#/components/parameters/dependson'
146
+ - $ref: '#/components/parameters/pkgcanonical'
147
+ - $ref: '#/components/parameters/canonical'
148
+ - $ref: '#/components/parameters/fhirversion'
149
+ - $ref: '#/components/parameters/dependency'
150
+ - $ref: '#/components/parameters/sort'
151
+ - $ref: '#/components/parameters/objWrapper'
152
+ - $ref: '#/components/parameters/prerelease'
153
+ responses:
154
+ '200':
155
+ description: The matching packages
156
+ content:
157
+ application/json:
158
+ schema: { $ref: '#/components/schemas/NpmSearchResult' }
159
+ text/html:
160
+ schema: { type: string }
161
+ '400': { $ref: '#/components/responses/BadRequest' }
162
+ '500': { $ref: '#/components/responses/ServerError' }
163
+
164
+ /updates:
165
+ get:
166
+ tags: [search]
167
+ operationId: listUpdates
168
+ summary: Package versions published since a date
169
+ description: |
170
+ Lists every package version published on or after a date, most recent first.
171
+ The date is either relative (`daysValue` days ago, the default) or absolute
172
+ (`dateValue`).
173
+ parameters:
174
+ - name: dateType
175
+ in: query
176
+ description: Whether the cut-off is relative to today or an absolute date.
177
+ schema:
178
+ type: string
179
+ enum: [relative, absolute]
180
+ default: relative
181
+ maxLength: 10
182
+ pattern: '^(relative|absolute)?$'
183
+ - name: daysValue
184
+ in: query
185
+ description: With `dateType=relative`, how many days back to go.
186
+ schema:
187
+ type: string
188
+ default: '10'
189
+ maxLength: 3
190
+ pattern: '^\d{1,3}$'
191
+ - name: dateValue
192
+ in: query
193
+ description: With `dateType=absolute`, the cut-off date. Defaults to today.
194
+ schema:
195
+ type: string
196
+ format: date
197
+ maxLength: 10
198
+ pattern: '^\d{4}-\d{2}-\d{2}$'
199
+ responses:
200
+ '200':
201
+ description: The package versions published since the cut-off
202
+ content:
203
+ application/json:
204
+ schema:
205
+ type: array
206
+ items: { $ref: '#/components/schemas/PackageUpdate' }
207
+ text/html:
208
+ schema: { type: string }
209
+ '400': { $ref: '#/components/responses/BadRequest' }
210
+ '500': { $ref: '#/components/responses/ServerError' }
211
+
212
+ /broken:
213
+ get:
214
+ tags: [reports]
215
+ operationId: listBrokenDependencies
216
+ summary: Package versions with unresolvable dependencies
217
+ description: |
218
+ Reports every package version that declares a dependency on a package
219
+ version this registry does not hold. Dependencies are matched on package id
220
+ and major.minor version, so a dependency on `1.1.0` is satisfied by `1.1.2`.
221
+ parameters:
222
+ - name: filter
223
+ in: query
224
+ description: Only report package versions whose `id#version` contains this text.
225
+ schema:
226
+ type: string
227
+ maxLength: 100
228
+ pattern: '^[a-zA-Z0-9._-]*$'
229
+ responses:
230
+ '200':
231
+ description: The broken dependencies, keyed by the package version that declares them
232
+ content:
233
+ application/json:
234
+ schema: { $ref: '#/components/schemas/BrokenDependencies' }
235
+ text/html:
236
+ schema: { type: string }
237
+ '400': { $ref: '#/components/responses/BadRequest' }
238
+ '500': { $ref: '#/components/responses/ServerError' }
239
+
240
+ /{id}:
241
+ get:
242
+ tags: [registry]
243
+ operationId: getPackage
244
+ summary: Package document (npm registry format)
245
+ description: |
246
+ The npm registry document for a package: every version this registry holds,
247
+ with its metadata, dependencies and tarball URL. `dist-tags.latest` is the most
248
+ recently published version.
249
+ parameters:
250
+ - name: id
251
+ in: path
252
+ required: true
253
+ description: The package id, e.g. `hl7.fhir.r4.core`.
254
+ schema: { type: string }
255
+ example: hl7.fhir.uv.ips
256
+ responses:
257
+ '200':
258
+ description: The package document
259
+ content:
260
+ application/json:
261
+ schema: { $ref: '#/components/schemas/PackageDocument' }
262
+ text/html:
263
+ schema: { type: string }
264
+ '404':
265
+ description: No package with this id is known
266
+ content:
267
+ application/json:
268
+ schema: { $ref: '#/components/schemas/Error' }
269
+ '500': { $ref: '#/components/responses/ServerError' }
270
+
271
+ /{id}/{version}:
272
+ get:
273
+ tags: [registry]
274
+ operationId: downloadPackage
275
+ summary: Download a package tarball
276
+ description: |
277
+ Returns the package tarball (`.tgz`).
278
+
279
+ If no version matches exactly, the most recently published pre-release of that
280
+ version (`{version}-*`) is returned instead, so `1.0.0` will find `1.0.0-ballot`
281
+ when there is no `1.0.0`.
282
+
283
+ If the server is configured to serve packages from bucket storage, this
284
+ redirects to the tarball there.
285
+ parameters:
286
+ - name: id
287
+ in: path
288
+ required: true
289
+ description: |
290
+ The package id. A scoped id (`@scope/name`) must have its `/` encoded as `%2F`.
291
+ schema:
292
+ type: string
293
+ maxLength: 100
294
+ pattern: '^(@[a-z0-9._-]+\/)?[a-zA-Z0-9._-]+$'
295
+ example: hl7.fhir.uv.ips
296
+ - name: version
297
+ in: path
298
+ required: true
299
+ description: The package version.
300
+ schema:
301
+ type: string
302
+ maxLength: 50
303
+ pattern: '^[a-zA-Z0-9._-]+$'
304
+ example: 1.1.0
305
+ responses:
306
+ '200':
307
+ description: The package tarball
308
+ headers:
309
+ Content-Disposition:
310
+ description: '`attachment; filename="{id}#{version}.tgz"`'
311
+ schema: { type: string }
312
+ content:
313
+ application/tar+gzip:
314
+ schema:
315
+ type: string
316
+ contentEncoding: binary
317
+ '302':
318
+ description: Redirect to the tarball in bucket storage
319
+ headers:
320
+ Location:
321
+ schema: { type: string, format: uri }
322
+ '400': { $ref: '#/components/responses/BadRequest' }
323
+ '404':
324
+ description: No such package version is known
325
+ content:
326
+ text/plain:
327
+ schema: { type: string }
328
+ '500': { $ref: '#/components/responses/ServerError' }
329
+
330
+ components:
331
+ parameters:
332
+ name:
333
+ name: name
334
+ in: query
335
+ description: |
336
+ Packages whose id contains this text. Append `#version` to search specific
337
+ versions (every version containing that text is then returned, not just the
338
+ current one). Matched with SQL `LIKE`, so `_` matches any single character.
339
+ schema:
340
+ type: string
341
+ maxLength: 100
342
+ pattern: '^[a-zA-Z0-9._#-]*$'
343
+ example: hl7.fhir.uv.ips
344
+ dependson:
345
+ name: dependson
346
+ in: query
347
+ description: |
348
+ Packages with a dependency whose `id@version` contains this text. `#` or `|`
349
+ may be used in place of `@`.
350
+ schema:
351
+ type: string
352
+ maxLength: 100
353
+ pattern: '^[a-zA-Z0-9._#|@-]*$'
354
+ pkgcanonical:
355
+ name: pkgcanonical
356
+ in: query
357
+ description: |
358
+ The package's canonical URL. Matched exactly, or as a prefix if the value ends
359
+ with `%`.
360
+ schema:
361
+ type: string
362
+ maxLength: 200
363
+ pattern: '^[a-zA-Z0-9._:/-]*%?$'
364
+ example: http://hl7.org/fhir/uv/ips
365
+ canonical:
366
+ name: canonical
367
+ in: query
368
+ description: Packages containing a resource whose canonical URL starts with this value.
369
+ schema:
370
+ type: string
371
+ maxLength: 200
372
+ pattern: '^[a-zA-Z0-9._:/-]*$'
373
+ example: http://hl7.org/fhir/uv/ips/StructureDefinition/Bundle-uv-ips
374
+ fhirversion:
375
+ name: fhirversion
376
+ in: query
377
+ description: |
378
+ Packages for this FHIR release: R2 (1.0.x), R2B (1.4.x), R3 (3.0.x), R4 (4.0.x),
379
+ R4B (4.3.x), R5 (5.0.x) or R6 (6.0.x, including ballots).
380
+ schema:
381
+ type: string
382
+ maxLength: 10
383
+ pattern: '^(R2|R2B|R3|R4|R4B|R5|R6)?$'
384
+ enum: [R2, R2B, R3, R4, R4B, R5, R6]
385
+ dependency:
386
+ name: dependency
387
+ in: query
388
+ description: |
389
+ Packages that depend on this package. Either `id` (any version), or
390
+ `id#version`, `id|version` or `id@version`; a version is matched as a prefix.
391
+ schema:
392
+ type: string
393
+ maxLength: 100
394
+ pattern: '^[a-zA-Z0-9._#|@-]*$'
395
+ example: hl7.fhir.r4.core#4.0.1
396
+ sort:
397
+ name: sort
398
+ in: query
399
+ description: |
400
+ Sort field; prefix with `-` for descending order. Versions sort semver-style,
401
+ with a pre-release (`1.0.0-ballot`) before its release. Without `sort`, results
402
+ are in publication order.
403
+ schema:
404
+ type: string
405
+ maxLength: 20
406
+ pattern: '^-?(name|version|date|count|fhirversion|kind|canonical)$'
407
+ example: -date
408
+ objWrapper:
409
+ name: objWrapper
410
+ in: query
411
+ description: |
412
+ `true` wraps the results as `{"objects": [{"package": ...}]}`, the core of the npm
413
+ search result shape. Retained for older clients; new clients wanting the npm
414
+ shape should use `/-/v1/search`.
415
+ schema:
416
+ type: string
417
+ maxLength: 10
418
+ pattern: '^(true|false)?$'
419
+ enum: ['true', 'false']
420
+ prerelease:
421
+ name: prerelease
422
+ in: query
423
+ description: |
424
+ Sent by the HL7 Java package client. Accepted for compatibility; it has no effect,
425
+ since searches already include pre-release versions.
426
+ schema:
427
+ type: string
428
+ maxLength: 5
429
+ pattern: '^(true|false)?$'
430
+ enum: ['true', 'false']
431
+
432
+ responses:
433
+ BadRequest:
434
+ description: A parameter was unknown, repeated, too long or badly formed
435
+ content:
436
+ application/json:
437
+ schema: { $ref: '#/components/schemas/Error' }
438
+ ServerError:
439
+ description: The server failed to process the request
440
+ content:
441
+ application/json:
442
+ schema: { $ref: '#/components/schemas/Error' }
443
+
444
+ schemas:
445
+ FhirVersion:
446
+ type: string
447
+ description: |
448
+ The FHIR version(s) the package is for, e.g. `4.0.1`. Packages for more than
449
+ one version list them separated by `, `.
450
+ example: 4.0.1
451
+ PackageKind:
452
+ type: string
453
+ enum: [fhir.core, fhir.ig, fhir.template]
454
+
455
+ PackageSummary:
456
+ type: object
457
+ description: A package version, as returned by search.
458
+ required: [name, version, fhirVersion, kind, url]
459
+ properties:
460
+ name: { type: string, description: Package id, example: hl7.fhir.uv.ips }
461
+ version: { type: string, example: 1.1.0 }
462
+ fhirVersion: { $ref: '#/components/schemas/FhirVersion' }
463
+ canonical: { type: string, format: uri, description: The package's canonical URL }
464
+ kind: { $ref: '#/components/schemas/PackageKind' }
465
+ url: { type: string, format: uri, description: Where to download the tarball }
466
+ date: { type: string, format: date-time, description: Publication date }
467
+ count:
468
+ type: integer
469
+ description: Total downloads of the package (all versions). Omitted for versioned searches.
470
+ description: { type: string }
471
+
472
+ WrappedSearchResult:
473
+ type: object
474
+ required: [objects]
475
+ properties:
476
+ objects:
477
+ type: array
478
+ items:
479
+ type: object
480
+ required: [package]
481
+ properties:
482
+ package: { $ref: '#/components/schemas/PackageSummary' }
483
+
484
+ NpmSearchResult:
485
+ type: object
486
+ description: The npm registry search result shape.
487
+ required: [objects, total, time]
488
+ properties:
489
+ objects:
490
+ type: array
491
+ items:
492
+ type: object
493
+ required: [package, score, searchScore]
494
+ properties:
495
+ package:
496
+ allOf:
497
+ - $ref: '#/components/schemas/PackageSummary'
498
+ - type: object
499
+ required: [keywords, maintainers]
500
+ properties:
501
+ keywords: { type: array, items: { type: string }, maxItems: 0 }
502
+ maintainers: { type: array, items: { type: object }, maxItems: 0 }
503
+ score:
504
+ type: object
505
+ properties:
506
+ final: { type: number }
507
+ detail:
508
+ type: object
509
+ properties:
510
+ quality: { type: number }
511
+ popularity: { type: number }
512
+ maintenance: { type: number }
513
+ searchScore: { type: number }
514
+ total: { type: integer, description: Number of matches before size/from are applied }
515
+ time: { type: string, description: When the search ran }
516
+
517
+ PackageUpdate:
518
+ type: object
519
+ description: A package version published since the requested date.
520
+ required: [name, version, date, fhirVersion, kind, url]
521
+ properties:
522
+ name: { type: string }
523
+ version: { type: string }
524
+ date: { type: string, format: date-time }
525
+ fhirVersion: { $ref: '#/components/schemas/FhirVersion' }
526
+ canonical: { type: string, format: uri }
527
+ kind: { $ref: '#/components/schemas/PackageKind' }
528
+ url: { type: string, format: uri }
529
+ description: { type: string }
530
+
531
+ PackageDocument:
532
+ type: object
533
+ description: An npm registry package document.
534
+ required: [_id, name, dist-tags, versions]
535
+ properties:
536
+ _id: { type: string }
537
+ name: { type: string }
538
+ description: { type: string }
539
+ dist-tags:
540
+ type: object
541
+ required: [latest]
542
+ properties:
543
+ latest: { type: string, description: The most recently published version }
544
+ versions:
545
+ type: object
546
+ description: Every version this registry holds, keyed by version.
547
+ additionalProperties: { $ref: '#/components/schemas/PackageVersion' }
548
+
549
+ PackageVersion:
550
+ type: object
551
+ required: [name, version, date, fhirVersion, kind, count, url, dist]
552
+ properties:
553
+ name: { type: string }
554
+ _id: { type: string, description: '`{id}@{version}`' }
555
+ version: { type: string }
556
+ date: { type: string, format: date-time }
557
+ fhirVersion: { $ref: '#/components/schemas/FhirVersion' }
558
+ kind: { $ref: '#/components/schemas/PackageKind' }
559
+ count: { type: integer, description: Downloads of this version }
560
+ canonical: { type: string, format: uri }
561
+ url: { type: string, format: uri }
562
+ homepage: { type: string }
563
+ license: { type: string }
564
+ author:
565
+ type: object
566
+ properties:
567
+ name: { type: string }
568
+ description: { type: string }
569
+ dependencies:
570
+ type: object
571
+ description: Package id to version.
572
+ additionalProperties: { type: string }
573
+ example: { hl7.fhir.r4.core: 4.0.1 }
574
+ dist:
575
+ type: object
576
+ required: [tarball]
577
+ properties:
578
+ shasum: { type: string }
579
+ tarball: { type: string, format: uri }
580
+
581
+ BrokenDependencies:
582
+ type: object
583
+ description: |
584
+ Keys are `id#version` of the package versions with broken dependencies; each
585
+ value lists the unresolvable dependencies as `id@version`. `date` is when the
586
+ report was generated.
587
+ required: [date]
588
+ properties:
589
+ date: { type: string, format: date-time }
590
+ additionalProperties:
591
+ type: array
592
+ items: { type: string }
593
+ example:
594
+ date: '2026-10-04T00:00:00.000Z'
595
+ 'example.fhir.ig#1.0.0': ['hl7.fhir.uv.missing@2.0.0']
596
+
597
+ Error:
598
+ type: object
599
+ required: [error]
600
+ properties:
601
+ error: { type: string }
602
+ message: { type: string }
603
+ parameter: { type: string, description: The offending parameter, for repeated parameters }
@@ -9,6 +9,7 @@
9
9
  <meta content="http://hl7.org/fhir" name="author"/>
10
10
  <meta charset="utf-8" http-equiv="X-UA-Compatible" content="IE=edge" />
11
11
 
12
+ <link rel="service-desc" type="application/json" href="/packages/openapi.json"/>
12
13
  <link rel="stylesheet" href="/fhir.css"/>
13
14
 
14
15
 
@@ -59,7 +60,8 @@
59
60
  <a href="/packages" style="color: gold">Packages Home</a> &nbsp;|&nbsp;
60
61
  <a href="/packages/updates" style="color: gold">Updates</a> &nbsp;|&nbsp;
61
62
  <a href="/packages/broken" style="color: gold">Broken</a> &nbsp;|&nbsp;
62
- <a href="/packages/log" style="color: gold">Crawler Log</a>
63
+ <a href="/packages/log" style="color: gold">Crawler Log</a> &nbsp;|&nbsp;
64
+ <a href="/packages/openapi" style="color: gold">API</a>
63
65
  </div> <!-- /container -->
64
66
  </div> <!-- /container -->
65
67
  </div>
@@ -92,7 +94,7 @@
92
94
  <p>
93
95
  <a href="http://www.hl7.org/fhir" style="color: gold" title="Fast Healthcare Interoperability Resources - Home Page"><img border="0" src="/icon-fhir-16.png" style="vertical-align: text-bottom"/> <b>FHIR</b></a> &copy; HL7.org 2011+. &nbsp;|&nbsp;
94
96
  <a href="https://github.com/HealthIntersections/FHIRsmith/blob/main/README.md" style="color: gold"><img border="0" src="/FHIRsmith16.png" style="vertical-align: text-bottom"/> FHIRsmith</a> [%ver%] &copy; HealthIntersections.com.au 2023+ &nbsp;|&nbsp;
95
- Package Registry last updated as of [%crawler-date%] &nbsp;|&nbsp; [%total-packages%] packages &nbsp;|
97
+ Package Registry [%crawler-status%] &nbsp;|&nbsp; [%total-packages%] packages &nbsp;|
96
98
  &nbsp; ([%ms%] ms)
97
99
  [%sponsorMessage%]
98
100
  </p>