docs-util: fix incorrect workflow extracted in OAS (#11120)

This commit is contained in:
Shahed Nasser
2025-01-23 19:21:16 +02:00
committed by GitHub
parent 2fe98c9712
commit 97280cd928
4 changed files with 5 additions and 4 deletions

View File

@@ -27276,7 +27276,6 @@ paths:
$ref: '#/components/responses/invalid_request_error'
'500':
$ref: '#/components/responses/500_error'
x-workflow: importProductsWorkflowId
/admin/products/{id}:
get:
operationId: GetProductsId

View File

@@ -37,4 +37,3 @@ post:
$ref: ../components/responses/invalid_request_error.yaml
'500':
$ref: ../components/responses/500_error.yaml
x-workflow: importProductsWorkflowId

View File

@@ -36,7 +36,6 @@
* $ref: "#/components/responses/invalid_request_error"
* "500":
* $ref: "#/components/responses/500_error"
* x-workflow: importProductsWorkflowId
*
*/

View File

@@ -2398,7 +2398,11 @@ class OasKindGenerator extends FunctionKindGenerator {
const workflowName = childImport.name.getText()
if (fnText.includes(workflowName)) {
if (
fnText.includes(`${workflowName}(`) ||
fnText.includes(`${workflowName} (`) ||
fnText.includes(`${workflowName}.`)
) {
workflow = workflowName
}
})