From fe0023c56a6df63e82c39669b399c7fe4e36e3ed Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Sun, 4 Jun 2023 03:05:05 +0200 Subject: [PATCH] [build] `npm run bundle` now works properly. --- .gitignore | 1 + package.json | 2 +- paths/patient_base.yaml | 34 ++++++------- paths/patient_dossier.yaml | 48 +++++++++---------- paths/qoc_careprogram.yaml | 6 +-- ...qoc_careprogram_{careprogramKey}_fave.yaml | 4 +- paths/qoc_indicatorset_{setKey}.yaml | 6 +-- schemas/IndicatorSet.yaml | 2 +- zoo-api.yaml | 13 +---- 9 files changed, 54 insertions(+), 62 deletions(-) diff --git a/.gitignore b/.gitignore index 2fdb769..2c28f32 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /zoo-api.html +/zoo-api-bundle.yaml diff --git a/package.json b/package.json index 90365b3..91fd034 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "private": true, "scripts": { "start": "npx @redocly/cli@^1.0.0-beta build-docs -o zoo-api.html", - "bundle": "npx @redocly/cli@^1.0.0-beta bundle -o dist.yaml", + "bundle": "npx @redocly/cli@^1.0.0-beta bundle -o zoo-api-bundle.yaml", "test": "npx @redocly/cli@^1.0.0-beta lint" } } diff --git a/paths/patient_base.yaml b/paths/patient_base.yaml index b50c6ce..9989583 100644 --- a/paths/patient_base.yaml +++ b/paths/patient_base.yaml @@ -11,7 +11,7 @@ get: schema: type: string example: 123456789 - - $ref: '#/components/parameters/Authorization' + - $ref: '../zoo-api.yaml#/components/parameters/Authorization' responses: '200': description: Basic personal information for the patient is returned. @@ -30,38 +30,38 @@ get: - start_date properties: bsn: - $ref: 'schemas/PatIdentity.yaml#/bsn' + $ref: '../schemas/PatIdentity.yaml#/bsn' name: - $ref: 'schemas/PatIdentity.yaml#/name' + $ref: '../schemas/PatIdentity.yaml#/name' gender: - $ref: 'schemas/PatIdentity.yaml#/gender' + $ref: '../schemas/PatIdentity.yaml#/gender' dob: - $ref: 'schemas/PatIdentity.yaml#/dob' + $ref: '../schemas/PatIdentity.yaml#/dob' category: - $ref: 'schemas/PatIdentity.yaml#/category' + $ref: '../schemas/PatIdentity.yaml#/category' doctor: - $ref: 'schemas/PatIdentity.yaml#/doctor' + $ref: '../schemas/PatIdentity.yaml#/doctor' address: - $ref: 'schemas/PatIdentity.yaml#/address' + $ref: '../schemas/PatIdentity.yaml#/address' contact: - $ref: 'schemas/PatIdentity.yaml#/contact' + $ref: '../schemas/PatIdentity.yaml#/contact' insurance: - $ref: 'schemas/PatIdentity.yaml#/insurance' + $ref: '../schemas/PatIdentity.yaml#/insurance' patid: - $ref: 'schemas/PatIdentity.yaml#/patid' + $ref: '../schemas/PatIdentity.yaml#/patid' pat_unid: - $ref: 'schemas/PatIdentity.yaml#/pat_unid' + $ref: '../schemas/PatIdentity.yaml#/pat_unid' start_date: - $ref: 'schemas/PatIdentity.yaml#/start_date' + $ref: '../schemas/PatIdentity.yaml#/start_date' end_date: - $ref: 'schemas/PatIdentity.yaml#/end_date' + $ref: '../schemas/PatIdentity.yaml#/end_date' end_reason: - $ref: 'schemas/PatIdentity.yaml#/end_reason' + $ref: '../schemas/PatIdentity.yaml#/end_reason' '400': description: The request is invalid; for example, it doesn't contain the required `BSN` parameter. '401': - $ref: '#/components/responses/JwtFailure' + $ref: '../zoo-api.yaml#/components/responses/JwtFailure' '403': description: Indicated practice is known but has not authorized ZOO to share this information with signer. '404': - $ref: '#/components/responses/PatNotFound' + $ref: '../zoo-api.yaml#/components/responses/PatNotFound' diff --git a/paths/patient_dossier.yaml b/paths/patient_dossier.yaml index e0c0fd4..92744af 100644 --- a/paths/patient_dossier.yaml +++ b/paths/patient_dossier.yaml @@ -53,16 +53,16 @@ get: example: diet-dm2 responses: '400': - $ref: '#/components/responses/ReqFailure' + $ref: '../zoo-api.yaml#/components/responses/ReqFailure' '401': - $ref: '#/components/responses/JwtFailure' + $ref: '../zoo-api.yaml#/components/responses/JwtFailure' '403': description: |- Practice associated with the JWT is known but has not authorized ZOO to share information with signer for the provided purpose. This error also occurs if the provided purpose isn't a known key. '404': - $ref: '#/components/responses/PatNotFound' + $ref: '../zoo-api.yaml#/components/responses/PatNotFound' '200': description: |- Detailed medical dossier information for the patient is returned. @@ -80,39 +80,39 @@ get: type: object properties: bsn: - $ref: 'schemas/PatIdentity.yaml#/bsn' + $ref: '../schemas/PatIdentity.yaml#/bsn' name: - $ref: 'schemas/PatIdentity.yaml#/name' + $ref: '../schemas/PatIdentity.yaml#/name' gender: - $ref: 'schemas/PatIdentity.yaml#/gender' + $ref: '../schemas/PatIdentity.yaml#/gender' dob: - $ref: 'schemas/PatIdentity.yaml#/dob' + $ref: '../schemas/PatIdentity.yaml#/dob' category: - $ref: 'schemas/PatIdentity.yaml#/category' + $ref: '../schemas/PatIdentity.yaml#/category' doctor: - $ref: 'schemas/PatIdentity.yaml#/doctor' + $ref: '../schemas/PatIdentity.yaml#/doctor' address: - $ref: 'schemas/PatIdentity.yaml#/address' + $ref: '../schemas/PatIdentity.yaml#/address' contact: - $ref: 'schemas/PatIdentity.yaml#/contact' + $ref: '../schemas/PatIdentity.yaml#/contact' insurance: - $ref: 'schemas/PatIdentity.yaml#/insurance' + $ref: '../schemas/PatIdentity.yaml#/insurance' patid: - $ref: 'schemas/PatIdentity.yaml#/patid' + $ref: '../schemas/PatIdentity.yaml#/patid' pat_unid: - $ref: 'schemas/PatIdentity.yaml#/pat_unid' + $ref: '../schemas/PatIdentity.yaml#/pat_unid' start_date: - $ref: 'schemas/PatIdentity.yaml#/start_date' + $ref: '../schemas/PatIdentity.yaml#/start_date' end_date: - $ref: 'schemas/PatIdentity.yaml#/end_date' + $ref: '../schemas/PatIdentity.yaml#/end_date' end_reason: - $ref: 'schemas/PatIdentity.yaml#/end_reason' + $ref: '../schemas/PatIdentity.yaml#/end_reason' episodes: type: array description: |- Lists chronic problems or other diagnosed medical issues (dutch: _behandelingen / episodes / problemen_) based on ICPC1-NL. items: - $ref: 'schemas/med_dossier/Episode.yaml' + $ref: '../schemas/med_dossier/Episode.yaml' measurements: type: array description: |- @@ -121,7 +121,7 @@ get: (such as 'responsible for chronic diabetes care: Specialist'), and answers to questionnaires such as 'do you have trouble walking up stairs'). items: - $ref: 'schemas/med_dossier/Measurement.yaml' + $ref: '../schemas/med_dossier/Measurement.yaml' feats: type: array description: |- @@ -130,19 +130,19 @@ get: * material that is paid separately (such some nitrogen to burn off a wart) * 'subscription' fees such as the standard subscription fee as well as extras charged for each patient per quarter (dutch: _inschrijf_ en _module_ tarieven). items: - $ref: 'schemas/med_dossier/Feat.yaml' + $ref: '../schemas/med_dossier/Feat.yaml' correspondence: type: array description: |- Lists records of correspondence (excluding correspondence within the GP office and correspondence with the patient themselves). items: - $ref: 'schemas/med_dossier/Correspondence.yaml' + $ref: '../schemas/med_dossier/Correspondence.yaml' medications: type: array description: |- Lists medication, either prescribed, or delivered to the patient (or both, of course). items: - $ref: 'schemas/med_dossier/Medication.yaml' + $ref: '../schemas/med_dossier/Medication.yaml' contraindications: type: array description: |- @@ -150,7 +150,7 @@ get: this patient's information is shown to a practicioner. Generally simply is an alternate take on a list of problems a patient suffers from; specifically issues that may affect unrelated care (such as allergies, mental issues, and so on). items: - $ref: 'schemas/med_dossier/Contraindication.yaml' + $ref: '../schemas/med_dossier/Contraindication.yaml' journals: type: array description: |- @@ -158,4 +158,4 @@ get: patient themselves tells the practicioner (can include verbatim copies of what the patient wrote for text-based telehealth systems), as well as explaining in text the conclusions included in a lab report received via mail. items: - $ref: 'schemas/med_dossier/Journal.yaml' + $ref: '../schemas/med_dossier/Journal.yaml' diff --git a/paths/qoc_careprogram.yaml b/paths/qoc_careprogram.yaml index 677a890..d8cb156 100644 --- a/paths/qoc_careprogram.yaml +++ b/paths/qoc_careprogram.yaml @@ -20,8 +20,8 @@ get: programs: type: array items: - $ref: '#/components/schemas/CareProgram' + $ref: '../schemas/CareProgram.yaml' '401': - $ref: '#/components/responses/NoAuth' + $ref: '../zoo-api.yaml/#/components/responses/NoAuth' '403': - $ref: '#/components/responses/NoAccess' \ No newline at end of file + $ref: '../zoo-api.yaml/#/components/responses/NoAccess' diff --git a/paths/qoc_careprogram_{careprogramKey}_fave.yaml b/paths/qoc_careprogram_{careprogramKey}_fave.yaml index cdb1241..358393c 100644 --- a/paths/qoc_careprogram_{careprogramKey}_fave.yaml +++ b/paths/qoc_careprogram_{careprogramKey}_fave.yaml @@ -46,6 +46,6 @@ put: description: Whether this care program should be default-shown or not. type: boolean '401': - $ref: '#/components/responses/NoAuth' + $ref: '../zoo-api.yaml/#/components/responses/NoAuth' '403': - $ref: '#/components/responses/NoAccess' + $ref: '../zoo-api.yaml/#/components/responses/NoAccess' diff --git a/paths/qoc_indicatorset_{setKey}.yaml b/paths/qoc_indicatorset_{setKey}.yaml index f7fe9a6..cf2a267 100644 --- a/paths/qoc_indicatorset_{setKey}.yaml +++ b/paths/qoc_indicatorset_{setKey}.yaml @@ -31,11 +31,11 @@ get: content: application/json: schema: - $ref: '#/components/schemas/IndicatorSet' + $ref: '../schemas/IndicatorSet.yaml' '401': - $ref: '#/components/responses/NoAuth' + $ref: '../zoo-api.yaml/#/components/responses/NoAuth' '403': - $ref: '#/components/responses/NoAccess' + $ref: '../zoo-api.yaml#/components/responses/NoAccess' '404': description: The provided `setKey` doesn't refer to a valid program. diff --git a/schemas/IndicatorSet.yaml b/schemas/IndicatorSet.yaml index 993a964..ff0d445 100644 --- a/schemas/IndicatorSet.yaml +++ b/schemas/IndicatorSet.yaml @@ -35,4 +35,4 @@ properties: items: type: array items: - $ref: '#/components/schemas/Indicator' + $ref: 'Indicator.yaml' diff --git a/zoo-api.yaml b/zoo-api.yaml index 67ba868..9964785 100644 --- a/zoo-api.yaml +++ b/zoo-api.yaml @@ -3,6 +3,8 @@ info: title: Zorg op Orde API description: |- Copyright Zorg op Orde – All rights reserved. + + This documentation is available in OpenAPI 3.1.0 yaml format. contact: name: Zorg op Orde email: api@zorgoporde.nl @@ -49,16 +51,6 @@ paths: /qoc/indicatorset/{setKey}: $ref: 'paths/qoc_indicatorset_{setKey}.yaml' components: - schemas: - IndicatorSet: - $ref: 'schemas/IndicatorSet.yaml' - Indicator: - $ref: 'schemas/Indicator.yaml' - CareProgram: - $ref: 'schemas/CareProgram.yaml' - CareProgramSet: - $ref: 'schemas/CareProgramSet.yaml' - parameters: Authorization: name: Authorization @@ -79,7 +71,6 @@ components: type: string example: >- Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJraWQiOiJaT08tQVBJLVBLSS1JRCIsImFnYiI6IjAxMDEyMzQ1IiwiaWF0IjoxNTE2MjM5MDIyLCJqdGkiOiJ0MTIzNC01Njc4LUFCQ0QifQ.wTesCfFTq1Mz8z7hUWU6zzKSc3dopWnpeETR7eDzFtc - responses: ReqFailure: description: |-