diff --git a/.github/workflows/update-schema.yaml b/.github/workflows/update-schema.yaml index 38fe45532..84aed1003 100644 --- a/.github/workflows/update-schema.yaml +++ b/.github/workflows/update-schema.yaml @@ -92,14 +92,11 @@ jobs: // Update description to include sha of let schemaLines = schemaJson.split('\n'); for (let i = 0; i < 10; ++i) { - console.log('Original schemaLines:', schemaLines[i].trim()); let descStr = '"description": "This is the RESTful API for the MoH Service."'; - let textLink = ' Based on https://raw.githubusercontent.com/' + context.repo.owner + '/' + context.repo.repo + '/' + repoSha + '/' + repoPath + 'schema.json'; + let textLink = 'Based on https://raw.githubusercontent.com/' + context.repo.owner + '/' + context.repo.repo + '/' + repoSha + '/' + repoPath + 'schema.json'; if (descStr === schemaLines[i].trim()) { - - //schemaLines[i] += ' Based on https://raw.githubusercontent.com/' + context.repo.owner + '/' + context.repo.repo + '/' + repoSha + '/' + repoPath + 'schema.json'; - schemaLines[i] = schemaLines[i].replace(/("description": "This is the RESTful API for the MoH Service.")/, `$1 ${textLink}`); - console.log('REPLACE ME: ', schemaLines[i]); + schemaLines[i] = `"description": "This is the RESTful API for the MoH Service. ${textLink}"`; + } } schemaJson = schemaLines.join('\n');