Skip to content

Commit 0ea14a4

Browse files
Add 8.18 documentation URLs to schema
1 parent 02327c4 commit 0ea14a4

File tree

5 files changed

+1442
-924
lines changed

5 files changed

+1442
-924
lines changed

compiler/src/model/metamodel.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,9 +440,11 @@ export class Endpoint {
440440
name: string
441441
description: string
442442
docUrl: string
443+
legacyDocUrl?: string
443444
docId?: string
444445
extDocId?: string
445446
extDocUrl?: string
447+
legacyExtDocUrl?: string
446448
deprecation?: Deprecation
447449
availability: Availabilities
448450
docTag?: string

compiler/src/model/utils.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -694,12 +694,18 @@ export function hoistRequestAnnotations (
694694
const docUrl = docIds.find(entry => entry[0] === value.trim())
695695
assert(jsDocs, docUrl != null, `The @doc_id '${value.trim()}' is not present in _doc_ids/table.csv`)
696696
endpoint.docUrl = docUrl[1].replace(/\r/g, '')
697+
if (docUrl[2].replace(/\r/g, '')) {
698+
endpoint.legacyDocUrl = docUrl[2].replace(/\r/g, '')
699+
}
697700
} else if (tag === 'ext_doc_id') {
698701
assert(jsDocs, value.trim() !== '', `Request ${request.name.name}'s @ext_doc_id cannot be empty`)
699702
endpoint.extDocId = value.trim()
700703
const docUrl = docIds.find(entry => entry[0] === value.trim())
701704
assert(jsDocs, docUrl != null, `The @ext_doc_id '${value.trim()}' is not present in _doc_ids/table.csv`)
702705
endpoint.extDocUrl = docUrl[1].replace(/\r/g, '')
706+
if (docUrl[2].replace(/\r/g, '')) {
707+
endpoint.legacyExtDocUrl = docUrl[2].replace(/\r/g, '')
708+
}
703709
} else if (tag === 'availability') {
704710
// The @availability jsTag is different than most because it allows
705711
// multiple values within the same docstring, hence needing to parse

0 commit comments

Comments
 (0)