@@ -53,6 +53,7 @@ export const generatePropertySignature = (
5353 return factory . PropertySignature . create ( {
5454 name : converterContext . escapePropertySignatureName ( localRef . name ) ,
5555 optional : false ,
56+ comment : localRef . description ,
5657 type : factory . TypeReferenceNode . create ( {
5758 name : context . resolveReferencePath ( currentPoint , reference . path ) . name ,
5859 } ) ,
@@ -62,6 +63,7 @@ export const generatePropertySignature = (
6263 return factory . PropertySignature . create ( {
6364 name : converterContext . escapePropertySignatureName ( reference . data . name ) ,
6465 optional : isPathProperty ? false : ! reference . data . required ,
66+ comment : reference . data . description ,
6567 type : ToTypeNode . convert (
6668 entryPoint ,
6769 reference . referencePoint ,
@@ -77,6 +79,7 @@ export const generatePropertySignature = (
7779 name : converterContext . escapePropertySignatureName ( parameter . name ) ,
7880 optional : isPathProperty ? false : ! parameter . required ,
7981 type : ToTypeNode . convert ( entryPoint , currentPoint , factory , parameter . schema || { type : "null" } , context , converterContext ) ,
82+ comment : parameter . description ,
8083 } ) ;
8184} ;
8285
@@ -107,7 +110,6 @@ export const generateInterface = (
107110 return factory . InterfaceDeclaration . create ( {
108111 export : true ,
109112 name,
110- comment : `@see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#headerObject` ,
111113 members : generatePropertySignatures ( entryPoint , currentPoint , store , factory , parameters , context , converterContext ) ,
112114 } ) ;
113115} ;
@@ -128,7 +130,6 @@ export const generateAliasInterface = (
128130 return factory . InterfaceDeclaration . create ( {
129131 export : true ,
130132 name : converterContext . escapeDeclarationText ( name ) ,
131- comment : `@see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#headerObject` ,
132133 members : generatePropertySignatures ( entryPoint , currentPoint , store , factory , parameters , context , converterContext ) ,
133134 } ) ;
134135} ;
0 commit comments