Skip to content

Commit

Permalink
Added query for subnets and verse metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
cyborgshead committed May 18, 2024
1 parent 84d5302 commit 56eec35
Show file tree
Hide file tree
Showing 7 changed files with 396 additions and 13 deletions.
178 changes: 173 additions & 5 deletions schema/cybernet.json
Original file line number Diff line number Diff line change
Expand Up @@ -2489,10 +2489,64 @@
{
"type": "object",
"required": [
"get_verse_type"
"get_subnet_metadata"
],
"properties": {
"get_verse_type": {
"get_subnet_metadata": {
"type": "object",
"required": [
"netuid"
],
"properties": {
"netuid": {
"type": "integer",
"format": "uint16",
"minimum": 0.0
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"get_subnets_metadata"
],
"properties": {
"get_subnets_metadata": {
"type": "object",
"properties": {
"limit": {
"type": [
"integer",
"null"
],
"format": "uint16",
"minimum": 0.0
},
"start_after": {
"type": [
"integer",
"null"
],
"format": "uint16",
"minimum": 0.0
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"get_verse_metadata"
],
"properties": {
"get_verse_metadata": {
"type": "object",
"additionalProperties": false
}
Expand Down Expand Up @@ -6310,6 +6364,39 @@
}
}
},
"get_subnet_metadata": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Metadata",
"type": "object",
"required": [
"description",
"extra",
"logo",
"name",
"particle",
"types"
],
"properties": {
"description": {
"type": "string"
},
"extra": {
"type": "string"
},
"logo": {
"type": "string"
},
"name": {
"type": "string"
},
"particle": {
"type": "string"
},
"types": {
"type": "string"
}
}
},
"get_subnet_owner": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Nullable_String",
Expand Down Expand Up @@ -6469,6 +6556,59 @@
}
}
},
"get_subnets_metadata": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Array_of_Tuple_of_uint16_and_Metadata",
"type": "array",
"items": {
"type": "array",
"items": [
{
"type": "integer",
"format": "uint16",
"minimum": 0.0
},
{
"$ref": "#/definitions/Metadata"
}
],
"maxItems": 2,
"minItems": 2
},
"definitions": {
"Metadata": {
"type": "object",
"required": [
"description",
"extra",
"logo",
"name",
"particle",
"types"
],
"properties": {
"description": {
"type": "string"
},
"extra": {
"type": "string"
},
"logo": {
"type": "string"
},
"name": {
"type": "string"
},
"particle": {
"type": "string"
},
"types": {
"type": "string"
}
}
}
}
},
"get_tempo": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Nullable_uint16",
Expand Down Expand Up @@ -6537,10 +6677,38 @@
"format": "uint16",
"minimum": 0.0
},
"get_verse_type": {
"get_verse_metadata": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "String",
"type": "string"
"title": "Metadata",
"type": "object",
"required": [
"description",
"extra",
"logo",
"name",
"particle",
"types"
],
"properties": {
"description": {
"type": "string"
},
"extra": {
"type": "string"
},
"logo": {
"type": "string"
},
"name": {
"type": "string"
},
"particle": {
"type": "string"
},
"types": {
"type": "string"
}
}
},
"get_weights": {
"$schema": "http://json-schema.org/draft-07/schema#",
Expand Down
58 changes: 56 additions & 2 deletions schema/raw/query.json
Original file line number Diff line number Diff line change
Expand Up @@ -855,10 +855,64 @@
{
"type": "object",
"required": [
"get_verse_type"
"get_subnet_metadata"
],
"properties": {
"get_verse_type": {
"get_subnet_metadata": {
"type": "object",
"required": [
"netuid"
],
"properties": {
"netuid": {
"type": "integer",
"format": "uint16",
"minimum": 0.0
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"get_subnets_metadata"
],
"properties": {
"get_subnets_metadata": {
"type": "object",
"properties": {
"limit": {
"type": [
"integer",
"null"
],
"format": "uint16",
"minimum": 0.0
},
"start_after": {
"type": [
"integer",
"null"
],
"format": "uint16",
"minimum": 0.0
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"get_verse_metadata"
],
"properties": {
"get_verse_metadata": {
"type": "object",
"additionalProperties": false
}
Expand Down
33 changes: 33 additions & 0 deletions schema/raw/response_to_get_subnet_metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Metadata",
"type": "object",
"required": [
"description",
"extra",
"logo",
"name",
"particle",
"types"
],
"properties": {
"description": {
"type": "string"
},
"extra": {
"type": "string"
},
"logo": {
"type": "string"
},
"name": {
"type": "string"
},
"particle": {
"type": "string"
},
"types": {
"type": "string"
}
}
}
53 changes: 53 additions & 0 deletions schema/raw/response_to_get_subnets_metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Array_of_Tuple_of_uint16_and_Metadata",
"type": "array",
"items": {
"type": "array",
"items": [
{
"type": "integer",
"format": "uint16",
"minimum": 0.0
},
{
"$ref": "#/definitions/Metadata"
}
],
"maxItems": 2,
"minItems": 2
},
"definitions": {
"Metadata": {
"type": "object",
"required": [
"description",
"extra",
"logo",
"name",
"particle",
"types"
],
"properties": {
"description": {
"type": "string"
},
"extra": {
"type": "string"
},
"logo": {
"type": "string"
},
"name": {
"type": "string"
},
"particle": {
"type": "string"
},
"types": {
"type": "string"
}
}
}
}
}
33 changes: 33 additions & 0 deletions schema/raw/response_to_get_verse_metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Metadata",
"type": "object",
"required": [
"description",
"extra",
"logo",
"name",
"particle",
"types"
],
"properties": {
"description": {
"type": "string"
},
"extra": {
"type": "string"
},
"logo": {
"type": "string"
},
"name": {
"type": "string"
},
"particle": {
"type": "string"
},
"types": {
"type": "string"
}
}
}
Loading

0 comments on commit 56eec35

Please sign in to comment.