I’m using V5.9.0 and it looks like the OpenAPI feature generates an invalid definition for arrays. The values for items have their own value property which does not seem to be valid according to the specification.
I tried rewriting the items property myself in an OpenAPI filter like so:
but the result is the same. How can I remove that value property?
So the issue is not related to ServiceStack. Someone had the fantastic idea to customize the Dictionary<string, object> type and from what I see I have to keep this customization for backward compatibility. I’ll have to figure something out to fix this issue.
Is it possible to customize JsConfig for a specific request? I saw that it is possible to customize some properties from the client but it doesn’t look like I can change the serialization for a specific type.
I doubt it is possible but it would help if I could ignore that custom JsConfig<Dictionary<string, object>> serialization in the /openapi request.
No it’s not possible and IMO relying on customizing core collections like Dictionary<string, object> is a bad idea, it’s used extensively in #Script and you’re likely to break other features.
I agree that’s it is a bad idea however I cannot easily go back on decision that were made ~10 years ago regarding that project. Thankfully we have no plan to use #Script so we won’t break that at least .