Skip to content

Conversation

@MuhammadJaziraly
Copy link
Contributor

The reason for this change is to have the index for the operation in cases where two identical operations target the same resource.

For example, if two identical remove operations target the same resource, the latter will fail because the first operation already removed the resource.

By having the index, we can accurately identify and report the failing operation.

@vearutop
Copy link
Member

vearutop commented Jul 2, 2024

Let's add op index via a setter function instead of constructor, so that there is no breaking change of constructor signature.

Enhanced the `PathException` exception class to include an operation index, identifying the specific operation that caused the exception.
Modified the `JsonPatch` class to pass this additional parameter when throwing the `PathException`.
Updated the corresponding tests to reflect these changes.
@MuhammadJaziraly
Copy link
Contributor Author

Done ✅

@vearutop vearutop merged commit c55d38a into swaggest:master Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants