Skip to content

Commit 6a92ea5

Browse files
committed
Playing around with possible output schemas
Update example Fix schema
1 parent 855e927 commit 6a92ea5

File tree

3 files changed

+49
-1
lines changed

3 files changed

+49
-1
lines changed

examples/Extractor-example.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,13 @@ supported_filetypes:
4949
Example Extractor can parse example-filetype once in a blue moon.
5050
template:
5151
input_type: example
52+
supported_output_schemas:
53+
- schema:
54+
description: >-
55+
The fields in the output example extractor follows the JSONSchema linked
56+
below.
57+
href: >-
58+
https://example.com/schema.json
59+
5260
license:
5361
uri: https://example.com

schemas/base.yaml

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ classes:
7777
attributes:
7878
id:
7979
description: >-
80-
A reference to the registered Datatractor `FileType->id` for this file
80+
A reference to the registered Datatractor `FileType->id` for this
81+
file
8182
type.
8283
description:
8384
description: Free-text description of caveats or instructions specific
@@ -133,6 +134,34 @@ classes:
133134
multiple output `FileTypes`. Defaults to the `FileType->id` for
134135
each supported output file type.
135136
137+
SchemaDescription:
138+
description: >-
139+
A human-readable schema definition, with a reference to a machine-actionable
140+
schema definition if available.
141+
attributes:
142+
description:
143+
description: >-
144+
A human-readable description of the schema and its usage.
145+
href:
146+
description: >-
147+
A URL or URI for the schema definition.
148+
149+
OutputSchema:
150+
description: >-
151+
A human-readable specification of the schema that the output of an `Extractor`.
152+
attributes:
153+
supported_filetypes:
154+
range: SupportedFileType
155+
multivalued: true
156+
required: false
157+
description: >-
158+
The file types that this schema can be used for; defaults to all
159+
if not provided.
160+
schema:
161+
required: true
162+
range: SchemaDescription
163+
164+
136165
Usage:
137166
description: >-
138167
A machine-actionable specification of a set of usage instructions of the

schemas/extractor.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,17 @@ classes:
5959
These should match `FileTypes` present in the registry. They can
6060
be specified on extractor execution using the templates described
6161
in the `Extractor->Usage->command` slot, [see the `Usage` class](Usage.md).
62+
supported_output_schemas:
63+
multivalued: true
64+
required: false
65+
range: OutputSchema
66+
description: >-
67+
A description of the schema that a extractor output can follow;
68+
this may be scoped per file type, or a global schema that works
69+
for all file types.
70+
This should refer to any machine-actionable schema definition,
71+
for example, JSONSchema, XMLSchema, or it may refer to a
72+
self-describing format such as JSON-LD or RDF.
6273
source_repository:
6374
description: >-
6475
A URL or URI for a source code repository associated with this

0 commit comments

Comments
 (0)