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

Commit

Permalink
feat: add Cancel schema to Validator (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanwlee authored Jul 16, 2024
1 parent db70267 commit ceaaf1c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/src/protocol/validator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import 'dart:convert';
import 'package:json_schema/json_schema.dart';
import 'package:path/path.dart' as p;
import 'package:tbdex/src/protocol/exceptions.dart';
import 'package:tbdex/src/protocol/json_schemas/cancel_schema.dart';
import 'package:tbdex/src/protocol/json_schemas/close_schema.dart';
import 'package:tbdex/src/protocol/json_schemas/definitions_schema.dart';
import 'package:tbdex/src/protocol/json_schemas/message_schema.dart';
Expand Down Expand Up @@ -139,6 +140,8 @@ class Validator {
final schemasPath = p.join('lib', 'src', 'protocol', 'json_schemas');
final refProvider = _createRefProvider(schemasPath);

_schemaMap['cancel'] =
JsonSchema.create(CancelSchema.json, refProvider: refProvider);
_schemaMap['close'] =
JsonSchema.create(CloseSchema.json, refProvider: refProvider);
_schemaMap['definitions'] =
Expand Down

0 comments on commit ceaaf1c

Please sign in to comment.