Skip to content

Commit

Permalink
fix: restore prev Old/NewJsonRef, add Old/NewJsonPath
Browse files Browse the repository at this point in the history
  • Loading branch information
NextFire committed Jul 12, 2024
1 parent 86271a2 commit f25a782
Show file tree
Hide file tree
Showing 71 changed files with 549 additions and 166 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ private static bool Comparer(ComparisonMessage message, ComparisonMessageModel m
&& message.Message == model.Message
&& message.OldJsonRef == model.OldJsonRef
&& message.NewJsonRef == model.NewJsonRef
&& message.OldJsonPath == model.OldJsonPath
&& message.NewJsonPath == model.NewJsonPath
&& message.Id == model.Id
&& message.Code == model.Code
&& message.Mode == model.Mode;
Expand All @@ -87,6 +89,8 @@ internal class ComparisonMessageModel
public string Message { get; set; }
public string OldJsonRef { get; set; }
public string NewJsonRef { get; set; }
public string OldJsonPath { get; set; }
public string NewJsonPath { get; set; }
public int Id { get; set; }
public string Code { get; set; }
public MessageType Mode { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
{
"Severity": "Warning",
"Message": "The new version adds an \u0027additionalProperties\u0027 element.",
"OldJsonRef": "#/components/schemas/Pet/additionalProperties",
"NewJsonRef": "#/components/schemas/Pet/additionalProperties",
"OldJsonRef": "#/paths/~1api~1Parameters/get/responses/200/content/application~1json/schema/additionalProperties",
"NewJsonRef": "#/paths/~1api~1Parameters/get/responses/200/content/application~1json/schema/additionalProperties",
"OldJsonPath": "#/components/schemas/Pet/additionalProperties",
"NewJsonPath": "#/components/schemas/Pet/additionalProperties",
"Id": 1021,
"Code": "AddedAdditionalProperties",
"Mode": "Addition"
Expand All @@ -13,6 +15,8 @@
"Message": "The new version adds an \u0027additionalProperties\u0027 element.",
"OldJsonRef": "#/components/schemas/Pet/additionalProperties",
"NewJsonRef": "#/components/schemas/Pet/additionalProperties",
"OldJsonPath": "#/components/schemas/Pet/additionalProperties",
"NewJsonPath": "#/components/schemas/Pet/additionalProperties",
"Id": 1021,
"Code": "AddedAdditionalProperties",
"Mode": "Addition"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,32 @@
{
"Severity": "Warning",
"Message": "The new version is adding enum value(s) \u0027Microsoft.OpenApi.Any.OpenApiString\u0027 from the old version.",
"OldJsonRef": "#/components/schemas/Pet/properties/petType/enum",
"NewJsonRef": "#/components/schemas/Pet/properties/petType/enum",
"OldJsonRef": "#/paths/~1api~1Parameters/put/responses/200/content/application~1json/schema/properties/petType/enum",
"NewJsonRef": "#/paths/~1api~1Parameters/put/responses/200/content/application~1json/schema/properties/petType/enum",
"OldJsonPath": "#/components/schemas/Pet/properties/petType/enum",
"NewJsonPath": "#/components/schemas/Pet/properties/petType/enum",
"Id": 1020,
"Code": "AddedEnumValue",
"Mode": "Addition"
},
{
"Severity": "Info",
"Message": "The new version has a less constraining \u0027enum\u0027 value than the previous one.",
"OldJsonRef": "#/components/schemas/Pet/properties/petType/enum",
"NewJsonRef": "#/components/schemas/Pet/properties/petType/enum",
"OldJsonRef": "#/paths/~1api~1Parameters/put/responses/200/content/application~1json/schema/properties/petType/enum",
"NewJsonRef": "#/paths/~1api~1Parameters/put/responses/200/content/application~1json/schema/properties/petType/enum",
"OldJsonPath": "#/components/schemas/Pet/properties/petType/enum",
"NewJsonPath": "#/components/schemas/Pet/properties/petType/enum",
"Id": 1037,
"Code": "ConstraintIsWeaker",
"Mode": "Update"
},
{
"Severity": "Info",
"Message": "The new version has a less constraining \u0027enum\u0027 value than the previous one.",
"OldJsonRef": "#/components/schemas/Pet/properties/accountType/enum",
"NewJsonRef": "#/components/schemas/Pet/properties/accountType/enum",
"OldJsonRef": "#/paths/~1api~1Parameters/put/responses/200/content/application~1json/schema/properties/accountType/enum",
"NewJsonRef": "#/paths/~1api~1Parameters/put/responses/200/content/application~1json/schema/properties/accountType/enum",
"OldJsonPath": "#/components/schemas/Pet/properties/accountType/enum",
"NewJsonPath": "#/components/schemas/Pet/properties/accountType/enum",
"Id": 1037,
"Code": "ConstraintIsWeaker",
"Mode": "Update"
Expand All @@ -31,6 +37,8 @@
"Message": "The new version is adding enum value(s) \u0027Microsoft.OpenApi.Any.OpenApiString\u0027 from the old version.",
"OldJsonRef": "#/components/schemas/Pet/properties/petType/enum",
"NewJsonRef": "#/components/schemas/Pet/properties/petType/enum",
"OldJsonPath": "#/components/schemas/Pet/properties/petType/enum",
"NewJsonPath": "#/components/schemas/Pet/properties/petType/enum",
"Id": 1020,
"Code": "AddedEnumValue",
"Mode": "Addition"
Expand All @@ -40,6 +48,8 @@
"Message": "The new version has a less constraining \u0027enum\u0027 value than the previous one.",
"OldJsonRef": "#/components/schemas/Pet/properties/petType/enum",
"NewJsonRef": "#/components/schemas/Pet/properties/petType/enum",
"OldJsonPath": "#/components/schemas/Pet/properties/petType/enum",
"NewJsonPath": "#/components/schemas/Pet/properties/petType/enum",
"Id": 1037,
"Code": "ConstraintIsWeaker",
"Mode": "Update"
Expand All @@ -49,6 +59,8 @@
"Message": "The new version has a less constraining \u0027enum\u0027 value than the previous one.",
"OldJsonRef": "#/components/schemas/Pet/properties/accountType/enum",
"NewJsonRef": "#/components/schemas/Pet/properties/accountType/enum",
"OldJsonPath": "#/components/schemas/Pet/properties/accountType/enum",
"NewJsonPath": "#/components/schemas/Pet/properties/accountType/enum",
"Id": 1037,
"Code": "ConstraintIsWeaker",
"Mode": "Update"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"Message": "The new version adds a required header \u0027x-d\u0027.",
"OldJsonRef": "#/paths/~1api~1Parameters/get/responses/200/headers/x-d",
"NewJsonRef": "#/paths/~1api~1Parameters/get/responses/200/headers/x-d",
"OldJsonPath": "#/paths/~1api~1Parameters/get/responses/200/headers/x-d",
"NewJsonPath": "#/paths/~1api~1Parameters/get/responses/200/headers/x-d",
"Id": 1013,
"Code": "AddingHeader",
"Mode": "Addition"
Expand All @@ -13,6 +15,8 @@
"Message": "The new version adds a required header \u0027x-c\u0027.",
"OldJsonRef": "#/paths/~1api~1Responses/get/responses/200/headers/x-c",
"NewJsonRef": "#/paths/~1api~1Responses/get/responses/200/headers/x-c",
"OldJsonPath": "#/paths/~1api~1Responses/get/responses/200/headers/x-c",
"NewJsonPath": "#/paths/~1api~1Responses/get/responses/200/headers/x-c",
"Id": 1013,
"Code": "AddingHeader",
"Mode": "Addition"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"Message": "The new version is adding an operation that was not found in the old version.",
"OldJsonRef": "#/paths/~1api~1Paths/post",
"NewJsonRef": "#/paths/~1api~1Paths/post",
"OldJsonPath": "#/paths/~1api~1Paths/post",
"NewJsonPath": "#/paths/~1api~1Paths/post",
"Id": 1039,
"Code": "AddedOperation",
"Mode": "Addition"
Expand All @@ -13,6 +15,8 @@
"Message": "The new version is adding an operation that was not found in the old version.",
"OldJsonRef": "#/paths/~1api~1Operations/head",
"NewJsonRef": "#/paths/~1api~1Operations/head",
"OldJsonPath": "#/paths/~1api~1Operations/head",
"NewJsonPath": "#/paths/~1api~1Operations/head",
"Id": 1039,
"Code": "AddedOperation",
"Mode": "Addition"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"Message": "The optional parameter \u0027limitParam\u0027 was added in the new version.",
"OldJsonRef": null,
"NewJsonRef": "#/paths/~1api~1Parameters/put/parameters/1",
"OldJsonPath": null,
"NewJsonPath": "#/paths/~1api~1Parameters/put/parameters/1",
"Id": 1043,
"Code": "AddingOptionalParameter",
"Mode": "Addition"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,21 @@
{
"Severity": "Warning",
"Message": "The new version has a new optional property \u0027message\u0027 that was not found in the old version.",
"OldJsonRef": "#/components/parameters/skipParam/schema/properties/message",
"NewJsonRef": "#/components/parameters/skipParam/schema/properties/message",
"OldJsonRef": "#/paths/~1api~1Parameters/put/parameters/0/schema/properties/message",
"NewJsonRef": "#/paths/~1api~1Parameters/put/parameters/0/schema/properties/message",
"OldJsonPath": "#/components/parameters/skipParam/schema/properties/message",
"NewJsonPath": "#/components/parameters/skipParam/schema/properties/message",
"Id": 1045,
"Code": "AddedOptionalProperty",
"Mode": "Addition"
},
{
"Severity": "Warning",
"Message": "The new version has a new optional property \u0027end\u0027 that was not found in the old version.",
"OldJsonRef": "#/components/parameters/limitParam/schema/properties/end",
"NewJsonRef": "#/components/parameters/limitParam/schema/properties/end",
"OldJsonRef": "#/paths/~1api~1Parameters/put/parameters/1/schema/properties/end",
"NewJsonRef": "#/paths/~1api~1Parameters/put/parameters/1/schema/properties/end",
"OldJsonPath": "#/components/parameters/limitParam/schema/properties/end",
"NewJsonPath": "#/components/parameters/limitParam/schema/properties/end",
"Id": 1045,
"Code": "AddedOptionalProperty",
"Mode": "Addition"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"Message": "The new version is adding a path that was not found in the old version.",
"OldJsonRef": null,
"NewJsonRef": "#/paths/~1api~1Paths",
"OldJsonPath": null,
"NewJsonPath": "#/paths/~1api~1Paths",
"Id": 1038,
"Code": "AddedPath",
"Mode": "Addition"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,21 @@
{
"Severity": "Warning",
"Message": "The new version has a new property \u0027petType\u0027 in response that was not found in the old version.",
"OldJsonRef": "#/components/schemas/Pet/properties/petType",
"NewJsonRef": "#/components/schemas/Pet/properties/petType",
"OldJsonRef": "#/paths/~1pets/get/responses/200/content/application~1json/schema/items/properties/petType",
"NewJsonRef": "#/paths/~1pets/get/responses/200/content/application~1json/schema/items/properties/petType",
"OldJsonPath": "#/components/schemas/Pet/properties/petType",
"NewJsonPath": "#/components/schemas/Pet/properties/petType",
"Id": 1041,
"Code": "AddedPropertyInResponse",
"Mode": "Addition"
},
{
"Severity": "Warning",
"Message": "The new version has a new property \u0027petAge\u0027 in response that was not found in the old version.",
"OldJsonRef": "#/components/schemas/Pet/properties/petAge",
"NewJsonRef": "#/components/schemas/Pet/properties/petAge",
"OldJsonRef": "#/paths/~1pets/get/responses/200/content/application~1json/schema/items/properties/petAge",
"NewJsonRef": "#/paths/~1pets/get/responses/200/content/application~1json/schema/items/properties/petAge",
"OldJsonPath": "#/components/schemas/Pet/properties/petAge",
"NewJsonPath": "#/components/schemas/Pet/properties/petAge",
"Id": 1041,
"Code": "AddedPropertyInResponse",
"Mode": "Addition"
Expand All @@ -22,15 +26,19 @@
"Message": "The new version has a new property \u0027message\u0027 in response that was not found in the old version.",
"OldJsonRef": "#/paths/~1pets/get/responses/404/content/application~1json/schema/properties/message",
"NewJsonRef": "#/paths/~1pets/get/responses/404/content/application~1json/schema/properties/message",
"OldJsonPath": "#/paths/~1pets/get/responses/404/content/application~1json/schema/properties/message",
"NewJsonPath": "#/paths/~1pets/get/responses/404/content/application~1json/schema/properties/message",
"Id": 1041,
"Code": "AddedPropertyInResponse",
"Mode": "Addition"
},
{
"Severity": "Warning",
"Message": "The new version has a new property \u0027message\u0027 in response that was not found in the old version.",
"OldJsonRef": "#/components/responses/InternalErrorResponse/content/application~1json/schema/properties/message",
"NewJsonRef": "#/components/responses/InternalErrorResponse/content/application~1json/schema/properties/message",
"OldJsonRef": "#/paths/~1pets/get/responses/500/content/application~1json/schema/properties/message",
"NewJsonRef": "#/paths/~1pets/get/responses/500/content/application~1json/schema/properties/message",
"OldJsonPath": "#/components/responses/InternalErrorResponse/content/application~1json/schema/properties/message",
"NewJsonPath": "#/components/responses/InternalErrorResponse/content/application~1json/schema/properties/message",
"Id": 1041,
"Code": "AddedPropertyInResponse",
"Mode": "Addition"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
{
"Severity": "Info",
"Message": "The new version has a new read-only property \u0027petType\u0027 in response that was not found in the old version.",
"OldJsonRef": "#/components/schemas/Pet/properties/petType",
"NewJsonRef": "#/components/schemas/Pet/properties/petType",
"OldJsonRef": "#/paths/~1pets/get/responses/200/content/application~1json/schema/items/properties/petType",
"NewJsonRef": "#/paths/~1pets/get/responses/200/content/application~1json/schema/items/properties/petType",
"OldJsonPath": "#/components/schemas/Pet/properties/petType",
"NewJsonPath": "#/components/schemas/Pet/properties/petType",
"Id": 1040,
"Code": "AddedReadOnlyPropertyInResponse",
"Mode": "Addition"
Expand All @@ -13,15 +15,19 @@
"Message": "The new version has a new read-only property \u0027message\u0027 in response that was not found in the old version.",
"OldJsonRef": "#/paths/~1pets/get/responses/404/content/application~1json/schema/properties/message",
"NewJsonRef": "#/paths/~1pets/get/responses/404/content/application~1json/schema/properties/message",
"OldJsonPath": "#/paths/~1pets/get/responses/404/content/application~1json/schema/properties/message",
"NewJsonPath": "#/paths/~1pets/get/responses/404/content/application~1json/schema/properties/message",
"Id": 1040,
"Code": "AddedReadOnlyPropertyInResponse",
"Mode": "Addition"
},
{
"Severity": "Info",
"Message": "The new version has a new read-only property \u0027message\u0027 in response that was not found in the old version.",
"OldJsonRef": "#/components/responses/InternalErrorResponse/content/application~1json/schema/properties/message",
"NewJsonRef": "#/components/responses/InternalErrorResponse/content/application~1json/schema/properties/message",
"OldJsonRef": "#/paths/~1pets/get/responses/500/content/application~1json/schema/properties/message",
"NewJsonRef": "#/paths/~1pets/get/responses/500/content/application~1json/schema/properties/message",
"OldJsonPath": "#/components/responses/InternalErrorResponse/content/application~1json/schema/properties/message",
"NewJsonPath": "#/components/responses/InternalErrorResponse/content/application~1json/schema/properties/message",
"Id": 1040,
"Code": "AddedReadOnlyPropertyInResponse",
"Mode": "Addition"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"Message": "The new version is adding a requestBody that was not found in the old version.",
"OldJsonRef": "#/paths/~1pets/post/requestBody",
"NewJsonRef": "#/paths/~1pets/post/requestBody",
"OldJsonPath": "#/paths/~1pets/post/requestBody",
"NewJsonPath": "#/paths/~1pets/post/requestBody",
"Id": 1046,
"Code": "AddedRequestBody",
"Mode": "Addition"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"Message": "The required parameter \u0027limitParam\u0027 was added in the new version.",
"OldJsonRef": null,
"NewJsonRef": "#/paths/~1api~1Parameters/put/parameters/1",
"OldJsonPath": null,
"NewJsonPath": "#/paths/~1api~1Parameters/put/parameters/1",
"Id": 1010,
"Code": "AddingRequiredParameter",
"Mode": "Addition"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"Message": "The new version has new required property \u0027petType\u0027 that was not found in the old version.",
"OldJsonRef": "#/paths/~1pets/get/responses/200/content/application~1json/schema/items",
"NewJsonRef": "#/paths/~1pets/get/responses/200/content/application~1json/schema/items",
"OldJsonPath": "#/paths/~1pets/get/responses/200/content/application~1json/schema/items",
"NewJsonPath": "#/paths/~1pets/get/responses/200/content/application~1json/schema/items",
"Id": 1034,
"Code": "AddedRequiredProperty",
"Mode": "Addition"
Expand All @@ -13,6 +15,8 @@
"Message": "The new version has new required property \u0027message\u0027 that was not found in the old version.",
"OldJsonRef": "#/paths/~1pets/get/responses/404/content/application~1json/schema",
"NewJsonRef": "#/paths/~1pets/get/responses/404/content/application~1json/schema",
"OldJsonPath": "#/paths/~1pets/get/responses/404/content/application~1json/schema",
"NewJsonPath": "#/paths/~1pets/get/responses/404/content/application~1json/schema",
"Id": 1034,
"Code": "AddedRequiredProperty",
"Mode": "Addition"
Expand All @@ -22,6 +26,8 @@
"Message": "The new version has new required property \u0027petType\u0027 that was not found in the old version.",
"OldJsonRef": "#/components/schemas/Pet",
"NewJsonRef": "#/components/schemas/Pet",
"OldJsonPath": "#/components/schemas/Pet",
"NewJsonPath": "#/components/schemas/Pet",
"Id": 1034,
"Code": "AddedRequiredProperty",
"Mode": "Addition"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"Message": "The new version adds a response code \u0027200\u0027.",
"OldJsonRef": "#/paths/~1api~1Operations/post/responses/200",
"NewJsonRef": "#/paths/~1api~1Operations/post/responses/200",
"OldJsonPath": "#/paths/~1api~1Operations/post/responses/200",
"NewJsonPath": "#/paths/~1api~1Operations/post/responses/200",
"Id": 1011,
"Code": "AddingResponseCode",
"Mode": "Addition"
Expand All @@ -13,6 +15,8 @@
"Message": "The new version adds a response code \u0027202\u0027.",
"OldJsonRef": "#/paths/~1api~1Responses/get/responses/202",
"NewJsonRef": "#/paths/~1api~1Responses/get/responses/202",
"OldJsonPath": "#/paths/~1api~1Responses/get/responses/202",
"NewJsonPath": "#/paths/~1api~1Responses/get/responses/202",
"Id": 1011,
"Code": "AddingResponseCode",
"Mode": "Addition"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"Message": "The new version is adding a new schema that was not found in the old version.",
"OldJsonRef": "#/paths/~1api~1Parameters/put/responses/200/content/application~1json/schema",
"NewJsonRef": "#/paths/~1api~1Parameters/put/responses/200/content/application~1json/schema",
"OldJsonPath": "#/paths/~1api~1Parameters/put/responses/200/content/application~1json/schema",
"NewJsonPath": "#/paths/~1api~1Parameters/put/responses/200/content/application~1json/schema",
"Id": 1048,
"Code": "AddedSchema",
"Mode": "Removal"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"Message": "The order of parameter \u0027skipParam\u0027 was changed. ",
"OldJsonRef": "#/paths/~1api~1Parameters/put/parameters",
"NewJsonRef": "#/paths/~1api~1Parameters/put/parameters",
"OldJsonPath": "#/paths/~1api~1Parameters/put/parameters",
"NewJsonPath": "#/paths/~1api~1Parameters/put/parameters",
"Id": 1042,
"Code": "ChangedParameterOrder",
"Mode": "Update"
Expand All @@ -13,6 +15,8 @@
"Message": "The order of parameter \u0027limitParam\u0027 was changed. ",
"OldJsonRef": "#/paths/~1api~1Parameters/put/parameters",
"NewJsonRef": "#/paths/~1api~1Parameters/put/parameters",
"OldJsonPath": "#/paths/~1api~1Parameters/put/parameters",
"NewJsonPath": "#/paths/~1api~1Parameters/put/parameters",
"Id": 1042,
"Code": "ChangedParameterOrder",
"Mode": "Update"
Expand Down
Loading

0 comments on commit f25a782

Please sign in to comment.