extractor.Extractor throws InvalidOperationException in run-extractor.yaml
See original GitHub issueI’m following the hands-on lab to publish my API management from development to test and production environment in the Azure DevOps scenario.
When running the run-extractor.yaml pipeline it returns with “Script failed with exit code: 255”
crit: extractor.Extractor[0] System.InvalidOperationException: The JSON property name for 'common.Models.Api+ApiContactInformation.Name' collides with another property. at System.Text.Json.ThrowHelper.ThrowInvalidOperationException_SerializerPropertyNameConflict(Type type, JsonPropertyInfo jsonPropertyInfo) at System.Text.Json.Serialization.Metadata.JsonTypeInfo.CacheMember(JsonPropertyInfo jsonPropertyInfo, JsonPropertyDictionary
1 propertyCache, Dictionary2& ignoredMembers) at System.Text.Json.Serialization.Converters.SmallObjectWithParameterizedConstructorConverter
5.TryRead[TArg](ReadStack& state, Utf8JsonReader& reader, JsonParameterInfo jsonParameterInfo, TArg& arg)
at System.Text.Json.Serialization.Converters.SmallObjectWithParameterizedConstructorConverter5.ReadAndCacheConstructorArgument(ReadStack& state, Utf8JsonReader& reader, JsonParameterInfo jsonParameterInfo) at System.Text.Json.Serialization.Converters.ObjectWithParameterizedConstructorConverter
1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
at System.Text.Json.Serialization.JsonConverter1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value) at System.Text.Json.Serialization.JsonConverter
1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan1 utf8Json, JsonTypeInfo jsonTypeInfo, Nullable
1 actualByteCount)
at System.Text.Json.JsonSerializer.ReadNode[TValue](JsonNode node, JsonTypeInfo jsonTypeInfo)
at common.Api.Deserialize(JsonObject jsonObject) in /home/vsts/work/1/s/tools/code/common/Api.cs:line 155
at System.Linq.AsyncEnumerable.SelectEnumerableAsyncIterator2.MoveNextCore() in /_/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Select.cs:line 232 at System.Linq.AsyncIteratorBase
1.MoveNextAsync() in /_/Ix.NET/Source/System.Linq.Async/System/Linq/AsyncIterator.cs:line 77
at System.Linq.AsyncIteratorBase1.MoveNextAsync() in /_/Ix.NET/Source/System.Linq.Async/System/Linq/AsyncIterator.cs:line 77 at System.Threading.Tasks.Parallel.<>c__54
1.<<ForEachAsync>b__54_0>d.MoveNext()
— End of stack trace from previous location —
at extractor.Extractor.ExportApis(CancellationToken cancellationToken) in /home/vsts/work/1/s/tools/code/extractor/Extractor.cs:line 359
at extractor.Extractor.Run(CancellationToken cancellationToken) in /home/vsts/work/1/s/tools/code/extractor/Extractor.cs:line 112
at extractor.Extractor.ExecuteAsync(CancellationToken cancellationToken) in /home/vsts/work/1/s/tools/code/extractor/Extractor.cs:line 85
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
Exit code is 255
`
How can i resolve this issue?
Issue Analytics
- State:
- Created a year ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
I can confirm that the branch fixes the issue. Thank you for your support!
I have a same problem. Thank you for fixing it.