File tree Expand file tree Collapse file tree 5 files changed +14
-9
lines changed Expand file tree Collapse file tree 5 files changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -21,15 +21,17 @@ import type { Version } from '../spec'
2121
2222export interface Validator {
2323 /**
24- * Promise rejects with one of the following
24+ * validate the data.
25+ *
26+ * Promise may reject with one of the following:
2527 * - {@link Validation.NotImplementedError | NotImplementedError} when there is no validator available for `this.version`
2628 * - {@link Validation.MissingOptionalDependencyError | MissingOptionalDependencyError} when a required dependency was not installed
2729 * - {@link Validation.ValidationError | ValidationError} when `data` was invalid to the schema
2830 */
2931 validate : ( data : string ) => Promise < void >
3032}
3133
32- export abstract class BaseValidator implements BaseValidator {
34+ export abstract class BaseValidator implements Validator {
3335 readonly #version: Version
3436
3537 constructor ( version : Version ) {
@@ -40,5 +42,6 @@ export abstract class BaseValidator implements BaseValidator {
4042 return this . #version
4143 }
4244
45+ /** {@inheritDoc Validator.validate } */
4346 abstract validate ( data : string ) : Promise < void >
4447}
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ export * from './index.common'
2121
2222// region node-specifics
2323
24- export * from './jsonValidator'
24+ export * from './jsonValidator.node '
2525export * from './xmlValidator.node'
2626
2727// endregion node-specifics
Original file line number Diff line number Diff line change @@ -21,9 +21,7 @@ export * from './index.common'
2121
2222// region web-specifics
2323
24- // json validator is notentirely tested fr WEB, yet
25- // export * from './jsonValidator'
26-
27- // there is no XML validator for the web, yet
24+ // there is no JSON validator for the web, yet
25+ // there is no XML validator for the web, yet
2826
2927// endregion web-specifics
Original file line number Diff line number Diff line change @@ -99,7 +99,9 @@ abstract class BaseJsonValidator extends BaseValidator {
9999 }
100100
101101 /**
102- * Promise rejects with one of the following
102+ * Validate the data against CycloneDX spec of `this.version`.
103+ *
104+ * Promise may reject with one of the following:
103105 * - {@link Validation.NotImplementedError | NotImplementedError} when there is no validator available for `this.version`
104106 * - {@link Validation.MissingOptionalDependencyError | MissingOptionalDependencyError} when a required dependency was not installed
105107 * - {@link Validation.ValidationError | ValidationError} when `data` was invalid to the schema
Original file line number Diff line number Diff line change @@ -73,7 +73,9 @@ export class XmlValidator extends BaseValidator {
7373 }
7474
7575 /**
76- * Promise rejects with one of the following
76+ * Validate the data against CycloneDX spec of `this.version`.
77+ *
78+ * Promise may reject with one of the following:
7779 * - {@link Validation.NotImplementedError | NotImplementedError} when there is no validator available for `this.version`
7880 * - {@link Validation.MissingOptionalDependencyError | MissingOptionalDependencyError} when a required dependency was not installed
7981 * - {@link Validation.ValidationError | ValidationError} when `data` was invalid to the schema
You can’t perform that action at this time.
0 commit comments