Skip to content

Commit

Permalink
feat: update schema files
Browse files Browse the repository at this point in the history
  • Loading branch information
bot-anik committed Sep 28, 2023
1 parent 4355eb8 commit 73d2344
Show file tree
Hide file tree
Showing 13 changed files with 1,218 additions and 67 deletions.
14 changes: 6 additions & 8 deletions schema/okp4-cognitarium/execute.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,12 @@
"type": "object",
"required": [
"delete",
"prefixes"
"prefixes",
"where"
],
"properties": {
"delete": {
"description": "The items to delete.",
"description": "Specifies the specific triple patterns to delete. If nothing is provided, the patterns from the `where` clause are used for deletion.",
"type": "array",
"items": {
"$ref": "#/definitions/TriplePattern"
Expand All @@ -72,11 +73,8 @@
}
},
"where": {
"description": "The WHERE clause to apply. If not provided, all the RDF triples are considered.",
"type": [
"array",
"null"
],
"description": "Defines the patterns that data (RDF triples) should match in order for it to be considered for deletion.",
"type": "array",
"items": {
"$ref": "#/definitions/WhereCondition"
}
Expand Down Expand Up @@ -283,7 +281,7 @@
},
"Prefix": {
"title": "Prefix",
"description": "Represents a prefix in a [SelectQuery]. A prefix is a shortcut for a namespace used in the query.",
"description": "Represents a prefix, i.e. a shortcut for a namespace used in a query.",
"type": "object",
"required": [
"namespace",
Expand Down
10 changes: 5 additions & 5 deletions schema/okp4-cognitarium/instantiate.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"type": "object",
"properties": {
"max_byte_size": {
"description": "The maximum number of bytes the store can contains. The size of a triple is counted as the sum of the size of its subject, predicate and object, including the size of data types and language tags if any. Default to [Uint128::MAX] if not set, which can be considered as no limit.",
"description": "The maximum number of bytes the store can contain. The size of a triple is counted as the sum of the size of its subject, predicate and object, including the size of data types and language tags if any. Default to [Uint128::MAX] if not set, which can be considered as no limit.",
"default": "340282366920938463463374607431768211455",
"allOf": [
{
Expand All @@ -39,7 +39,7 @@
]
},
"max_insert_data_byte_size": {
"description": "The maximum number of bytes an insert data query can contains. Default to [Uint128::MAX] if not set, which can be considered as no limit.",
"description": "The maximum number of bytes an insert data query can contain. Default to [Uint128::MAX] if not set, which can be considered as no limit.",
"default": "340282366920938463463374607431768211455",
"allOf": [
{
Expand All @@ -48,7 +48,7 @@
]
},
"max_insert_data_triple_count": {
"description": "The maximum number of triples an insert data query can contains (after parsing). Default to [Uint128::MAX] if not set, which can be considered as no limit.",
"description": "The maximum number of triples an insert data query can contain (after parsing). Default to [Uint128::MAX] if not set, which can be considered as no limit.",
"default": "340282366920938463463374607431768211455",
"allOf": [
{
Expand All @@ -71,7 +71,7 @@
"minimum": 0.0
},
"max_triple_byte_size": {
"description": "The maximum number of bytes the store can contains for a single triple. The size of a triple is counted as the sum of the size of its subject, predicate and object, including the size of data types and language tags if any. The limit is used to prevent storing very large triples, especially literals. Default to [Uint128::MAX] if not set, which can be considered as no limit.",
"description": "The maximum number of bytes the store can contain for a single triple. The size of a triple is counted as the sum of the size of its subject, predicate and object, including the size of data types and language tags if any. The limit is used to prevent storing very large triples, especially literals. Default to [Uint128::MAX] if not set, which can be considered as no limit.",
"default": "340282366920938463463374607431768211455",
"allOf": [
{
Expand All @@ -80,7 +80,7 @@
]
},
"max_triple_count": {
"description": "The maximum number of triples the store can contains. Default to [Uint128::MAX] if not set, which can be considered as no limit.",
"description": "The maximum number of triples the store can contain. Default to [Uint128::MAX] if not set, which can be considered as no limit.",
"default": "340282366920938463463374607431768211455",
"allOf": [
{
Expand Down
75 changes: 74 additions & 1 deletion schema/okp4-cognitarium/query.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,82 @@
}
},
"additionalProperties": false
},
{
"title": "Construct",
"description": "Returns the resources matching the criteria defined by the provided query as a set of RDF triples serialized in the provided format.",
"type": "object",
"required": [
"construct"
],
"properties": {
"construct": {
"type": "object",
"required": [
"query"
],
"properties": {
"format": {
"description": "The format in which the triples are serialized. If not provided, the default format is [Turtle](https://www.w3.org/TR/turtle/) format.",
"anyOf": [
{
"$ref": "#/definitions/DataFormat"
},
{
"type": "null"
}
]
},
"query": {
"description": "The query to execute.",
"allOf": [
{
"$ref": "#/definitions/ConstructQuery"
}
]
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
],
"definitions": {
"ConstructQuery": {
"title": "ConstructQuery",
"description": "Represents a CONSTRUCT query over the triple store, allowing to retrieve a set of triples serialized in a specific format.",
"type": "object",
"required": [
"construct",
"prefixes",
"where"
],
"properties": {
"construct": {
"description": "The triples to construct. If nothing is provided, the patterns from the `where` clause are used for construction.",
"type": "array",
"items": {
"$ref": "#/definitions/TriplePattern"
}
},
"prefixes": {
"description": "The prefixes used in the query.",
"type": "array",
"items": {
"$ref": "#/definitions/Prefix"
}
},
"where": {
"description": "The WHERE clause. This clause is used to specify the triples to construct using variable bindings.",
"type": "array",
"items": {
"$ref": "#/definitions/WhereCondition"
}
}
},
"additionalProperties": false
},
"DataFormat": {
"title": "DataFormat",
"description": "Represents the format in which the data are serialized, for example when returned by a query or when inserted in the store.",
Expand Down Expand Up @@ -305,7 +378,7 @@
},
"Prefix": {
"title": "Prefix",
"description": "Represents a prefix in a [SelectQuery]. A prefix is a shortcut for a namespace used in the query.",
"description": "Represents a prefix, i.e. a shortcut for a namespace used in a query.",
"type": "object",
"required": [
"namespace",
Expand Down
73 changes: 73 additions & 0 deletions schema/okp4-cognitarium/response_to_construct.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ConstructResponse",
"description": "Represents the response of a [QueryMsg::Construct] query.",
"type": "object",
"required": [
"data",
"format"
],
"properties": {
"data": {
"description": "The data serialized in the specified format.",
"allOf": [
{
"$ref": "#/definitions/Binary"
}
]
},
"format": {
"description": "The format of the data.",
"allOf": [
{
"$ref": "#/definitions/DataFormat"
}
]
}
},
"additionalProperties": false,
"definitions": {
"Binary": {
"description": "Binary is a wrapper around Vec<u8> to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec<u8>. See also <https://github.com/CosmWasm/cosmwasm/blob/main/docs/MESSAGE_TYPES.md>.",
"type": "string"
},
"DataFormat": {
"title": "DataFormat",
"description": "Represents the format in which the data are serialized, for example when returned by a query or when inserted in the store.",
"oneOf": [
{
"title": "RDF XML",
"description": "Output in [RDF/XML](https://www.w3.org/TR/rdf-syntax-grammar/) format.",
"type": "string",
"enum": [
"rdf_xml"
]
},
{
"title": "Turtle",
"description": "Output in [Turtle](https://www.w3.org/TR/turtle/) format.",
"type": "string",
"enum": [
"turtle"
]
},
{
"title": "N-Triples",
"description": "Output in [N-Triples](https://www.w3.org/TR/n-triples/) format.",
"type": "string",
"enum": [
"n_triples"
]
},
{
"title": "N-Quads",
"description": "Output in [N-Quads](https://www.w3.org/TR/n-quads/) format.",
"type": "string",
"enum": [
"n_quads"
]
}
]
}
}
}
10 changes: 5 additions & 5 deletions schema/okp4-cognitarium/response_to_store.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,23 +47,23 @@
],
"properties": {
"max_byte_size": {
"description": "The maximum number of bytes the store can contains. The size of a triple is counted as the sum of the size of its subject, predicate and object, including the size of data types and language tags if any.",
"description": "The maximum number of bytes the store can contain. The size of a triple is counted as the sum of the size of its subject, predicate and object, including the size of data types and language tags if any.",
"allOf": [
{
"$ref": "#/definitions/Uint128"
}
]
},
"max_insert_data_byte_size": {
"description": "The maximum number of bytes an insert data query can contains.",
"description": "The maximum number of bytes an insert data query can contain.",
"allOf": [
{
"$ref": "#/definitions/Uint128"
}
]
},
"max_insert_data_triple_count": {
"description": "The maximum number of triples an insert data query can contains (after parsing).",
"description": "The maximum number of triples an insert data query can contain (after parsing).",
"allOf": [
{
"$ref": "#/definitions/Uint128"
Expand All @@ -83,15 +83,15 @@
"minimum": 0.0
},
"max_triple_byte_size": {
"description": "The maximum number of bytes the store can contains for a single triple. The size of a triple is counted as the sum of the size of its subject, predicate and object, including the size of data types and language tags if any. The limit is used to prevent storing very large triples, especially literals.",
"description": "The maximum number of bytes the store can contain for a single triple. The size of a triple is counted as the sum of the size of its subject, predicate and object, including the size of data types and language tags if any. The limit is used to prevent storing very large triples, especially literals.",
"allOf": [
{
"$ref": "#/definitions/Uint128"
}
]
},
"max_triple_count": {
"description": "The maximum number of triples the store can contains.",
"description": "The maximum number of triples the store can contain.",
"allOf": [
{
"$ref": "#/definitions/Uint128"
Expand Down
8 changes: 8 additions & 0 deletions schema/okp4-objectarium/execute.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,14 @@
"enum": [
"snappy"
]
},
{
"title": "Lzma",
"description": "Represents the LZMA algorithm. LZMA is a lossless data compression/decompression algorithm that features a high compression ratio and a variable compression-dictionary size up to 4 GB.\n\nSee [the LZMA wiki page](https://en.wikipedia.org/wiki/Lempel%E2%80%93Ziv%E2%80%93Markov_chain_algorithm) for more information.",
"type": "string",
"enum": [
"lzma"
]
}
]
}
Expand Down
16 changes: 13 additions & 3 deletions schema/okp4-objectarium/instantiate.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"default": {
"accepted_compression_algorithms": [
"passthrough",
"snappy"
"snappy",
"lzma"
],
"hash_algorithm": "sha256"
},
Expand Down Expand Up @@ -63,7 +64,8 @@
"description": "The acceptable compression algorithms for the objects in the bucket. If this parameter is not set (none or empty array), then all compression algorithms are accepted. If this parameter is set, then only the compression algorithms in the array are accepted.\n\nWhen an object is stored in the bucket without a specified compression algorithm, the first algorithm in the array is used. Therefore, the order of the algorithms in the array is significant. Typically, the most efficient compression algorithm, such as the NoCompression algorithm, should be placed first in the array.\n\nAny attempt to store an object using a different compression algorithm than the ones specified here will fail.",
"default": [
"passthrough",
"snappy"
"snappy",
"lzma"
],
"type": "array",
"items": {
Expand Down Expand Up @@ -151,6 +153,14 @@
"enum": [
"snappy"
]
},
{
"title": "Lzma",
"description": "Represents the LZMA algorithm. LZMA is a lossless data compression/decompression algorithm that features a high compression ratio and a variable compression-dictionary size up to 4 GB.\n\nSee [the LZMA wiki page](https://en.wikipedia.org/wiki/Lempel%E2%80%93Ziv%E2%80%93Markov_chain_algorithm) for more information.",
"type": "string",
"enum": [
"lzma"
]
}
]
},
Expand Down Expand Up @@ -211,7 +221,7 @@
"minimum": 0.0
},
"max_page_size": {
"description": "The maximum elements a page can contains.\n\nShall be less than `u32::MAX - 1`. Default to '30' if not set.",
"description": "The maximum elements a page can contain.\n\nShall be less than `u32::MAX - 1`. Default to '30' if not set.",
"default": 30,
"type": "integer",
"format": "uint32",
Expand Down
13 changes: 11 additions & 2 deletions schema/okp4-objectarium/response_to_bucket.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
"description": "The acceptable compression algorithms for the objects in the bucket. If this parameter is not set (none or empty array), then all compression algorithms are accepted. If this parameter is set, then only the compression algorithms in the array are accepted.\n\nWhen an object is stored in the bucket without a specified compression algorithm, the first algorithm in the array is used. Therefore, the order of the algorithms in the array is significant. Typically, the most efficient compression algorithm, such as the NoCompression algorithm, should be placed first in the array.\n\nAny attempt to store an object using a different compression algorithm than the ones specified here will fail.",
"default": [
"passthrough",
"snappy"
"snappy",
"lzma"
],
"type": "array",
"items": {
Expand Down Expand Up @@ -137,6 +138,14 @@
"enum": [
"snappy"
]
},
{
"title": "Lzma",
"description": "Represents the LZMA algorithm. LZMA is a lossless data compression/decompression algorithm that features a high compression ratio and a variable compression-dictionary size up to 4 GB.\n\nSee [the LZMA wiki page](https://en.wikipedia.org/wiki/Lempel%E2%80%93Ziv%E2%80%93Markov_chain_algorithm) for more information.",
"type": "string",
"enum": [
"lzma"
]
}
]
},
Expand Down Expand Up @@ -197,7 +206,7 @@
"minimum": 0.0
},
"max_page_size": {
"description": "The maximum elements a page can contains.\n\nShall be less than `u32::MAX - 1`. Default to '30' if not set.",
"description": "The maximum elements a page can contain.\n\nShall be less than `u32::MAX - 1`. Default to '30' if not set.",
"default": 30,
"type": "integer",
"format": "uint32",
Expand Down

0 comments on commit 73d2344

Please sign in to comment.