Gathering detailed insights and metrics for @oada/media-types
Gathering detailed insights and metrics for @oada/media-types
Gathering detailed insights and metrics for @oada/media-types
Gathering detailed insights and metrics for @oada/media-types
Simplified approach to OADA formats that actually uses JSON Schema
npm install @oada/media-types
Typescript
Module System
TypeScript (99.67%)
Ruby (0.17%)
EJS (0.09%)
HTML (0.04%)
Perl (0.03%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
3 Stars
298 Commits
1 Forks
11 Watchers
44 Branches
10 Contributors
Updated on Jul 01, 2024
Latest Version
4.0.0
Package Id
@oada/media-types@4.0.0
Unpacked Size
9.48 kB
Size
3.65 kB
File Count
12
Published on
Apr 05, 2024
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
2
3
This is a mono-repo for all things relating to OADA formats. It uses yarn workspaces. The purpose of this repo is to act as an inventory of known OADA API and ag data formats. These formats are represented as JSON Schema.
The JSON Schema files are publicly available from
https://formats.openag.io/
. The $id
of our schemas is also the URL at which
it is available for download (i.e., if you configure your JSON Schema tool to
resolve $ref
s via HTTP, you can reference our schemas with no further
effort.). This makes the schemas/formats useful to any of the many environments
which have
JSON Schema implementations
available.
To have TypeScript sanity check the formats of our schemas for us, we wrap our JSON Schemas in TypeScript modules.
1// Somewhat opinionated TypeScript type definitions for JSON Schema 2import type { JSONSchema8 as Schema } from 'jsonschema8'; 3 4const schema: Schema = { 5 /* The actual JSON Schema */ 6}; 7 8/** 9 * Simply exports an object of the schema, 10 * but now TS understands what it is and how it should look. 11 */ 12export = schema;
The original intention was to simply have JSON files of the JSON Schema, but the convenience of having TypeScript check our schemas for us motivated this compromise. The published versions of the schemas have this wrapping removed and are pure JSON Schema.
All that is needed to add a format is to create a new .schema.ts
file within
schemas which exports valid JSON Schema. You can easily add the file
for your new format with hygen
:
1hygen format new your/format/name
Our test suite will automatically sanity-check all formats (including your new ones). Schemas are (among other checks) checked against the meta-schema, and expected to match any examples they have.
You are strongly encouraged to add examples
to your new formats.
Additionally, if you create a .schema.spec.cts
file for your format, any mocha
tests in it will run with the test suite.
This project is chiefly a collection of pure JSON Schema schemata, but there are also node libraries for utilizing the schemas in TypeScript/JavaScript under packages.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
SAST tool detected but not run on all commits
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/28 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
32 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-14
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More