Add JsonSchemaExporter.#103322
Conversation
|
Note regarding the |
|
Tagging subscribers to this area: @dotnet/area-system-text-json, @gregsdennis |
gregsdennis
left a comment
There was a problem hiding this comment.
The conversions look mostly good. I've left some comments mostly to make other readers aware of the JSON Schema side of things.
src/libraries/System.Text.Json/src/System/Text/Json/Schema/JsonSchema.cs
Show resolved
Hide resolved
src/libraries/System.Text.Json/src/System/Text/Json/Schema/JsonSchemaExporterContext.cs
Show resolved
Hide resolved
...stem.Text.Json/src/System/Text/Json/Serialization/Converters/Value/JsonPrimitiveConverter.cs
Outdated
Show resolved
Hide resolved
...stem.Text.Json/src/System/Text/Json/Serialization/Converters/Value/JsonPrimitiveConverter.cs
Show resolved
Hide resolved
...stem.Text.Json/src/System/Text/Json/Serialization/Converters/Value/JsonPrimitiveConverter.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Text.Json/tests/Common/JsonSchemaExporterTests.TestTypes.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Text.Json/tests/Common/JsonSchemaExporterTests.TestTypes.cs
Show resolved
Hide resolved
src/libraries/System.Text.Json/tests/Common/JsonSchemaExporterTests.TestTypes.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Text.Json/tests/Common/JsonSchemaExporterTests.TestTypes.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Text.Json/tests/Common/JsonSchemaExporterTests.TestTypes.cs
Show resolved
Hide resolved
src/libraries/System.Text.Json/src/System/Text/Json/Schema/JsonSchemaExporterOptions.cs
Outdated
Show resolved
Hide resolved
|
Summarizing my inline comments here that were intended to give other reviewers some JSON Schema context. Usage of
|
src/libraries/System.Text.Json/src/System/Text/Json/Schema/JsonSchema.cs
Outdated
Show resolved
Hide resolved
...raries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Value/EnumConverter.cs
Outdated
Show resolved
Hide resolved
...es/System.Text.Json/src/System/Text/Json/Serialization/Converters/Value/TimeSpanConverter.cs
Outdated
Show resolved
Hide resolved
d5f9a62 to
54274cf
Compare
Fix #102788. This implementation differs somewhat compared to the stj-schema-mapper prototype in a few ways:
OnSchemaNodeGeneratedcallback is invoked for$refschemas.$refschemas are only being generated for recursive types.{ }and{"not": true }node schemas are normalized intotrueandfalserespectively.