JsonSerializationException on breaking changes pass
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 38/100
Rechercherichtung
Führe den fehlschlagenden Befehl gegen die deploymentmanager-Spezifikation aus und untersuche den Wert von parameters am gemeldeten Pfad. Beginne mit AutoRest.Swagger/SwaggerModeler.cs Zeile 18 und OpenApiDiff/Program.cs Zeile 33. Überprüfe anschließend, dass die Prüfung auf Breaking Changes die Spezifikation verarbeitet und die umbenannte Eigenschaft meldet, anstatt abzubrechen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
The "Breaking Changes" check for this PR is failing with the following somewhat cryptic error:
Executing : autorest --input-file=specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2018-09-01-preview/deploymentmanager.json --output-artifact=swagger-document.json --output-file=deploymentmanager --output-folder=/tmp/resolved/specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2018-09-01-preview
Resolved map for the new specifications:
{ 'specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2018-09-01-preview/deploymentmanager.json': '/tmp/resolved/specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2018-09-01-preview/deploymentmanager.json' }
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Old Spec: "specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2018-09-01-preview/deploymentmanager.json"
New Spec: "/tmp/resolved/specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2018-09-01-preview/deploymentmanager.json"
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
{ Error: Command failed: dotnet /home/travis/build/Azure/azure-rest-api-specs/node_modules/oad/lib/dlls/OpenApiDiff.dll -o /tmp/old.json -n /tmp/new.json -JsonValidationMessages
Unhandled Exception: Newtonsoft.Json.JsonSerializationException: Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'AutoRest.Swagger.Model.Operation' because the type requires a JSON object (e.g. {"name":"value"}) to deserialize correctly.
To fix this error either change the JSON to a JSON object (e.g. {"name":"value"}) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List<T> that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array.
Path 'paths['/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/serviceTopologies/{serviceTopologyName}'].parameters', line 21, position 21.
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureArrayContract(JsonReader reader, Type objectType, JsonContract contract)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateDictionary(IDictionary dictionary, JsonReader reader, JsonDictionaryContract contract, JsonProperty containerProperty, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateDictionary(IDictionary dictionary, JsonReader reader, JsonDictionaryContract contract, JsonProperty containerProperty, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
at AutoRest.Swagger.SwaggerModeler.Compare(String swaggerPrevious, String swaggerNew, Settings settings) in /home/travis/build/Azure/openapi-diff/openapi-diff/src/modeler/AutoRest.Swagger/SwaggerModeler.cs:line 18
at OpenApiDiff.Program.Main(String[] args) in /home/travis/build/Azure/openapi-diff/openapi-diff/src/core/OpenApiDiff/Program.cs:line 33
Aborted (core dumped)
at ChildProcess.exithandler (child_process.js:276:12)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:915:16)
at Socket.stream.socket.on (internal/child_process.js:336:11)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at Pipe._handle.close [as _onclose] (net.js:561:12)
killed: false,
code: 134,
signal: null,
cmd: 'dotnet /home/travis/build/Azure/azure-rest-api-specs/node_modules/oad/lib/dlls/OpenApiDiff.dll -o /tmp/old.json -n /tmp/new.json -JsonValidationMessages' }
There was a breaking change in the PR (one property was renamed) so I would expect it to fail - but that was the only change (apart from descriptions) so I'm not sure what caused this error.
Any thoughts?
Thanks!
- Vorherrschende Sprache
- C#
- Sterne
- 290
- Forks
- 50
- Ø Merge
- 7 Std. 8 Min.
- Gemergte PRs (30 T.)
- 11
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus Azure/openapi-diff
-
Crash if inherited property is structurally equal but not reference identicalEvtl. wieder frei @mikeharder hat das vor 159 Tagen übernommen, und es ist kein Pull Request offen. Offen
Azure/openapi-diff#482 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Crash if duplicate model names (across files) used in allOfEvtl. wieder frei @mikeharder hat das vor 160 Tagen übernommen, und es ist kein Pull Request offen. Offen
Azure/openapi-diff#479 · 2 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Remove dependency `autorest`Evtl. wieder frei @mikeharder hat das vor 223 Tagen übernommen, und es ist kein Pull Request offen. Offen
Azure/openapi-diff#456 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
Azure/openapi-diff#445 ·
Maintainer antworten meist innerhalb von 1 Tag
-
OpenAPI-diff should flag changes in the tags for an operationEvtl. wieder frei @mikeharder hat das vor 406 Tagen übernommen, und es ist kein Pull Request offen. Offen
Azure/openapi-diff#371 · 7 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in Azure/openapi-diff
Ähnliche Issues
-
A numeric literal is parsed in the host's culture, so 1.5 is 15 in a made EXE on a comma-decimal OSOffenbug interpreter silently-wrong small
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 83/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
reactiveui/ReactiveUI.Binding.SourceGenerators#176 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 76/100
dotnet/csharpstandard#1830 ·
Maintainer antworten meist innerhalb von 1 Tag
-
c:docs p:high size:S t:docs
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 64/100
Maintainer antworten meist innerhalb von 1 Tag