Skip to content

Commit f716abf

Browse files
committed
add to next release - support for custom drafts
1 parent 40c0e79 commit f716abf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

JsonSchema/JsonSchema.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,8 @@ private static SpecVersion DetermineSpecVersion(JsonSchema schema, SchemaRegistr
232232
{
233233
if (schema.BoolValue.HasValue) return SpecVersion.DraftNext;
234234

235+
if (!Enum.IsDefined(typeof(SpecVersion), desiredDraft)) return desiredDraft;
236+
235237
if (schema.TryGetKeyword<SchemaKeyword>(SchemaKeyword.Name, out var schemaKeyword))
236238
{
237239
var metaSchemaId = schemaKeyword?.Schema;

0 commit comments

Comments
 (0)