diff --git a/yky-social/create-openapi-client.sh b/yky-social/create-openapi-client.sh index bd7be70d..eddab344 100755 --- a/yky-social/create-openapi-client.sh +++ b/yky-social/create-openapi-client.sh @@ -1,7 +1,7 @@ : # generate the openapi definition document -npx dbos-sdk openapi src/operations.ts +npx dbos-openapi generate src/operations.ts # generate the typescript-fetch client docker run --rm \ diff --git a/yky-social/package-lock.json b/yky-social/package-lock.json index 701aee37..55f7ee4e 100644 --- a/yky-social/package-lock.json +++ b/yky-social/package-lock.json @@ -30,6 +30,7 @@ "uuid": "^9.0.1" }, "devDependencies": { + "@dbos-inc/dbos-openapi": "file:../../dbos-sdk/packages/dbos-openapi/dbos-inc-dbos-openapi-0.0.0-placeholder.tgz", "@dbos-inc/eslint-plugin": "^0.0.4", "@jest/globals": "^29.5.0", "@types/bcryptjs": "^2.4.2", @@ -1564,6 +1565,23 @@ "kuler": "^2.0.0" } }, + "node_modules/@dbos-inc/dbos-openapi": { + "version": "0.0.0-placeholder", + "resolved": "file:../../dbos-sdk/packages/dbos-openapi/dbos-inc-dbos-openapi-0.0.0-placeholder.tgz", + "integrity": "sha512-Re4bN9qSqiIw322u00K2H54PusPvnJ4FfighzmcLbPnhQbuiJHxhzgQqgiu9FMKi7w7D/yHKA9x00riNw5366w==", + "dev": true, + "license": "MIT", + "dependencies": { + "commander": "^11.0.0", + "openapi-types": "^12.1.3", + "ts-json-schema-generator": "^1.5.0", + "typescript": "^5.3.3", + "yaml": "^2.3.4" + }, + "bin": { + "dbos-openapi": "dist/packages/dbos-openapi/cli.js" + } + }, "node_modules/@dbos-inc/dbos-sdk": { "version": "0.8.32-preview", "resolved": "https://registry.npmjs.org/@dbos-inc/dbos-sdk/-/dbos-sdk-0.8.32-preview.tgz", diff --git a/yky-social/package.json b/yky-social/package.json index dc76d01f..35a8c824 100644 --- a/yky-social/package.json +++ b/yky-social/package.json @@ -36,6 +36,7 @@ "uuid": "^9.0.1" }, "devDependencies": { + "@dbos-inc/dbos-openapi": "file:../../dbos-sdk/packages/dbos-openapi/dbos-inc-dbos-openapi-0.0.0-placeholder.tgz", "@dbos-inc/eslint-plugin": "^0.0.4", "@jest/globals": "^29.5.0", "@types/bcryptjs": "^2.4.2", diff --git a/yky-social/src/openapi.yaml b/yky-social/src/openapi.yaml index 19c53099..a8bf198e 100644 --- a/yky-social/src/openapi.yaml +++ b/yky-social/src/openapi.yaml @@ -1,4 +1,4 @@ -# OpenApi specification generated by DBOS +# OpenApi specification generated for application openapi: 3.0.3 info: @@ -21,6 +21,8 @@ paths: message: type: string additionalProperties: false + parameters: + - $ref: "#/components/parameters/dbosWorkflowUUID" /recvtimeline: get: operationId: receiveTimeline @@ -69,6 +71,8 @@ paths: type: string additionalProperties: false additionalProperties: false + parameters: + - $ref: "#/components/parameters/dbosWorkflowUUID" /sendtimeline: get: operationId: sendTimeline @@ -114,6 +118,8 @@ paths: type: string additionalProperties: false additionalProperties: false + parameters: + - $ref: "#/components/parameters/dbosWorkflowUUID" /finduser: get: operationId: doFindUser @@ -154,6 +160,7 @@ paths: required: true schema: type: string + - $ref: "#/components/parameters/dbosWorkflowUUID" /post/{id}: get: operationId: getPost @@ -189,6 +196,7 @@ paths: required: true schema: type: string + - $ref: "#/components/parameters/dbosWorkflowUUID" /login: post: operationId: doLogin @@ -208,7 +216,8 @@ paths: id: type: string additionalProperties: false - parameters: [] + parameters: + - $ref: "#/components/parameters/dbosWorkflowUUID" requestBody: required: true content: @@ -242,7 +251,8 @@ paths: id: type: string additionalProperties: false - parameters: [] + parameters: + - $ref: "#/components/parameters/dbosWorkflowUUID" requestBody: required: true content: @@ -279,7 +289,8 @@ paths: message: type: string additionalProperties: false - parameters: [] + parameters: + - $ref: "#/components/parameters/dbosWorkflowUUID" requestBody: required: true content: @@ -307,7 +318,8 @@ paths: message: type: string additionalProperties: false - parameters: [] + parameters: + - $ref: "#/components/parameters/dbosWorkflowUUID" requestBody: required: true content: @@ -352,6 +364,7 @@ paths: required: true schema: type: string + - $ref: "#/components/parameters/dbosWorkflowUUID" /getMediaDownloadKey: get: operationId: doKeyDownload @@ -380,6 +393,7 @@ paths: required: true schema: type: string + - $ref: "#/components/parameters/dbosWorkflowUUID" /deleteMedia: get: operationId: doMediaDelete @@ -405,6 +419,7 @@ paths: required: true schema: type: string + - $ref: "#/components/parameters/dbosWorkflowUUID" /startMediaUpload: get: operationId: doStartMediaUpload @@ -427,6 +442,8 @@ paths: file: type: string additionalProperties: false + parameters: + - $ref: "#/components/parameters/dbosWorkflowUUID" /finishMediaUpload: get: operationId: finishMediaUpload @@ -442,6 +459,7 @@ paths: required: true schema: type: string + - $ref: "#/components/parameters/dbosWorkflowUUID" /getProfilePhoto: get: operationId: getProfilePhoto @@ -474,7 +492,18 @@ paths: key: type: string additionalProperties: false + parameters: + - $ref: "#/components/parameters/dbosWorkflowUUID" components: + parameters: + dbosWorkflowUUID: + name: dbos-workflowuuid + in: header + required: false + description: Caller specified [workflow idempotency + key](https://docs.dbos.dev/tutorials/idempotency-tutorial#setting-idempotency-keys) + schema: + type: string schemas: RecvType: type: number @@ -570,3 +599,4 @@ components: additionalProperties: type: string additionalProperties: false + securitySchemes: {}