From 2f2eafe947d32195d3b9653132daf7547cf5c626 Mon Sep 17 00:00:00 2001 From: Diwank Singh Tomer Date: Sat, 12 Oct 2024 19:15:31 -0400 Subject: [PATCH] fix(typespec): Misc fixes in typespec definitions Signed-off-by: Diwank Singh Tomer --- typespec/common/interfaces.tsp | 41 +++--- typespec/common/types.tsp | 9 +- typespec/main.tsp | 3 + typespec/package-lock.json | 136 ++++++++++++------ typespec/package.json | 14 +- typespec/tasks/endpoints.tsp | 2 + typespec/tasks/steps.tsp | 1 - .../@typespec/openapi3/openapi-0.4.0.yaml | 34 +++-- .../@typespec/openapi3/openapi-1.0.0.yaml | 34 +++-- typespec/tspconfig.yaml | 2 +- 10 files changed, 171 insertions(+), 105 deletions(-) diff --git a/typespec/common/interfaces.tsp b/typespec/common/interfaces.tsp index d9e4a9e2e..7b719418c 100644 --- a/typespec/common/interfaces.tsp +++ b/typespec/common/interfaces.tsp @@ -1,9 +1,11 @@ import "@typespec/http"; +import "@typespec/sse"; import "./scalars.tsp"; import "./types.tsp"; using TypeSpec.Http; +using TypeSpec.SSE; namespace Common; @@ -140,28 +142,6 @@ interface ChildLimitOffsetPagination< }; } -interface ChildStreamEndpoint< - T, - DocString extends valueof string = "Stream events emitted by the parent" -> { - @get - @doc(DocString) - stream( - @path - @doc("ID of parent") - id: uuid, - - @query - @doc("Next page token") - next_token: string | null = null, - ): { - @header contentType: eventStream; - - @body - @doc("Stream of events emitted by the parent") - body: T; - }; -} interface ChildCreateEndpoint< CreateType, @@ -274,3 +254,20 @@ interface ChildPatchEndpoint< body: ResourceUpdatedResponse; }; } + +interface ChildStreamEndpoint< + T, + DocString extends valueof string = "Stream events emitted by the parent" +> { + @get + @doc(DocString) + stream( + @path + @doc("ID of parent") + id: uuid, + + @query + @doc("Next page token") + next_token: string | null = null, + ): SSEStream>; +} \ No newline at end of file diff --git a/typespec/common/types.tsp b/typespec/common/types.tsp index dd331e98c..0cb4cd50d 100644 --- a/typespec/common/types.tsp +++ b/typespec/common/types.tsp @@ -1,6 +1,8 @@ +import "@typespec/events"; import "@typespec/http"; import "@typespec/openapi"; +using TypeSpec.Events; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -51,4 +53,9 @@ model PaginationOptions { /** Object to filter results by metadata */ @query metadata_filter: MetadataFilter, -} \ No newline at end of file +} + +@events +union StreamEvent { + T; +} diff --git a/typespec/main.tsp b/typespec/main.tsp index b3bb1278c..aefb8adfc 100644 --- a/typespec/main.tsp +++ b/typespec/main.tsp @@ -95,6 +95,9 @@ namespace Api { @route("/docs") interface IndividualDocsRoute extends Docs.IndividualDocEndpoints {} + @route("/tasks") + interface TasksGetRoute extends Tasks.GetEndpoints {} + @route("/agents/{id}/tasks") interface TasksRoute extends Tasks.Endpoints {} diff --git a/typespec/package-lock.json b/typespec/package-lock.json index 0ddfdb155..80ad055ad 100644 --- a/typespec/package-lock.json +++ b/typespec/package-lock.json @@ -8,12 +8,14 @@ "name": "julep-typespec", "version": "0.4.0", "dependencies": { - "@typespec/compiler": "^0.60.1", - "@typespec/http": "^0.60.0", - "@typespec/openapi": "^0.60.0", - "@typespec/openapi3": "^0.60.0", - "@typespec/rest": "^0.60.0", - "@typespec/versioning": "^0.60.1" + "@typespec/compiler": "^0.61.2", + "@typespec/events": "^0.61.0", + "@typespec/http": "^0.61.0", + "@typespec/openapi": "^0.61.0", + "@typespec/openapi3": "^0.61.0", + "@typespec/rest": "^0.61.0", + "@typespec/sse": "^0.61.0", + "@typespec/versioning": "^0.61.0" } }, "node_modules/@apidevtools/swagger-methods": { @@ -274,9 +276,9 @@ "license": "MIT" }, "node_modules/@typespec/compiler": { - "version": "0.60.1", - "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-0.60.1.tgz", - "integrity": "sha512-I6Vcpvd7mBP7SI5vCBh9rZGXAtVy95BKhAd33Enw32psswiSzRpA7zdyZhOMekTOGVXNS/+E5l2PGGCzQddB4w==", + "version": "0.61.2", + "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-0.61.2.tgz", + "integrity": "sha512-6QxYJd09VWssd/BvY+8eBxTVv085s1UNK63FdPrgT2lgI+j8VMMcpNR9m5l1zWlgGDM7sniA/Or8VCdVA6jerg==", "license": "MIT", "dependencies": { "@babel/code-frame": "~7.24.7", @@ -284,14 +286,14 @@ "change-case": "~5.4.4", "globby": "~14.0.2", "mustache": "~4.2.0", - "picocolors": "~1.0.1", + "picocolors": "~1.1.0", "prettier": "~3.3.3", "prompts": "~2.4.2", "semver": "^7.6.3", "temporal-polyfill": "^0.2.5", "vscode-languageserver": "~9.0.1", - "vscode-languageserver-textdocument": "~1.0.11", - "yaml": "~2.4.5", + "vscode-languageserver-textdocument": "~1.0.12", + "yaml": "~2.5.1", "yargs": "~17.7.2" }, "bin": { @@ -302,39 +304,57 @@ "node": ">=18.0.0" } }, + "node_modules/@typespec/events": { + "version": "0.61.0", + "resolved": "https://registry.npmjs.org/@typespec/events/-/events-0.61.0.tgz", + "integrity": "sha512-XUXy36qGo7v1ZBEK5WTD3TGXc4xr9rbL5U5f7aCabad4YHTi6r/2GMOVjuRJOiCJoMvEVeL1pWkhDZkBPbdd3A==", + "license": "MIT", + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "@typespec/compiler": "~0.61.0" + } + }, "node_modules/@typespec/http": { - "version": "0.60.0", - "resolved": "https://registry.npmjs.org/@typespec/http/-/http-0.60.0.tgz", - "integrity": "sha512-ktfS9vpHfltyeAaQLNAZdqrn6Per3vmB/HDH/iyudYLA5wWblT1siKvpFCMWq53CJorRO7yeOKv+Q/M26zwEtg==", + "version": "0.61.0", + "resolved": "https://registry.npmjs.org/@typespec/http/-/http-0.61.0.tgz", + "integrity": "sha512-7+AYHkzkc+p652GY9BcEbXY4OZa1fTr03MVmZeafvmbQbXfyzUU9eJld13M3v6NaUWqXWZ7nBNMISyKiXp/kSw==", "license": "MIT", "engines": { "node": ">=18.0.0" }, "peerDependencies": { - "@typespec/compiler": "~0.60.0" + "@typespec/compiler": "~0.61.0", + "@typespec/streams": "~0.61.0" + }, + "peerDependenciesMeta": { + "@typespec/streams": { + "optional": true + } } }, "node_modules/@typespec/openapi": { - "version": "0.60.0", - "resolved": "https://registry.npmjs.org/@typespec/openapi/-/openapi-0.60.0.tgz", - "integrity": "sha512-YVwLppgHY8r/MudHNSLSUXzdw+CIpjmb31gI2a0KDGnI6sWDwY7LSWfjGU4TY/ubt0+X0Tjoy330mTvw71YBTg==", + "version": "0.61.0", + "resolved": "https://registry.npmjs.org/@typespec/openapi/-/openapi-0.61.0.tgz", + "integrity": "sha512-3AF319Ae4yGVOscsCLQeedXUJJcL/NdGOR2/e/nFiL/AOVdgLfIRnpR0Ad9Zj9XAESh1fq9XSu4Mi7N1k4V7rw==", "license": "MIT", "engines": { "node": ">=18.0.0" }, "peerDependencies": { - "@typespec/compiler": "~0.60.0", - "@typespec/http": "~0.60.0" + "@typespec/compiler": "~0.61.0", + "@typespec/http": "~0.61.0" } }, "node_modules/@typespec/openapi3": { - "version": "0.60.0", - "resolved": "https://registry.npmjs.org/@typespec/openapi3/-/openapi3-0.60.0.tgz", - "integrity": "sha512-gvrTHZACdeQtV7GfhVOHqkyTgMFyM2nKAIiz2P83LIncMCDUc00bGKGmaBk+xpuwKtCJyxBeVpCbID31YAq96g==", + "version": "0.61.0", + "resolved": "https://registry.npmjs.org/@typespec/openapi3/-/openapi3-0.61.0.tgz", + "integrity": "sha512-ALLsTkK1UiJBzvygV1Zk/yZaym+lOWroGeEUhQNXYShsq+/GLZkK0rl8sd76Gigq+TVXKMOEwUUvgfws/LMUJw==", "license": "MIT", "dependencies": { "@readme/openapi-parser": "~2.6.0", - "yaml": "~2.4.5" + "yaml": "~2.5.1" }, "bin": { "tsp-openapi3": "cmd/tsp-openapi3.js" @@ -343,35 +363,63 @@ "node": ">=18.0.0" }, "peerDependencies": { - "@typespec/compiler": "~0.60.0", - "@typespec/http": "~0.60.0", - "@typespec/openapi": "~0.60.0", - "@typespec/versioning": "~0.60.0" + "@typespec/compiler": "~0.61.0", + "@typespec/http": "~0.61.0", + "@typespec/openapi": "~0.61.0", + "@typespec/versioning": "~0.61.0" } }, "node_modules/@typespec/rest": { - "version": "0.60.0", - "resolved": "https://registry.npmjs.org/@typespec/rest/-/rest-0.60.0.tgz", - "integrity": "sha512-mHYubyuBvwdV2xkHrJfPwV7b/Ksyb9lA1Q/AQwpVFa7Qu1X075TBVALmH+hK3V0EdUG1CGJZ5Sw4BWgl8ZS0BA==", + "version": "0.61.0", + "resolved": "https://registry.npmjs.org/@typespec/rest/-/rest-0.61.0.tgz", + "integrity": "sha512-L9Oyor+l42p6S8GE+UvaZTi+dcu6WubGZKmaBRpX8mCZGsa69EgIK8DQoyxrfMcxAO4I5U0sfkzCKwCVFtRr9g==", + "license": "MIT", + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "@typespec/compiler": "~0.61.0", + "@typespec/http": "~0.61.0" + } + }, + "node_modules/@typespec/sse": { + "version": "0.61.0", + "resolved": "https://registry.npmjs.org/@typespec/sse/-/sse-0.61.0.tgz", + "integrity": "sha512-q9wqMTqRDQkgID51o9lXWkrF9Ndn67sZznzGvKpCS6pG7eDc0cigkTWFmV2Agag9HzoP2MdFMlvU/sJKECPtfg==", + "license": "MIT", + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "@typespec/compiler": "~0.61.0", + "@typespec/events": "~0.61.0", + "@typespec/http": "~0.61.0", + "@typespec/streams": "~0.61.0" + } + }, + "node_modules/@typespec/streams": { + "version": "0.61.0", + "resolved": "https://registry.npmjs.org/@typespec/streams/-/streams-0.61.0.tgz", + "integrity": "sha512-MEFwYmYVibuTwVwJ6UKa9kgM3AP5bn/MWIhB/dTgYicXEgbUk+o9RHqg7JsySFyL0PO9XoqQBFiJhWM758f+pQ==", "license": "MIT", + "peer": true, "engines": { "node": ">=18.0.0" }, "peerDependencies": { - "@typespec/compiler": "~0.60.0", - "@typespec/http": "~0.60.0" + "@typespec/compiler": "~0.61.0" } }, "node_modules/@typespec/versioning": { - "version": "0.60.1", - "resolved": "https://registry.npmjs.org/@typespec/versioning/-/versioning-0.60.1.tgz", - "integrity": "sha512-HogYL7P9uOPoSvkLLDjF22S6E9td6EY3c6TcIHhCzDTAQoi54csikD0gNrtcCkFG0UeQk29HgQymV397j+vp4g==", + "version": "0.61.0", + "resolved": "https://registry.npmjs.org/@typespec/versioning/-/versioning-0.61.0.tgz", + "integrity": "sha512-PIIug6eg3zc7E+BBHyNHHQD+OBq3FU465nhKrLEp35iVji/sYFuPc1ywnELDuwJVRWm6nvqNL1vtnc+4lEk+oA==", "license": "MIT", "engines": { "node": ">=18.0.0" }, "peerDependencies": { - "@typespec/compiler": "~0.60.0" + "@typespec/compiler": "~0.61.0" } }, "node_modules/ajv": { @@ -799,9 +847,9 @@ } }, "node_modules/picocolors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", - "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", + "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==", "license": "ISC" }, "node_modules/picomatch": { @@ -1131,9 +1179,9 @@ } }, "node_modules/yaml": { - "version": "2.4.5", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.5.tgz", - "integrity": "sha512-aBx2bnqDzVOyNKfsysjA2ms5ZlnjSAW2eG3/L5G/CSujfjLJTJsEw1bGw8kCf04KodQWk1pxlGnZ56CRxiawmg==", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.5.1.tgz", + "integrity": "sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q==", "license": "ISC", "bin": { "yaml": "bin.mjs" diff --git a/typespec/package.json b/typespec/package.json index d424d67dc..6d435a832 100644 --- a/typespec/package.json +++ b/typespec/package.json @@ -3,12 +3,14 @@ "version": "0.4.0", "type": "module", "dependencies": { - "@typespec/compiler": "^0.60.1", - "@typespec/http": "^0.60.0", - "@typespec/openapi": "^0.60.0", - "@typespec/openapi3": "^0.60.0", - "@typespec/rest": "^0.60.0", - "@typespec/versioning": "^0.60.1" + "@typespec/compiler": "^0.61.2", + "@typespec/events": "^0.61.0", + "@typespec/http": "^0.61.0", + "@typespec/openapi": "^0.61.0", + "@typespec/openapi3": "^0.61.0", + "@typespec/rest": "^0.61.0", + "@typespec/sse": "^0.61.0", + "@typespec/versioning": "^0.61.0" }, "private": true } diff --git a/typespec/tasks/endpoints.tsp b/typespec/tasks/endpoints.tsp index 2d9ec422b..850eacdf3 100644 --- a/typespec/tasks/endpoints.tsp +++ b/typespec/tasks/endpoints.tsp @@ -15,6 +15,8 @@ namespace Tasks; // TASK ENDPOINTS // +interface GetEndpoints extends GetEndpoint {} + interface CreateOrUpdateEndpoints { @post @doc("Create or update a task") diff --git a/typespec/tasks/steps.tsp b/typespec/tasks/steps.tsp index 4b14ef6ae..ea4d84d79 100644 --- a/typespec/tasks/steps.tsp +++ b/typespec/tasks/steps.tsp @@ -59,7 +59,6 @@ alias NonConditionalWorkflowStep = | ReturnStep | SleepStep | ErrorWorkflowStep - | YieldStep | WaitForInputStep; alias ConditionalStep = IfElseWorkflowStep | SwitchStep; diff --git a/typespec/tsp-output/@typespec/openapi3/openapi-0.4.0.yaml b/typespec/tsp-output/@typespec/openapi3/openapi-0.4.0.yaml index 61d89edaa..cebe19ffc 100644 --- a/typespec/tsp-output/@typespec/openapi3/openapi-0.4.0.yaml +++ b/typespec/tsp-output/@typespec/openapi3/openapi-0.4.0.yaml @@ -752,7 +752,7 @@ paths: content: text/event-stream: schema: - $ref: '#/components/schemas/Executions.TransitionEvent' + type: string /jobs/{id}: get: operationId: JobRoute_get @@ -979,6 +979,24 @@ paths: application/json: schema: $ref: '#/components/schemas/Entries.History' + /tasks/{id}: + get: + operationId: TasksGetRoute_get + description: Get a task by id + parameters: + - name: id + in: path + required: true + description: ID of the resource + schema: + $ref: '#/components/schemas/Common.uuid' + responses: + '200': + description: The request has succeeded. + content: + application/json: + schema: + $ref: '#/components/schemas/Tasks.Task' /tasks/{id}/executions: post: operationId: TaskExecutionsRoute_create @@ -3875,7 +3893,6 @@ components: - $ref: '#/components/schemas/Tasks.ReturnStep' - $ref: '#/components/schemas/Tasks.SleepStep' - $ref: '#/components/schemas/Tasks.ErrorWorkflowStep' - - $ref: '#/components/schemas/Tasks.YieldStep' - $ref: '#/components/schemas/Tasks.WaitForInputStep' description: The steps to run if the condition is true Tasks.CaseThenUpdateItem: @@ -3903,7 +3920,6 @@ components: - $ref: '#/components/schemas/Tasks.ReturnStep' - $ref: '#/components/schemas/Tasks.SleepStep' - $ref: '#/components/schemas/Tasks.ErrorWorkflowStep' - - $ref: '#/components/schemas/Tasks.YieldStep' - $ref: '#/components/schemas/Tasks.WaitForInputStep' description: The steps to run if the condition is true Tasks.CreateTaskRequest: @@ -3935,7 +3951,6 @@ components: - $ref: '#/components/schemas/Tasks.ReturnStep' - $ref: '#/components/schemas/Tasks.SleepStep' - $ref: '#/components/schemas/Tasks.ErrorWorkflowStep' - - $ref: '#/components/schemas/Tasks.YieldStep' - $ref: '#/components/schemas/Tasks.WaitForInputStep' - $ref: '#/components/schemas/Tasks.IfElseWorkflowStep' - $ref: '#/components/schemas/Tasks.SwitchStep' @@ -4031,7 +4046,6 @@ components: - $ref: '#/components/schemas/Tasks.ReturnStep' - $ref: '#/components/schemas/Tasks.SleepStep' - $ref: '#/components/schemas/Tasks.ErrorWorkflowStep' - - $ref: '#/components/schemas/Tasks.YieldStep' - $ref: '#/components/schemas/Tasks.WaitForInputStep' - $ref: '#/components/schemas/Tasks.IfElseWorkflowStep' - $ref: '#/components/schemas/Tasks.SwitchStep' @@ -4306,7 +4320,6 @@ components: - $ref: '#/components/schemas/Tasks.ReturnStep' - $ref: '#/components/schemas/Tasks.SleepStep' - $ref: '#/components/schemas/Tasks.ErrorWorkflowStep' - - $ref: '#/components/schemas/Tasks.YieldStep' - $ref: '#/components/schemas/Tasks.WaitForInputStep' description: The steps to run if the condition is true else: @@ -4321,7 +4334,6 @@ components: - $ref: '#/components/schemas/Tasks.ReturnStep' - $ref: '#/components/schemas/Tasks.SleepStep' - $ref: '#/components/schemas/Tasks.ErrorWorkflowStep' - - $ref: '#/components/schemas/Tasks.YieldStep' - $ref: '#/components/schemas/Tasks.WaitForInputStep' nullable: true description: The steps to run if the condition is false @@ -4363,7 +4375,6 @@ components: - $ref: '#/components/schemas/Tasks.ReturnStep' - $ref: '#/components/schemas/Tasks.SleepStep' - $ref: '#/components/schemas/Tasks.ErrorWorkflowStep' - - $ref: '#/components/schemas/Tasks.YieldStep' - $ref: '#/components/schemas/Tasks.WaitForInputStep' description: The steps to run if the condition is true else: @@ -4378,7 +4389,6 @@ components: - $ref: '#/components/schemas/Tasks.ReturnStep' - $ref: '#/components/schemas/Tasks.SleepStep' - $ref: '#/components/schemas/Tasks.ErrorWorkflowStep' - - $ref: '#/components/schemas/Tasks.YieldStep' - $ref: '#/components/schemas/Tasks.WaitForInputStep' nullable: true description: The steps to run if the condition is false @@ -4508,7 +4518,6 @@ components: - $ref: '#/components/schemas/Tasks.ReturnStep' - $ref: '#/components/schemas/Tasks.SleepStep' - $ref: '#/components/schemas/Tasks.ErrorWorkflowStep' - - $ref: '#/components/schemas/Tasks.YieldStep' - $ref: '#/components/schemas/Tasks.WaitForInputStep' - $ref: '#/components/schemas/Tasks.IfElseWorkflowStepUpdateItem' - $ref: '#/components/schemas/Tasks.SwitchStepUpdateItem' @@ -4592,7 +4601,6 @@ components: - $ref: '#/components/schemas/Tasks.ReturnStep' - $ref: '#/components/schemas/Tasks.SleepStep' - $ref: '#/components/schemas/Tasks.ErrorWorkflowStep' - - $ref: '#/components/schemas/Tasks.YieldStep' - $ref: '#/components/schemas/Tasks.WaitForInputStep' - $ref: '#/components/schemas/Tasks.IfElseWorkflowStepUpdateItem' - $ref: '#/components/schemas/Tasks.SwitchStepUpdateItem' @@ -5118,7 +5126,6 @@ components: - $ref: '#/components/schemas/Tasks.ReturnStep' - $ref: '#/components/schemas/Tasks.SleepStep' - $ref: '#/components/schemas/Tasks.ErrorWorkflowStep' - - $ref: '#/components/schemas/Tasks.YieldStep' - $ref: '#/components/schemas/Tasks.WaitForInputStep' - $ref: '#/components/schemas/Tasks.IfElseWorkflowStep' - $ref: '#/components/schemas/Tasks.SwitchStep' @@ -5228,7 +5235,6 @@ components: - $ref: '#/components/schemas/Tasks.ReturnStep' - $ref: '#/components/schemas/Tasks.SleepStep' - $ref: '#/components/schemas/Tasks.ErrorWorkflowStep' - - $ref: '#/components/schemas/Tasks.YieldStep' - $ref: '#/components/schemas/Tasks.WaitForInputStep' - $ref: '#/components/schemas/Tasks.IfElseWorkflowStep' - $ref: '#/components/schemas/Tasks.SwitchStep' @@ -5396,7 +5402,6 @@ components: - $ref: '#/components/schemas/Tasks.ReturnStep' - $ref: '#/components/schemas/Tasks.SleepStep' - $ref: '#/components/schemas/Tasks.ErrorWorkflowStep' - - $ref: '#/components/schemas/Tasks.YieldStep' - $ref: '#/components/schemas/Tasks.WaitForInputStep' - $ref: '#/components/schemas/Tasks.IfElseWorkflowStep' - $ref: '#/components/schemas/Tasks.SwitchStep' @@ -5492,7 +5497,6 @@ components: - $ref: '#/components/schemas/Tasks.ReturnStep' - $ref: '#/components/schemas/Tasks.SleepStep' - $ref: '#/components/schemas/Tasks.ErrorWorkflowStep' - - $ref: '#/components/schemas/Tasks.YieldStep' - $ref: '#/components/schemas/Tasks.WaitForInputStep' - $ref: '#/components/schemas/Tasks.IfElseWorkflowStep' - $ref: '#/components/schemas/Tasks.SwitchStep' diff --git a/typespec/tsp-output/@typespec/openapi3/openapi-1.0.0.yaml b/typespec/tsp-output/@typespec/openapi3/openapi-1.0.0.yaml index 36fbc0147..95d50b77a 100644 --- a/typespec/tsp-output/@typespec/openapi3/openapi-1.0.0.yaml +++ b/typespec/tsp-output/@typespec/openapi3/openapi-1.0.0.yaml @@ -752,7 +752,7 @@ paths: content: text/event-stream: schema: - $ref: '#/components/schemas/Executions.TransitionEvent' + type: string /jobs/{id}: get: operationId: JobRoute_get @@ -979,6 +979,24 @@ paths: application/json: schema: $ref: '#/components/schemas/Entries.History' + /tasks/{id}: + get: + operationId: TasksGetRoute_get + description: Get a task by id + parameters: + - name: id + in: path + required: true + description: ID of the resource + schema: + $ref: '#/components/schemas/Common.uuid' + responses: + '200': + description: The request has succeeded. + content: + application/json: + schema: + $ref: '#/components/schemas/Tasks.Task' /tasks/{id}/executions: post: operationId: TaskExecutionsRoute_create @@ -3875,7 +3893,6 @@ components: - $ref: '#/components/schemas/Tasks.ReturnStep' - $ref: '#/components/schemas/Tasks.SleepStep' - $ref: '#/components/schemas/Tasks.ErrorWorkflowStep' - - $ref: '#/components/schemas/Tasks.YieldStep' - $ref: '#/components/schemas/Tasks.WaitForInputStep' description: The steps to run if the condition is true Tasks.CaseThenUpdateItem: @@ -3903,7 +3920,6 @@ components: - $ref: '#/components/schemas/Tasks.ReturnStep' - $ref: '#/components/schemas/Tasks.SleepStep' - $ref: '#/components/schemas/Tasks.ErrorWorkflowStep' - - $ref: '#/components/schemas/Tasks.YieldStep' - $ref: '#/components/schemas/Tasks.WaitForInputStep' description: The steps to run if the condition is true Tasks.CreateTaskRequest: @@ -3935,7 +3951,6 @@ components: - $ref: '#/components/schemas/Tasks.ReturnStep' - $ref: '#/components/schemas/Tasks.SleepStep' - $ref: '#/components/schemas/Tasks.ErrorWorkflowStep' - - $ref: '#/components/schemas/Tasks.YieldStep' - $ref: '#/components/schemas/Tasks.WaitForInputStep' - $ref: '#/components/schemas/Tasks.IfElseWorkflowStep' - $ref: '#/components/schemas/Tasks.SwitchStep' @@ -4031,7 +4046,6 @@ components: - $ref: '#/components/schemas/Tasks.ReturnStep' - $ref: '#/components/schemas/Tasks.SleepStep' - $ref: '#/components/schemas/Tasks.ErrorWorkflowStep' - - $ref: '#/components/schemas/Tasks.YieldStep' - $ref: '#/components/schemas/Tasks.WaitForInputStep' - $ref: '#/components/schemas/Tasks.IfElseWorkflowStep' - $ref: '#/components/schemas/Tasks.SwitchStep' @@ -4306,7 +4320,6 @@ components: - $ref: '#/components/schemas/Tasks.ReturnStep' - $ref: '#/components/schemas/Tasks.SleepStep' - $ref: '#/components/schemas/Tasks.ErrorWorkflowStep' - - $ref: '#/components/schemas/Tasks.YieldStep' - $ref: '#/components/schemas/Tasks.WaitForInputStep' description: The steps to run if the condition is true else: @@ -4321,7 +4334,6 @@ components: - $ref: '#/components/schemas/Tasks.ReturnStep' - $ref: '#/components/schemas/Tasks.SleepStep' - $ref: '#/components/schemas/Tasks.ErrorWorkflowStep' - - $ref: '#/components/schemas/Tasks.YieldStep' - $ref: '#/components/schemas/Tasks.WaitForInputStep' nullable: true description: The steps to run if the condition is false @@ -4363,7 +4375,6 @@ components: - $ref: '#/components/schemas/Tasks.ReturnStep' - $ref: '#/components/schemas/Tasks.SleepStep' - $ref: '#/components/schemas/Tasks.ErrorWorkflowStep' - - $ref: '#/components/schemas/Tasks.YieldStep' - $ref: '#/components/schemas/Tasks.WaitForInputStep' description: The steps to run if the condition is true else: @@ -4378,7 +4389,6 @@ components: - $ref: '#/components/schemas/Tasks.ReturnStep' - $ref: '#/components/schemas/Tasks.SleepStep' - $ref: '#/components/schemas/Tasks.ErrorWorkflowStep' - - $ref: '#/components/schemas/Tasks.YieldStep' - $ref: '#/components/schemas/Tasks.WaitForInputStep' nullable: true description: The steps to run if the condition is false @@ -4508,7 +4518,6 @@ components: - $ref: '#/components/schemas/Tasks.ReturnStep' - $ref: '#/components/schemas/Tasks.SleepStep' - $ref: '#/components/schemas/Tasks.ErrorWorkflowStep' - - $ref: '#/components/schemas/Tasks.YieldStep' - $ref: '#/components/schemas/Tasks.WaitForInputStep' - $ref: '#/components/schemas/Tasks.IfElseWorkflowStepUpdateItem' - $ref: '#/components/schemas/Tasks.SwitchStepUpdateItem' @@ -4592,7 +4601,6 @@ components: - $ref: '#/components/schemas/Tasks.ReturnStep' - $ref: '#/components/schemas/Tasks.SleepStep' - $ref: '#/components/schemas/Tasks.ErrorWorkflowStep' - - $ref: '#/components/schemas/Tasks.YieldStep' - $ref: '#/components/schemas/Tasks.WaitForInputStep' - $ref: '#/components/schemas/Tasks.IfElseWorkflowStepUpdateItem' - $ref: '#/components/schemas/Tasks.SwitchStepUpdateItem' @@ -5118,7 +5126,6 @@ components: - $ref: '#/components/schemas/Tasks.ReturnStep' - $ref: '#/components/schemas/Tasks.SleepStep' - $ref: '#/components/schemas/Tasks.ErrorWorkflowStep' - - $ref: '#/components/schemas/Tasks.YieldStep' - $ref: '#/components/schemas/Tasks.WaitForInputStep' - $ref: '#/components/schemas/Tasks.IfElseWorkflowStep' - $ref: '#/components/schemas/Tasks.SwitchStep' @@ -5228,7 +5235,6 @@ components: - $ref: '#/components/schemas/Tasks.ReturnStep' - $ref: '#/components/schemas/Tasks.SleepStep' - $ref: '#/components/schemas/Tasks.ErrorWorkflowStep' - - $ref: '#/components/schemas/Tasks.YieldStep' - $ref: '#/components/schemas/Tasks.WaitForInputStep' - $ref: '#/components/schemas/Tasks.IfElseWorkflowStep' - $ref: '#/components/schemas/Tasks.SwitchStep' @@ -5396,7 +5402,6 @@ components: - $ref: '#/components/schemas/Tasks.ReturnStep' - $ref: '#/components/schemas/Tasks.SleepStep' - $ref: '#/components/schemas/Tasks.ErrorWorkflowStep' - - $ref: '#/components/schemas/Tasks.YieldStep' - $ref: '#/components/schemas/Tasks.WaitForInputStep' - $ref: '#/components/schemas/Tasks.IfElseWorkflowStep' - $ref: '#/components/schemas/Tasks.SwitchStep' @@ -5492,7 +5497,6 @@ components: - $ref: '#/components/schemas/Tasks.ReturnStep' - $ref: '#/components/schemas/Tasks.SleepStep' - $ref: '#/components/schemas/Tasks.ErrorWorkflowStep' - - $ref: '#/components/schemas/Tasks.YieldStep' - $ref: '#/components/schemas/Tasks.WaitForInputStep' - $ref: '#/components/schemas/Tasks.IfElseWorkflowStep' - $ref: '#/components/schemas/Tasks.SwitchStep' diff --git a/typespec/tspconfig.yaml b/typespec/tspconfig.yaml index c5b3491f6..7bd4e8d1e 100644 --- a/typespec/tspconfig.yaml +++ b/typespec/tspconfig.yaml @@ -6,4 +6,4 @@ options: file-type: yaml output-file: "openapi-{version}.yaml" new-line: lf - # omit-unreachable-types: true + omit-unreachable-types: true