-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change in lettercase results in error #495
Comments
@slorenzbmw Thanks for reporting this! I'm unable to reproduce your issue with a simple test: --- core/src/test/resources/issue-495_1.yaml 2020-06-23 08:24:12
+++ core/src/test/resources/issue-495_2.yaml 2023-03-22 21:32:47
@@ -37,7 +37,7 @@
description: Multiple status values can be provided with comma separated strings
operationId: findPetsByStatus
parameters:
- - name: status
+ - name: Status
in: query
description: Status values that need to be considered for filter
required: true Could you please provide a minimal example to reproduce the issue? |
Thanks for looking into this!
and could reproduce it with this minimum set:
new
Any change on the parameter "name" results in a java.lang.NullPointerException for me |
If i try to diff two files where only the following is different, i get the following error
Compare 1:
{ "name": "oneLine", "description": "***", "required": false, "in": "query", "type": "string" },
Compare 2:
{ "name": "online", "description": "***", "required": false, "in": "query", "type": "string" },
=> see the difference in "l" and "L" in the parameter "name"
Error:
Unexpected exception. Reason: Cannot invoke "String.isEmpty()" because "newParameterName" is null java.lang.NullPointerException: Cannot invoke "String.isEmpty()" because "newParameterName" is null at org.openapitools.openapidiff.core.compare.ParametersDiff.pathUnchangedParametersChanged(ParametersDiff.java:102) at org.openapitools.openapidiff.core.compare.ParametersDiff.diff(ParametersDiff.java:88) at org.openapitools.openapidiff.core.compare.OperationDiff.diff(OperationDiff.java:78) at org.openapitools.openapidiff.core.compare.PathDiff.diff(PathDiff.java:39) at org.openapitools.openapidiff.core.compare.PathsDiff.lambda$diff$3(PathsDiff.java:90) at java.base/java.util.LinkedHashMap$LinkedKeySet.forEach(LinkedHashMap.java:589) at org.openapitools.openapidiff.core.compare.PathsDiff.diff(PathsDiff.java:47) at org.openapitools.openapidiff.core.compare.OpenApiDiff.compare(OpenApiDiff.java:96) at org.openapitools.openapidiff.core.compare.OpenApiDiff.compare(OpenApiDiff.java:64) at org.openapitools.openapidiff.core.OpenApiCompare.fromSpecifications(OpenApiCompare.java:102) at org.openapitools.openapidiff.core.OpenApiCompare.fromLocations(OpenApiCompare.java:91) at org.openapitools.openapidiff.cli.Main.main(Main.java:175)
I can trace it back to here:
openapi-diff/core/src/main/java/org/openapitools/openapidiff/core/compare/ParametersDiff.java
Line 102 in d6383f3
The text was updated successfully, but these errors were encountered: