Skip to content

Commit

Permalink
Update jadn-in-jadn.md
Browse files Browse the repository at this point in the history
  • Loading branch information
khazelton authored Jun 28, 2021
1 parent 84b67ec commit 9be7e7f
Showing 1 changed file with 127 additions and 158 deletions.
285 changes: 127 additions & 158 deletions jadn-in-jadn.md
Original file line number Diff line number Diff line change
@@ -1,158 +1,127 @@

$schema "https://json-schema.org/draft/2019-09/schema"
$id "https://oasis-open.org/openc2/jadn/v1.0"
description "Validates structure of a JADN schema, does not check values"
type "object"
required
0 "types"
additionalProperties false
properties
info
type "object"
required
0 "package"
additionalProperties false
properties
package
type "string"
version
type "string"
title
type "string"
description
type "string"
comment
type "string"
copyright
type "string"
license
type "string"
namespaces
$ref "#/definitions/Namespaces"
exports
$ref "#/definitions/Exports"
config
$ref "#/definitions/Config"
types
type "array"
items
type "array"
minItems 2
maxItems 5
items
0
$ref "#/definitions/TypeName"
1
$ref "#/definitions/BaseType"
2
$ref "#/definitions/Options"
3
$ref "#/definitions/Description"
4
$ref "#/definitions/Fields"
definitions
Namespaces
type "object"
propertyNames
$ref "#/definitions/NSID"
patternProperties

type "string"
format "uri"
Exports
type "array"
items
type "string"
Config
type "object"
additionalProperties false
properties
$MaxBinary
type "integer"
minValue 1
$MaxString
type "integer"
minValue 1
$MaxElements
type "integer"
minValue 1
$Sys
type "string"
minLength 1
maxLength 1
$TypeName
type "string"
minLength 1
maxLength 127
$FieldName
type "string"
minLength 1
maxLength 127
$NSID
type "string"
minLength 1
maxLength 127
Fields
type "array"
items
0
anyOf
0
$ref "#/definitions/Item"
1
$ref "#/definitions/Field"
Item
type "array"
minItems 2
maxItems 3
items
0
type "integer"
1
type "string"
2
$ref "#/definitions/Description"
Field
type "array"
minItems 3
maxItems 5
items
0
type "integer"
1
$ref "#/definitions/FieldName"
2
$ref "#/definitions/TypeRef"
3
$ref "#/definitions/Options"
4
$ref "#/definitions/Description"
NSID
type "string"
TypeName
type "string"
TypeRef
type "string"
FieldName
type "string"
BaseType
type "string"
enum
0 "Binary"
1 "Boolean"
2 "Integer"
3 "Number"
4 "String"
5 "Enumerated"
6 "Choice"
7 "Array"
8 "ArrayOf"
9 "Map"
10 "MapOf"
11 "Record"
Options
type "array"
items
type "string"
Description
type "string"
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://oasis-open.org/openc2/jadn/v1.0",
"description": "Validates structure of a JADN schema, does not check values",
"type": "object",
"required": ["types"],
"additionalProperties": false,
"properties": {
"info": {
"type": "object",
"required": ["package"],
"additionalProperties": false,
"properties": {
"package": {"type": "string"},
"version": {"type": "string"},
"title": {"type": "string"},
"description": {"type": "string"},
"comment": {"type": "string"},
"copyright": {"type": "string"},
"license": {"type": "string"},
"namespaces": {"$ref": "#/definitions/Namespaces"},
"exports": {"$ref": "#/definitions/Exports"},
"config": {"$ref": "#/definitions/Config"}
}
},
"types": {
"type": "array",
"items": {
"type": "array",
"minItems": 2,
"maxItems": 5,
"items": [
{"$ref": "#/definitions/TypeName"},
{"$ref": "#/definitions/BaseType"},
{"$ref": "#/definitions/Options"},
{"$ref": "#/definitions/Description"},
{"$ref": "#/definitions/Fields"}
]
}
}
},
"definitions": {
"Namespaces": {
"type": "object",
"propertyNames": {"$ref": "#/definitions/NSID"},
"patternProperties": {
"": {
"type": "string",
"format": "uri"
}
}
},
"Exports": {
"type": "array",
"items": {"type": "string"}
},
"Config": {
"type": "object",
"additionalProperties": false,
"properties": {
"$MaxBinary": {"type": "integer", "minValue": 1},
"$MaxString": {"type": "integer", "minValue": 1},
"$MaxElements": {"type": "integer", "minValue": 1},
"$Sys": {"type": "string", "minLength": 1, "maxLength": 1},
"$TypeName": {"type": "string", "minLength": 1, "maxLength": 127},
"$FieldName": {"type": "string", "minLength": 1, "maxLength": 127},
"$NSID": {"type": "string", "minLength": 1, "maxLength": 127}
}
},
"Fields": {
"type": "array",
"items": [
{"anyOf": [
{"$ref": "#/definitions/Item"},
{"$ref": "#/definitions/Field"}
]}
]
},
"Item": {
"type": "array",
"minItems": 2,
"maxItems": 3,
"items": [
{"type": "integer"},
{"type": "string"},
{"$ref": "#/definitions/Description"}
]
},
"Field": {
"type": "array",
"minItems": 3,
"maxItems": 5,
"items": [
{"type": "integer"},
{"$ref": "#/definitions/FieldName"},
{"$ref": "#/definitions/TypeRef"},
{"$ref": "#/definitions/Options"},
{"$ref": "#/definitions/Description"}
]
},
"NSID": {
"type": "string"
},
"TypeName": {
"type": "string"
},
"TypeRef": {
"type": "string"
},
"FieldName": {
"type": "string"
},
"BaseType": {
"type": "string",
"enum": ["Binary", "Boolean", "Integer", "Number", "String",
"Enumerated", "Choice",
"Array", "ArrayOf", "Map", "MapOf", "Record"]
},
"Options": {
"type": "array",
"items": {"type": "string"}
},
"Description": {
"type": "string"
}
}
}

0 comments on commit 9be7e7f

Please sign in to comment.