@dmptool/types 3.1.2 → 3.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dmp/index.d.ts +15 -0
- package/dist/dmp/index.js +26 -2
- package/dist/schemas/dmptoolDmp.schema.json +4556 -0
- package/package.json +6 -6
- package/schemas/dmptoolDmp.schema.json +4556 -0
package/dist/dmp/index.d.ts
CHANGED
|
@@ -1023,4 +1023,19 @@ type MergedDMP = RDAInner & DMPToolExtensionType;
|
|
|
1023
1023
|
export type DMPToolDMPType = {
|
|
1024
1024
|
dmp: MergedDMP;
|
|
1025
1025
|
};
|
|
1026
|
+
export declare const DMPToolDMPJSONSchema: {
|
|
1027
|
+
$id: string;
|
|
1028
|
+
title: string;
|
|
1029
|
+
description: string;
|
|
1030
|
+
$defs: any;
|
|
1031
|
+
type: string;
|
|
1032
|
+
required: string[];
|
|
1033
|
+
properties: {
|
|
1034
|
+
dmp: {
|
|
1035
|
+
allOf: {
|
|
1036
|
+
$ref: string;
|
|
1037
|
+
}[];
|
|
1038
|
+
};
|
|
1039
|
+
};
|
|
1040
|
+
};
|
|
1026
1041
|
export {};
|
package/dist/dmp/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ExtensionJSONSchema = exports.DMPToolExtensionSchema = exports.RDACommonStandardDMPJSONSchema = exports.RDA_COMMON_STANDARD_VERSION = void 0;
|
|
3
|
+
exports.DMPToolDMPJSONSchema = exports.ExtensionJSONSchema = exports.DMPToolExtensionSchema = exports.RDACommonStandardDMPJSONSchema = exports.RDA_COMMON_STANDARD_VERSION = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const extension_1 = require("./extension");
|
|
6
6
|
// The RDA Common Standard for DMPs JSON schema is automatically downloaded by
|
|
@@ -87,6 +87,30 @@ catch (_a) {
|
|
|
87
87
|
// Ignoring ESLint here because it doesn't like that we're only using jsonSchema as a Type
|
|
88
88
|
// but that's exactly what we want to do.
|
|
89
89
|
exports.RDACommonStandardDMPJSONSchema = rdaSchemaJson;
|
|
90
|
-
;
|
|
91
90
|
exports.DMPToolExtensionSchema = extension_1.ExtensionSchema;
|
|
92
91
|
exports.ExtensionJSONSchema = zod_1.z.toJSONSchema(extension_1.ExtensionSchema);
|
|
92
|
+
exports.DMPToolDMPJSONSchema = {
|
|
93
|
+
$id: "https://github.com/CDLUC3/dmptool-types/blob/main/schemas/dmptoolDmp.schema.json",
|
|
94
|
+
title: 'RDA DMP Common Standard for machine-actionable DMPs with extensions for the DMP Tool system',
|
|
95
|
+
description: 'This is a metadata application profile to provide basic interoperability between systems producing or consuming machine-actionable data management plans (maDMPS) with the DMP Tool.\n\nThis application profile is intended to cover a wide range of use cases and does not set any business (e.g. funder specific) requirements. It represents information over the whole DMP lifecycle.',
|
|
96
|
+
// 3. Definitions must be at the ROOT level (sibling to properties)
|
|
97
|
+
$defs: Object.assign(Object.assign({ DMPData: rdaSchemaJson.properties.dmp }, (rdaSchemaJson.$defs || rdaSchemaJson.definitions || {})), { DMPToolExtension: {
|
|
98
|
+
type: "object",
|
|
99
|
+
properties: exports.ExtensionJSONSchema.properties,
|
|
100
|
+
required: exports.ExtensionJSONSchema.required || [],
|
|
101
|
+
additionalProperties: false
|
|
102
|
+
} }),
|
|
103
|
+
// 4. Schema constraints at the ROOT level
|
|
104
|
+
type: 'object',
|
|
105
|
+
required: ['dmp'],
|
|
106
|
+
// 5. THE PROPERTIES (One single object here)
|
|
107
|
+
properties: {
|
|
108
|
+
dmp: {
|
|
109
|
+
// Use allOf to combine the RDA 'DMPData' and our local 'DMPToolExtension'
|
|
110
|
+
allOf: [
|
|
111
|
+
{ $ref: "#/$defs/DMPData" },
|
|
112
|
+
{ $ref: "#/$defs/DMPToolExtension" }
|
|
113
|
+
]
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
};
|