Runtime Exception - JSON integer is too large or small for an Int64
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Iniziare da AutoRest.Swagger/PathLevelParameterConverter.cs alla riga 48, quindi seguire SwaggerParser.Parse e il comando OpenApiDiff mostrato nel report. Riprodurre il problema con le specifiche ConfidentialLedger collegate. Il lavoro è completato quando è possibile elaborare il valore massimo in parameters.CommitParameter senza l'eccezione di parsing Int64 e il confronto viene completato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
I'm getting the follwing runtime exception when trying to run the tool against the following two files:
- https://github.com/Azure/azure-rest-api-specs/blob/4ee92e33cbdbec6685e3cfa125a9b80423cac04c/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/stable/2022-11-23/confidentialledger.json
- https://github.com/Azure/azure-rest-api-specs/blob/main/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/stable/2022-05-13/confidentialledger.json
Unhandled exception. Newtonsoft.Json.JsonReaderException: JSON integer 9223372036854776000 is too large or small for an Int64. Path 'parameters.CommitParameter.maximum', line 1, position 40197.
at Newtonsoft.Json.JsonTextReader.ParseNumber(ReadType readType)
at Newtonsoft.Json.JsonTextReader.ParseValue()
at Newtonsoft.Json.Linq.JContainer.ReadContentFrom(JsonReader r, JsonLoadSettings settings)
at Newtonsoft.Json.Linq.JContainer.ReadTokenFrom(JsonReader reader, JsonLoadSettings options)
at Newtonsoft.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings settings)
at Newtonsoft.Json.Linq.JObject.Parse(String json, JsonLoadSettings settings)
at Newtonsoft.Json.Linq.JObject.Parse(String json)
at AutoRest.Swagger.JsonConverters.PathLevelParameterConverter..ctor(String json) in D:\a\1\s\openapi-diff\src\modeler\AutoRest.Swagger\PathLevelParameterConverter.cs:line 48
at AutoRest.Swagger.SwaggerParser.Parse(String swaggerDocument, String fileName) in D:\a\1\s\openapi-diff\src\modeler\AutoRest.Swagger\SwaggerParser.cs:line 22
at AutoRest.Swagger.SwaggerModeler.Compare(String fileNameOld, String swaggerOld, String fileNameNew, String swaggerNew, Settings settings) in D:\a\1\s\openapi-diff\src\modeler\AutoRest.Swagger\SwaggerModeler.cs:line 29
at OpenApiDiff.Program.Main(String[] args) in D:\a\1\s\openapi-diff\src\core\OpenApiDiff\Program.cs:line 37
Aborted
at ChildProcess.exithandler (node:child_process:389:12)
at ChildProcess.emit (node:events:513:28)
at maybeClose (node:internal/child_process:1091:16)
at Socket.<anonymous> (node:internal/child_process:449:11)
at Socket.emit (node:events:513:28)
at Pipe.<anonymous> (node:net:757:14) {
code: 134,
killed: false,
signal: null,
cmd: 'dotnet /home/apiccione/.nvm/versions/node/v18.6.0/lib/node_modules/@azure/oad/dlls/OpenApiDiff.dll -o /tmp/old-resolved.json -n /tmp/new-resolved.json',
stdout: '',
stderr: "Unhandled exception. Newtonsoft.Json.JsonReaderException: JSON integer 9223372036854776000 is too large or small for an Int64. Path 'parameters.CommitParameter.maximum', line 1, position 40197.\n" +
' at Newtonsoft.Json.JsonTextReader.ParseNumber(ReadType readType)\n' +
' at Newtonsoft.Json.JsonTextReader.ParseValue()\n' +
' at Newtonsoft.Json.Linq.JContainer.ReadContentFrom(JsonReader r, JsonLoadSettings settings)\n' +
' at Newtonsoft.Json.Linq.JContainer.ReadTokenFrom(JsonReader reader, JsonLoadSettings options)\n' +
' at Newtonsoft.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings settings)\n' +
' at Newtonsoft.Json.Linq.JObject.Parse(String json, JsonLoadSettings settings)\n' +
' at Newtonsoft.Json.Linq.JObject.Parse(String json)\n' +
' at AutoRest.Swagger.JsonConverters.PathLevelParameterConverter..ctor(String json) in D:\\a\\1\\s\\openapi-diff\\src\\modeler\\AutoRest.Swagger\\PathLevelParameterConverter.cs:line 48\n' +
' at AutoRest.Swagger.SwaggerParser.Parse(String swaggerDocument, String fileName) in D:\\a\\1\\s\\openapi-diff\\src\\modeler\\AutoRest.Swagger\\SwaggerParser.cs:line 22\n' +
' at AutoRest.Swagger.SwaggerModeler.Compare(String fileNameOld, String swaggerOld, String fileNameNew, String swaggerNew, Settings settings) in D:\\a\\1\\s\\openapi-diff\\src\\modeler\\AutoRest.Swagger\\SwaggerModeler.cs:line 29\n' +
' at OpenApiDiff.Program.Main(String[] args) in D:\\a\\1\\s\\openapi-diff\\src\\core\\OpenApiDiff\\Program.cs:line 37\n' +
'Aborted\n'
}
This seems to originate from parsing the maximum int64 9223372036854775807 here, which for some reason gets converted to 9223372036854776000 when the tool runs. The value is the same for both specs.
Please also find more details about the error in the CI pipeline: https://github.com/Azure/azure-rest-api-specs/pull/21659/checks?check_run_id=9712102995.
- Lingua principale
- C#
- Stelle
- 290
- Fork
- 50
- Merge medio
- 2g 21h
- PR unite (30g)
- 10
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Azure/openapi-diff
-
Azure/openapi-diff#482 · 1 assegnatario ·
-
Azure/openapi-diff#479 · 2 commenti · 1 assegnatario ·
-
Remove dependency `autorest` Aperta
Azure/openapi-diff#456 · 1 assegnatario ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
Azure/openapi-diff#445 ·
-
Azure/openapi-diff#371 · 7 commenti · 1 assegnatario ·
Tutte le issue di Azure/openapi-diff
Issue simili
-
Documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
cake-build/cake#5024 ·
-
Frontend status/draft TechnicalDebt
Difficoltà 2/5 1-2 giorni Idoneità per principianti 75/100
Altinn/altinn-auth#4143 ·
-
.NET Flaky Test Testing Tests
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
getsentry/sentry-dotnet#5617 · 1 commento ·
-
:watch: Not Triaged dotnet-fsharp/svc
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
-
Client customer-reported needs-team-attention question Service Attention WebPubSub
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
Azure/azure-sdk-for-net#63292 · 3 commenti · 1 reazione ·