@@ -53,7 +53,7 @@ function getTypeProps({ data, key, isParentActivated, specVersion }) {
5353 readOnly : data . readOnly || undefined ,
5454 writeOnly : data . writeOnly || undefined ,
5555 example : parseExample ( data . sample ) || ( ! data . examples ? getArrayItemsExample ( getArrayItems ( { items, prefixItems, specVersion } ) ) : undefined ) ,
56- examples : data . examples ,
56+ ... ( isTargetVersionJSONSchemaCompatible ( specVersion ) && { examples : data . examples } ) ,
5757 xml : getXml ( data . xml )
5858 } ;
5959 const arrayChoices = getChoices ( data , key , specVersion ) ;
@@ -78,7 +78,7 @@ function getTypeProps({ data, key, isParentActivated, specVersion }) {
7878 readOnly : data . readOnly ,
7979 writeOnly : data . writeOnly || undefined ,
8080 example : parseExample ( data . sample ) ,
81- examples : data . examples ,
81+ ... ( isTargetVersionJSONSchemaCompatible ( specVersion ) && { examples : data . examples } ) ,
8282 xml : getXml ( data . xml )
8383 } ;
8484 const objectChoices = getChoices ( data , key , specVersion ) ;
@@ -193,7 +193,7 @@ function getPrimitiveTypeProps(data, specVersion) {
193193 readOnly : data . readOnly || undefined ,
194194 writeOnly : data . writeOnly || undefined ,
195195 example : parseExampleValueByDataType ( data . sample , data . type ) ,
196- examples : data . examples ,
196+ ... ( isTargetVersionJSONSchemaCompatible ( specVersion ) && { examples : data . examples } ) ,
197197 ...getExtensions ( data . scopesExtensions )
198198 } ;
199199
0 commit comments