|
case PrimitiveType.String: |
|
var stringValue = (OpenApiString)(IOpenApiPrimitive)this; |
|
writer.WriteValue(stringValue.Value); |
|
break; |
Currently there is no way to write a raw string value without json encoding it as the writer does not take into account the IsExplicit value stored in OpenApiString. This feels like a bug, if so an easy fix would be to check if OpenApiString.IsExplicit() is true then call WriteRaw instead of WriteValue. If this would cause backwards compatibility issues, I suggest adding another parameter to OpenApiString that allows its contents to be called with WriteRaw instead of WriteValue.