File tree 7 files changed +45
-7
lines changed
7 files changed +45
-7
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @autorest/core" ,
3
3
"entries" : [
4
+ {
5
+ "version" : " 3.10.4" ,
6
+ "tag" : " @autorest/core_v3.10.4" ,
7
+ "date" : " Fri, 14 Mar 2025 16:49:52 GMT" ,
8
+ "comments" : {
9
+ "patch" : [
10
+ {
11
+ "comment" : " [deduplication] Only treat \" $ref\" as reference if value is string"
12
+ }
13
+ ]
14
+ }
15
+ },
4
16
{
5
17
"version" : " 3.10.3" ,
6
18
"tag" : " @autorest/core_v3.10.3" ,
Original file line number Diff line number Diff line change 1
1
# Change Log - @autorest/core
2
2
3
- This log was last generated on Thu, 31 Oct 2024 00:11:17 GMT and should not be manually modified.
3
+ This log was last generated on Fri, 14 Mar 2025 16:49:52 GMT and should not be manually modified.
4
+
5
+ ## 3.10.4
6
+ Fri, 14 Mar 2025 16:49:52 GMT
7
+
8
+ ### Patches
9
+
10
+ - [ deduplication] Only treat "$ref" as reference if value is string
4
11
5
12
## 3.10.3
6
13
Thu, 31 Oct 2024 00:11:17 GMT
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @autorest/core" ,
3
- "version" : " 3.10.3 " ,
3
+ "version" : " 3.10.4 " ,
4
4
"description" : " AutoRest Core Module" ,
5
5
"engines" : {
6
6
"node" : " >=12.0.0"
49
49
"@azure-tools/async-io" : " ~3.0.0" ,
50
50
"@azure-tools/codegen" : " ~2.10.0" ,
51
51
"@azure-tools/datastore" : " ~4.8.0" ,
52
- "@azure-tools/deduplication" : " ~3.2.1 " ,
52
+ "@azure-tools/deduplication" : " ~3.2.2 " ,
53
53
"@azure-tools/extension" : " ~3.7.1" ,
54
54
"@azure-tools/json" : " ~1.3.0" ,
55
55
"@azure-tools/jsonschema" : " ~1.3.0" ,
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @azure-tools/deduplication" ,
3
3
"entries" : [
4
+ {
5
+ "version" : " 3.2.2" ,
6
+ "tag" : " @azure-tools/deduplication_v3.2.2" ,
7
+ "date" : " Fri, 14 Mar 2025 06:11:23 GMT" ,
8
+ "comments" : {
9
+ "patch" : [
10
+ {
11
+ "comment" : " Only treat \" $ref\" as reference if value is string"
12
+ }
13
+ ]
14
+ }
15
+ },
4
16
{
5
17
"version" : " 3.2.1" ,
6
18
"tag" : " @azure-tools/deduplication_v3.2.1" ,
Original file line number Diff line number Diff line change 1
1
# Change Log - @azure-tools/deduplication
2
2
3
- This log was last generated on Wed, 28 Feb 2024 18:02:21 GMT and should not be manually modified.
3
+ This log was last generated on Fri, 14 Mar 2025 06:11:23 GMT and should not be manually modified.
4
+
5
+ ## 3.2.2
6
+ Fri, 14 Mar 2025 06:11:23 GMT
7
+
8
+ ### Patches
9
+
10
+ - Only treat "$ref" as reference if value is string
4
11
5
12
## 3.2.1
6
13
Wed, 28 Feb 2024 18:02:21 GMT
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @azure-tools/deduplication" ,
3
- "version" : " 3.2.1 " ,
3
+ "version" : " 3.2.2 " ,
4
4
"description" : " Deduplication of elements in OpenAPI 3 documents" ,
5
5
"main" : " ./dist/main.js" ,
6
6
"typings" : " ./dist/main.d.ts" ,
Original file line number Diff line number Diff line change @@ -400,11 +400,11 @@ export class Deduplicator {
400
400
continue ;
401
401
}
402
402
403
- if ( key === "$ref" ) {
403
+ if ( key === "$ref" && typeof value === "string" ) {
404
404
const refParts = value . split ( "/" ) ;
405
405
const componentUid = refParts . pop ( ) ;
406
406
const type = refParts . pop ( ) ;
407
- await this . deduplicateComponent ( componentUid , type ) ;
407
+ await this . deduplicateComponent ( componentUid ! , type ! ) ;
408
408
} else if ( value && typeof value === "object" ) {
409
409
await this . crawlObject ( value ) ;
410
410
}
You can’t perform that action at this time.
0 commit comments