Skip to content

Instantly share code, notes, and snippets.

@runarorama
Last active October 21, 2020 14:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save runarorama/6b5fe0e0a30c20fa1404b29a010e9338 to your computer and use it in GitHub Desktop.
Save runarorama/6b5fe0e0a30c20fa1404b29a010e9338 to your computer and use it in GitHub Desktop.
{
"openapi": "3.0.0",
"info": {
"version": "",
"title": ""
},
"paths": {
"/list": {
"get": {
"parameters": [
{
"required": false,
"schema": {
"type": "string"
},
"in": "query",
"name": "namespace"
}
],
"responses": {
"200": {
"content": {
"application/json;charset=utf-8": {
"schema": {
"$ref": "#/components/schemas/NamespaceListing"
}
}
},
"description": ""
},
"400": {
"description": "Invalid `namespace`"
}
}
}
}
},
"components": {
"schemas": {
"NamespaceListing": {
"required": [
"namespaceListingName",
"namespaceListingHash",
"namespaceListingChildren"
],
"type": "object",
"properties": {
"namespaceListingChildren": {
"items": {
"$ref": "#/components/schemas/NamespaceObject"
},
"type": "array"
},
"namespaceListingHash": {
"type": "string"
},
"namespaceListingName": {
"type": "string"
}
}
},
"NamespaceObject": {
"oneOf": [
{
"required": [
"tag",
"contents"
],
"type": "object",
"properties": {
"tag": {
"type": "string",
"enum": [
"Subnamespace"
]
},
"contents": {
"$ref": "#/components/schemas/NamedNamespace"
}
}
},
{
"required": [
"tag",
"contents"
],
"type": "object",
"properties": {
"tag": {
"type": "string",
"enum": [
"TermObject"
]
},
"contents": {
"$ref": "#/components/schemas/NamedTerm"
}
}
},
{
"required": [
"tag",
"contents"
],
"type": "object",
"properties": {
"tag": {
"type": "string",
"enum": [
"TypeObject"
]
},
"contents": {
"$ref": "#/components/schemas/NamedType"
}
}
},
{
"required": [
"tag",
"contents"
],
"type": "object",
"properties": {
"tag": {
"type": "string",
"enum": [
"PatchObject"
]
},
"contents": {
"$ref": "#/components/schemas/NamedPatch"
}
}
}
],
"type": "object"
},
"NamedNamespace": {
"required": [
"namespaceName",
"namespaceSize"
],
"type": "object",
"properties": {
"namespaceName": {
"type": "string"
},
"namespaceSize": {
"maximum": 9223372036854776000,
"minimum": -9223372036854776000,
"type": "integer"
}
}
},
"NamedTerm": {
"required": [
"termName",
"termHash"
],
"type": "object",
"properties": {
"termName": {
"type": "string"
},
"termHash": {
"type": "string"
},
"termType": {
"type": "string"
}
}
},
"NamedType": {
"required": [
"typeName",
"typeHash"
],
"type": "object",
"properties": {
"typeName": {
"type": "string"
},
"typeHash": {
"type": "string"
}
}
},
"NamedPatch": {
"required": [
"patchName"
],
"type": "object",
"properties": {
"patchName": {
"type": "string"
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment