Skip to content

Instantly share code, notes, and snippets.

@zgiber
Created January 22, 2020 20:32
Show Gist options
  • Save zgiber/0141e1eb1275532fe433d4612b7f647a to your computer and use it in GitHub Desktop.
Save zgiber/0141e1eb1275532fe433d4612b7f647a to your computer and use it in GitHub Desktop.
{
"swagger": "2.0",
"info": {
"title": "TGEN (The Game Engine) API documentation",
"version": "1.0"
},
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/api/v1/invitation": {
"post": {
"operationId": "CreateInvitation",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/CreateInvitationResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/CreateInvitationRequest"
}
}
],
"tags": [
"User"
],
"security": [
{
"ApiKeyAuth": []
}
]
}
},
"/api/v1/invitation/id/{invitationID}": {
"delete": {
"operationId": "CancelInvitation",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/CancelInvitationResponse"
}
}
},
"parameters": [
{
"name": "invitationID",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"User"
],
"security": [
{
"ApiKeyAuth": []
}
]
},
"post": {
"operationId": "AcceptInvitation",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/AcceptInvitationResponse"
}
}
},
"parameters": [
{
"name": "invitationID",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/AcceptInvitationRequest"
}
}
],
"tags": [
"User"
]
}
},
"/api/v1/invitation/list": {
"get": {
"operationId": "ListInvitations",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/ListInvitationsResponse"
}
}
},
"parameters": [
{
"name": "pageToken",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "pageSize",
"in": "query",
"required": false,
"type": "integer",
"format": "int32"
}
],
"tags": [
"User"
],
"security": [
{
"ApiKeyAuth": []
}
]
}
},
"/api/v1/login": {
"post": {
"operationId": "Login",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/LoginResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/LoginRequest"
}
}
],
"tags": [
"User"
]
}
},
"/api/v1/logout": {
"post": {
"operationId": "Logout",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/LogoutRequest"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/LogoutRequest"
}
}
],
"tags": [
"User"
],
"security": [
{
"ApiKeyAuth": []
}
]
}
}
},
"definitions": {
"AcceptInvitationRequest": {
"type": "object",
"properties": {
"invitationID": {
"type": "string"
},
"userName": {
"type": "string"
},
"password": {
"type": "string"
}
}
},
"AcceptInvitationResponse": {
"type": "object",
"properties": {
"userID": {
"type": "string"
}
}
},
"CancelInvitationResponse": {
"type": "object"
},
"CreateInvitationRequest": {
"type": "object"
},
"CreateInvitationResponse": {
"type": "object",
"properties": {
"invitationID": {
"type": "string"
}
}
},
"ListInvitationsResponse": {
"type": "object",
"properties": {
"invitationID": {
"type": "array",
"items": {
"$ref": "#/definitions/ListInvitationsResponseInvitation"
}
},
"nextPageToken": {
"type": "string"
}
}
},
"ListInvitationsResponseInvitation": {
"type": "object",
"properties": {
"invitationID": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"expiredAt": {
"type": "string",
"format": "date-time"
}
}
},
"LoginRequest": {
"type": "object",
"properties": {
"userName": {
"type": "string"
},
"password": {
"type": "string"
}
}
},
"LoginResponse": {
"type": "object",
"properties": {
"accessToken": {
"type": "string"
},
"expiredAt": {
"type": "string",
"format": "date-time"
}
}
},
"LogoutRequest": {
"type": "object"
}
},
"securityDefinitions": {
"ApiKeyAuth": {
"type": "apiKey",
"name": "Authorization",
"in": "header"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment