I’m submitting a…
[x ] Regression (a behavior that stopped working in a new release)
[ ] Bug report
[ ] Performance issue
[ ] Documentation issue or request
Current behavior
I got latest code from master, run debugging with vs 2017 and attempting to add new filed to existing schema (pages schema) and got error message: "Failed to add field. Please reload’.
The exception is: {System.InvalidOperationException: Could not find subtype of ‘FieldPropertiesDto’ with discriminator ‘String’.
at NJsonSchema.Converters.JsonInheritanceConverter.GetDiscriminatorType(JObject jObject, Type objectType, String discriminatorValue)
at NJsonSchema.Converters.JsonInheritanceConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue) in //Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:line 2159
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target) in //Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:line 1032
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id) in /_/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:line 2386
— End of stack trace from previous location where exception was thrown —
at Microsoft.AspNetCore.Mvc.Formatters.JsonInputFormatter.ReadRequestBodyAsync(InputFormatterContext context, Encoding encoding)
at Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinder.BindModelAsync(ModelBindingContext bindingContext)
at Microsoft.AspNetCore.Mvc.ModelBinding.ParameterBinder.BindModelAsync(ActionContext actionContext, IModelBinder modelBinder, IValueProvider valueProvider, ParameterDescriptor parameter, ModelMetadata metadata, Object value)
at Microsoft.AspNetCore.Mvc.Internal.ControllerBinderDelegateProvider.<>c__DisplayClass0_0.<g__Bind|0>d.MoveNext()
— End of stack trace from previous location where exception was thrown —
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeInnerFilterAsync()
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextExceptionFilterAsync()}
Expected behavior
To be able to add field to schema.
Minimal reproduction of the problem
Go to schema. Use the ‘Add field’ button and attempt to add a field with any types.
Environment
- [ ] Self hosted with docker
- [x ] Self hosted with IIS
- [ ] Self hosted with other version
- [ ] Cloud version
Browser:
- [x ] Chrome (desktop)
- [ ] Chrome (Android)
- [ ] Chrome (iOS)
- [ ] Firefox
- [ ] Safari (desktop)
- [ ] Safari (iOS)
- [ ] IE
- [ ] Edge
Others: