Go binary/server for helping run/build sessions for the Maze Rats TTRPG
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

439 lines
13 KiB

{
"swagger": "2.0",
"info": {
"title": "Maze Rats API",
"contact": {},
"license": {}
},
"basePath": "/",
"paths": {
"/api/character/{seed}": {
"get": {
"produces": [
"application/json",
" text/plain"
],
"tags": [
"character"
],
"summary": "Generate a specific player character using a seed",
"parameters": [
{
"type": "integer",
"description": "Int64",
"name": "seed",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/tables.Character"
}
}
}
}
},
"/api/city/{seed}": {
"get": {
"produces": [
"application/json",
" text/plain"
],
"tags": [
"city"
],
"summary": "Generate a specific city using a seed",
"parameters": [
{
"type": "integer",
"description": "Int64",
"name": "seed",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/tables.City"
}
}
}
}
},
"/api/generate/character": {
"get": {
"produces": [
"application/json",
" text/plain"
],
"tags": [
"character"
],
"summary": "Generate a player character",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/tables.Character"
}
}
}
}
},
"/api/generate/city": {
"get": {
"produces": [
"application/json",
" text/plain"
],
"tags": [
"city"
],
"summary": "Generate a city",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/tables.City"
}
}
}
}
},
"/api/generate/monster": {
"get": {
"produces": [
"application/json",
" text/plain"
],
"tags": [
"monster"
],
"summary": "Generate a monster",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/tables.Monster"
}
}
}
}
},
"/api/generate/name": {
"get": {
"produces": [
"application/json",
" text/plain"
],
"tags": [
"character"
],
"summary": "Generate a character name",
"responses": {
"200": {}
}
}
},
"/api/generate/spell": {
"get": {
"produces": [
"application/json",
" text/plain"
],
"tags": [
"magic"
],
"summary": "Generate a spell",
"responses": {
"200": {}
}
}
},
"/api/monster/{seed}": {
"get": {
"produces": [
"application/json",
" text/plain"
],
"tags": [
"monster"
],
"summary": "Generate a specific monster using a seed",
"parameters": [
{
"type": "integer",
"description": "Int64",
"name": "seed",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/tables.Monster"
}
}
}
}
},
"/api/roll/{xdy}": {
"get": {
"produces": [
"application/json",
" text/plain"
],
"tags": [
"dice"
],
"summary": "Roll some dice",
"parameters": [
{
"type": "string",
"description": "Roll in xdy format (e.g. 1d6)",
"name": "xdy",
"in": "path",
"required": true
}
],
"responses": {
"200": {}
}
}
}
},
"definitions": {
"tables.Building": {
"type": "object",
"properties": {
"rooms": {
"type": "array",
"items": {
"type": "string"
}
},
"tacticalFeature": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"tables.Character": {
"type": "object",
"properties": {
"appearance": {
"type": "string"
},
"background": {
"type": "string"
},
"clothing": {
"type": "string"
},
"feature": {
"type": "string"
},
"items": {
"type": "array",
"items": {
"type": "string"
}
},
"mannerism": {
"type": "string"
},
"name": {
"type": "string"
},
"personality": {
"type": "string"
},
"physical_detail": {
"type": "string"
},
"seed": {
"type": "integer"
},
"stats": {
"type": "object",
"$ref": "#/definitions/tables.CharacterStats"
},
"weapons": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"tables.CharacterStats": {
"type": "object",
"properties": {
"armor": {
"type": "integer"
},
"dex": {
"type": "integer"
},
"max_health": {
"type": "integer"
},
"str": {
"type": "integer"
},
"wil": {
"type": "integer"
}
}
},
"tables.City": {
"type": "object",
"properties": {
"activities": {
"type": "array",
"items": {
"type": "string"
}
},
"districtThemes": {
"type": "array",
"items": {
"type": "string"
}
},
"events": {
"type": "array",
"items": {
"type": "string"
}
},
"factions": {
"type": "array",
"items": {
"$ref": "#/definitions/tables.Faction"
}
},
"lowerClassBuildings": {
"type": "array",
"items": {
"$ref": "#/definitions/tables.Building"
}
},
"seed": {
"type": "integer"
},
"tacticalStreetFeatures": {
"type": "array",
"items": {
"type": "string"
}
},
"theme": {
"type": "string"
},
"upperClassBuildings": {
"type": "array",
"items": {
"$ref": "#/definitions/tables.Building"
}
}
}
},
"tables.Faction": {
"type": "object",
"properties": {
"goal": {
"type": "string"
},
"trait": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"tables.Monster": {
"type": "object",
"properties": {
"ability": {
"type": "string"
},
"base": {
"type": "string"
},
"feature": {
"type": "string"
},
"personality": {
"type": "string"
},
"seed": {
"type": "integer"
},
"stats": {
"type": "object",
"$ref": "#/definitions/tables.MonsterStats"
},
"tactics": {
"type": "string"
},
"trait": {
"type": "string"
},
"weakness": {
"type": "string"
}
}
},
"tables.MonsterStat": {
"type": "object",
"properties": {
"qualifier": {
"type": "string"
},
"value": {
"type": "integer"
}
}
},
"tables.MonsterStats": {
"type": "object",
"properties": {
"armor": {
"type": "object",
"$ref": "#/definitions/tables.MonsterStat"
},
"attack": {
"type": "object",
"$ref": "#/definitions/tables.MonsterStat"
},
"dex": {
"type": "object",
"$ref": "#/definitions/tables.MonsterStat"
},
"health": {
"type": "object",
"$ref": "#/definitions/tables.MonsterStat"
},
"str": {
"type": "object",
"$ref": "#/definitions/tables.MonsterStat"
},
"wil": {
"type": "object",
"$ref": "#/definitions/tables.MonsterStat"
}
}
}
}
}