From 417ed7f7e4d24ea640d5d5441e193e8c7c3a9476 Mon Sep 17 00:00:00 2001 From: meerkat-manor Date: Wed, 2 Aug 2023 23:07:38 +1000 Subject: [PATCH] Recognise server can be client --- docs/developer_client_start.md | 4 ++-- docs/developer_server_start.md | 22 ++++++++++++++++++++-- docs/developer_update.md | 24 +++++++++++++++++++++--- 3 files changed, 43 insertions(+), 7 deletions(-) diff --git a/docs/developer_client_start.md b/docs/developer_client_start.md index a185663..b101c71 100644 --- a/docs/developer_client_start.md +++ b/docs/developer_client_start.md @@ -101,13 +101,13 @@ sequenceDiagram term -->- vsc: close - rect grey + rect lightgrey Note over vsc, qaskx: Developer codes to use the OpenAPI definition, with base code in place vsc -->> vsc: Code update vsc -->> vsc: Local build vsc -->> vsc: Local test end - + vsc ->>+ git: Commit git --) git: Trigger GitActions for lint, gateway, features, etc git ->>- vsc: Success diff --git a/docs/developer_server_start.md b/docs/developer_server_start.md index d522453..28e884b 100644 --- a/docs/developer_server_start.md +++ b/docs/developer_server_start.md @@ -24,6 +24,9 @@ The assumptions for this documents are: The sequence of automation activity using **devops** file and **qaskx-cli** is as follows. +**A server can also be a consumer of other APIs in which case it needs to generate +when downstream API specifications client code.** + The Qaskx command line tool needs to be installed on the developer machine ```mermaid @@ -94,13 +97,28 @@ sequenceDiagram qaskx -) devops: Auto update entries, including build, test qaskx -->>- term: Success - rect grey + opt + + term ->>+ qaskx: Generate code + Note over qaskx, cmdb: qaskx-cli gen client cmd + qaskx ->>+ devops: Read dependency list + devops -->>- qaskx: Contents + loop Read called dependencies + qaskx ->>+ oas3f: Read dependency + oas3f -->>- qaskx: Contents + qaskx -) qaskx: Auto generate client code + end + qaskx -->>- term: Success + + end + + rect lightgrey Note over vsc, qaskx: Developer codes to use the OpenAPI definition, with base code in place vsc -->> vsc: Code update vsc -->> vsc: Local build vsc -->> vsc: Local test end - + alt Register API if not already done term ->>+ qaskx: Register API diff --git a/docs/developer_update.md b/docs/developer_update.md index 4eee25c..8fea050 100644 --- a/docs/developer_update.md +++ b/docs/developer_update.md @@ -45,6 +45,9 @@ sequenceDiagram Once the OpenAPI definition has been updated the server code needs to be re-generated as the publisher of the API. +**A server can also be a consumer of other APIs in which case it needs updating +when downstream API specifications change.** + ```mermaid --- title: Server development update task flow @@ -84,15 +87,30 @@ sequenceDiagram end qaskx -->>- term: Success + opt + + term ->>+ qaskx: Generate code + Note over qaskx, cmdb: qaskx-cli gen client cmd + qaskx ->>+ devops: Read dependency list + devops -->>- qaskx: Contents + loop Read called dependencies + qaskx ->>+ oas3f: Read dependency + oas3f -->>- qaskx: Contents + qaskx -) qaskx: Auto generate client code + end + qaskx -->>- term: Success + + end + term -->- vsc: close - rect grey + rect lightgrey Note over vsc, qaskx: Code updates to use the updated OpenAPI definition vsc -->> vsc: Code update vsc -->> vsc: Local build vsc -->> vsc: Local test end - + vsc ->>+ git: Commit git --) git: Trigger GitActions for lint, gateway, features, etc git ->>- vsc: Success @@ -147,7 +165,7 @@ sequenceDiagram term -->- vsc: close - rect grey + rect lightgrey Note over vsc, qaskx: Code updates to use the updated OpenAPI definition vsc -->> vsc: Code update vsc -->> vsc: Local build