Skip to content

Commit 7e84bcc

Browse files
committed
Stop updating those descriptions from rest-api-spec
1 parent 4586bc1 commit 7e84bcc

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

compiler/src/steps/add-description.ts

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -32,28 +32,6 @@ export default async function addDescription (model: model.Model, jsonSpec: Map<
3232
const spec = jsonSpec.get(endpoint.name)
3333
assert(spec, `Can't find the json spec for ${endpoint.name}`)
3434

35-
for (const property of requestDefinition.path) {
36-
const definition = spec.url.paths.find(path => {
37-
if (path.parts == null) return false
38-
return path.parts[property.name] != null
39-
})
40-
if (definition?.parts != null) {
41-
const { description } = definition.parts[property.name]
42-
if (typeof description === 'string') {
43-
property.description = property.description ?? description
44-
}
45-
}
46-
}
47-
48-
if (spec.params != null) {
49-
for (const property of requestDefinition.query) {
50-
const param = spec.params[property.name]
51-
if (param != null && typeof param.description === 'string') {
52-
property.description = property.description ?? param.description
53-
}
54-
}
55-
}
56-
5735
if (spec.documentation.description != null) {
5836
requestDefinition.description = requestDefinition.description ?? spec.documentation.description
5937
}

0 commit comments

Comments
 (0)