Skip to content
This repository was archived by the owner on Dec 12, 2024. It is now read-only.

Commit ceaaf1c

Browse files
authored
feat: add Cancel schema to Validator (#51)
1 parent db70267 commit ceaaf1c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/src/protocol/validator.dart

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import 'dart:convert';
33
import 'package:json_schema/json_schema.dart';
44
import 'package:path/path.dart' as p;
55
import 'package:tbdex/src/protocol/exceptions.dart';
6+
import 'package:tbdex/src/protocol/json_schemas/cancel_schema.dart';
67
import 'package:tbdex/src/protocol/json_schemas/close_schema.dart';
78
import 'package:tbdex/src/protocol/json_schemas/definitions_schema.dart';
89
import 'package:tbdex/src/protocol/json_schemas/message_schema.dart';
@@ -139,6 +140,8 @@ class Validator {
139140
final schemasPath = p.join('lib', 'src', 'protocol', 'json_schemas');
140141
final refProvider = _createRefProvider(schemasPath);
141142

143+
_schemaMap['cancel'] =
144+
JsonSchema.create(CancelSchema.json, refProvider: refProvider);
142145
_schemaMap['close'] =
143146
JsonSchema.create(CloseSchema.json, refProvider: refProvider);
144147
_schemaMap['definitions'] =

0 commit comments

Comments
 (0)