Skip to content

Commit d29b5c0

Browse files
openapi3: fix validation of duplicated path templates (#1189)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent e56c2c7 commit d29b5c0

15 files changed

Lines changed: 15 additions & 1 deletion

openapi3/paths.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func (paths *Paths) Validate(ctx context.Context, opts ...ValidationOption) erro
7373
// identical findings without new information.
7474
continue
7575
}
76-
normalizedPaths[path] = path
76+
normalizedPaths[normalizedPath] = path
7777

7878
var commonParams []string
7979
for _, parameterRef := range pathItem.Parameters {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
invalid paths: conflicting paths "/restapis/{restapi_id}/resources/{resource_id}" and "/restapis/{restapi_id}/resources/{parent_id}"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
invalid paths: conflicting paths "/audit/report-jobs/{reportPlanName}" and "/audit/report-jobs/{reportJobId}"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
invalid paths: conflicting paths "/render/{templateId}" and "/render/{renderId}"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
invalid paths: conflicting paths "/spaces/{spaceId}/participant" and "/spaces/{id}/participant"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
invalid paths: conflicting paths "/es/{stateName}{mediaTypeExtension}" and "/es/{pageName}{mediaTypeExtension}"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
invalid paths: conflicting paths "/Items/{itemId}/RemoteSearch/Subtitles/{subtitleId}" and "/Items/{itemId}/RemoteSearch/Subtitles/{language}"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
invalid paths: conflicting paths "/V1/bundle-products/{sku}/links/{optionId}" and "/V1/bundle-products/{sku}/links/{id}"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
invalid paths: conflicting paths "/conversations/{id}/offer" and "/conversations/{conversation_id}/offer"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
invalid paths: conflicting paths "/teams/{teamId}/schedules/{scheduleId}" and "/teams/{teamId}/schedules/{dutyId}"

0 commit comments

Comments
 (0)