diff --git a/setup/fuzzer/speckle-server.openapi.json b/setup/fuzzer/speckle-server.openapi.json index dd47a0a9e3..eaf968b3bd 100644 --- a/setup/fuzzer/speckle-server.openapi.json +++ b/setup/fuzzer/speckle-server.openapi.json @@ -30,7 +30,20 @@ "responses": { "200": { "description": "User logged in successfully" }, "400": { "description": "Invalid input" }, - "401": { "description": "Invalid credentials" } + "401": { + "description": "Invalid credentials", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "err": { "type": "boolean" }, + "message": { "type": "string" } + } + } + } + } + } } } }, @@ -44,11 +57,36 @@ "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "email": { "type": "string", "format": "email" }, + "password": { "type": "string" } + }, + "required": ["email", "password"] + } + } + } + }, "description": "Register with email and password", "responses": { "200": { "description": "User registered successfully" }, - "400": { "description": "Invalid input" }, - "500": { "description": "Server error" } + "400": { + "description": "Invalid input", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "err": { "type": "string" } + } + } + } + } + } } } }, @@ -66,7 +104,16 @@ "responses": { "200": { "description": "Returns an access code in the body" }, "302": { "description": "Redirects with access code in url query" }, - "400": { "description": "Invalid access code, or the app does not exist" }, + "400": { + "description": "Invalid access code, or the app does not exist", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + } + }, "500": { "description": "Internal error" } } }, @@ -99,7 +146,19 @@ }, "responses": { "200": { "description": "Generates a new API token" }, - "401": { "description": "Unauthorized" } + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "err": { "type": "string" } + } + } + } + } + } } } }, @@ -108,7 +167,14 @@ "description": "Logs a user out by invalidating token and refresh token", "responses": { "200": { "description": "Successfully logged out" }, - "400": { "description": "Error while logging out" } + "400": { + "description": "Error while logging out", + "content": { + "text/html": { + "schema": { "type": "string" } + } + } + } } } }, @@ -127,7 +193,21 @@ "200": { "description": "Successfully uploaded a blob to the project" }, - "404": { "description": "Stream could not be found" } + "404": { + "description": "Stream could not be found", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } } } }, @@ -155,6 +235,21 @@ "responses": { "200": { "description": "The difference between the list of blob Ids provided in the body of the request and those stored on the server" + }, + "404": { + "description": "Stream could not be found", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "string" + } + } + } + } + } } } } @@ -190,7 +285,21 @@ "204": { "description": "Successfully deleted a blob from the project" }, - "404": { "description": "Stream or blob could not be found." } + "404": { + "description": "Stream or blob could not be found.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } } } }, @@ -210,7 +319,17 @@ "description": "Successfully retrieved all the blobs from the project" }, "401": { "description": "Unauthorized" }, - "404": { "description": "Stream could not be found." } + "404": { + "description": "Stream could not be found.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { "error": { "type": "string" } } + } + } + } + } } }, "delete": { @@ -218,10 +337,25 @@ "responses": { "501": { "description": "Not implemented." } } } }, - "/static/": { + "/static": { "get": { "description": "Static assets", - "responses": { "200": { "description": "An asset was retrieved." } } + "responses": { + "200": { "description": "An asset was retrieved." }, + "301": { + "description": "Redirects to the home page.", + "headers": { + "Location": { + "schema": { "type": "string", "format": "uri" } + } + }, + "content": { + "text/html": { + "schema": { "type": "string" } + } + } + } + } } }, "/liveness": { @@ -290,7 +424,8 @@ "description": "Download objects from a project (stream)", "responses": { "200": { "description": "Objects were downloaded." }, - "401": { "description": "Unauthorized" } + "401": { "description": "Unauthorized" }, + "404": { "description": "Stream or Object was not found." } } } }, @@ -317,7 +452,8 @@ "description": "Options for downloading a single object from a project (stream)", "responses": { "200": { "description": "An object was retrieved." }, - "401": { "description": "Unauthorized" } + "401": { "description": "Unauthorized" }, + "404": { "description": "Stream or Object was not found" } } } }, @@ -351,319 +487,404 @@ }, "responses": { "200": { "description": "A diff was successfully computed." }, - "401": { "description": "Unauthorized" } - } - } - }, - "/api/getobjects/{streamId}": { - "parameters": [ - { - "in": "path", - "name": "streamId", - "required": true, - "schema": { "type": "string" } - } - ], - "options": { - "description": "Options for the endpoint", - "responses": { "200": { "description": "Options were retrieved." } } - }, - "post": { - "description": "Get all objects for a project (stream)", - "responses": { - "200": { "description": "All objects were successfully retrieved." }, - "401": { "description": "Unauthorized" } - } - } - }, - "/auth/verifyemail": { - "get": { - "summary": "Verify email", - "description": "Verifies an email address", - "responses": { - "302": { - "description": "Redirects to the home page.", + "401": { + "description": "Unauthorized", "headers": { - "Location": { - "schema": { "type": "string" } - } - }, - "parameters": [ - { - "in": "query", - "name": "emailverifiederror", - "schema": { "type": "string" } + "X-RateLimit-Remaining": { + "schema": { "type": "integer" } } - ] + } } } - } - }, - "/api/file/{fileType}/{streamId}/{branchName}": { - "parameters": [ - { - "in": "path", - "name": "fileType", - "required": true, - "schema": { - "oneOf": [ - { "type": "string" }, - { "type": "string", "enum": ["autodetect"] } - ] + }, + "/api/getobjects/{streamId}": { + "parameters": [ + { + "in": "path", + "name": "streamId", + "required": true, + "schema": { "type": "string" } } + ], + "options": { + "description": "Options for the endpoint", + "responses": { "200": { "description": "Options were retrieved." } } }, - { - "in": "path", - "name": "streamId", - "required": true, - "schema": { "type": "string" } - }, - { - "in": "path", - "name": "branchName", - "required": true, - "schema": { "type": "string" } + "post": { + "description": "Get all objects for a project (stream)", + "responses": { + "200": { "description": "All objects were successfully retrieved." }, + "401": { "description": "Unauthorized" }, + "404": { + "description": "Stream was not found.", + "headers": { + "X-RateLimit-Remaining": { + "schema": { "type": "integer" } + } + } + } + } } - ], - "post": { - "description": "Uploads a file to a project (stream)", - "responses": { - "200": { - "description": "file successfully uploaded to the project (stream)" - }, - "404": { - "description": "Stream or branch could not be found." + }, + "/auth/verifyemail": { + "get": { + "summary": "Verify email", + "description": "Verifies an email address", + "parameters": [ + { + "in": "query", + "name": "t", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "302": { + "description": "Redirects to the home page.", + "headers": { + "Location": { + "schema": { "type": "string", "format": "uri" } + } + } + } } } - } - }, - "/metrics": { - "get": { - "summary": "Metrics", - "description": "Returns Prometheus metrics", - "responses": { "200": { "description": "Returns Prometheus metrics" } } - } - }, - "/preview/{streamId}/{angle}": { - "parameters": [ - { - "in": "path", - "name": "streamId", - "required": true, - "schema": { "type": "string" } - }, - { - "in": "path", - "name": "angle", - "required": true, - "schema": { - "oneOf": [ - { "type": "integer", "minimum": 0 }, - { "type": "string", "enum": ["all"] } - ] + }, + "/api/file/{fileType}/{streamId}/{branchName}": { + "parameters": [ + { + "in": "path", + "name": "fileType", + "required": true, + "schema": { + "oneOf": [ + { "type": "string" }, + { "type": "string", "enum": ["autodetect"] } + ] + } + }, + { + "in": "path", + "name": "streamId", + "required": true, + "schema": { "type": "string" } + }, + { + "in": "path", + "name": "branchName", + "required": true, + "schema": { "type": "string" } + } + ], + "post": { + "description": "Uploads a file to a project (stream)", + "responses": { + "200": { + "description": "file successfully uploaded to the project (stream)" + }, + "404": { + "description": "Stream or branch could not be found.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "string" + } + } + } + } + } + } } } - ], - "options": { - "description": "Options for the endpoint", - "responses": { - "200": { "description": "Options successfully retrieved." } + }, + "/metrics": { + "get": { + "summary": "Metrics", + "description": "Returns Prometheus metrics", + "responses": { "200": { "description": "Returns Prometheus metrics" } } } }, - "get": { - "description": "Retrieve a preview for the project (stream), at an optional angle", - "responses": { - "200": { - "description": "A preview was successfully retrieved.", - "content": { - "image/png": { - "schema": { "type": "string", "format": "binary" } + "/preview/{streamId}/{angle}": { + "parameters": [ + { + "in": "path", + "name": "streamId", + "required": true, + "schema": { "type": "string" } + }, + { + "in": "path", + "name": "angle", + "required": true, + "schema": { + "oneOf": [ + { "type": "integer", "minimum": 0 }, + { "type": "string", "enum": ["all"] } + ] + } + } + ], + "options": { + "description": "Options for the endpoint", + "responses": { + "200": { "description": "Options successfully retrieved." } + } + }, + "get": { + "description": "Retrieve a preview for the project (stream), at an optional angle", + "responses": { + "200": { + "description": "A preview was successfully retrieved.", + "content": { + "image/png": { + "schema": { "type": "string", "format": "binary" } + } } } } } - } - }, - "/preview/{streamId}/branches/{branchName}/{angle}": { - "parameters": [ - { - "in": "path", - "name": "streamId", - "required": true, - "schema": { "type": "string" } - }, - { - "in": "path", - "name": "branchName", - "required": true, - "schema": { "type": "string" } + }, + "/preview/{streamId}/branches/{branchName}/{angle}": { + "parameters": [ + { + "in": "path", + "name": "streamId", + "required": true, + "schema": { "type": "string" } + }, + { + "in": "path", + "name": "branchName", + "required": true, + "schema": { "type": "string" } + }, + { + "in": "path", + "name": "angle", + "required": true, + "schema": { + "oneOf": [ + { "type": "integer", "minimum": 0 }, + { "type": "string", "enum": ["all"] } + ] + } + } + ], + "options": { + "description": "Options for the endpoint", + "responses": { + "200": { "description": "Options successfully retrieved." } + } }, - { - "in": "path", - "name": "angle", - "required": true, - "schema": { - "oneOf": [ - { "type": "integer", "minimum": 0 }, - { "type": "string", "enum": ["all"] } - ] + "get": { + "description": "Retrieve a preview for the project (stream) and model (branch), at an optional angle", + "responses": { + "200": { + "description": "A preview was successfully retrieved.", + "content": { + "image/png": { + "schema": { "type": "string", "format": "binary" } + } + } + } } } - ], - "options": { - "description": "Options for the endpoint", - "responses": { - "200": { "description": "Options successfully retrieved." } - } }, - "get": { - "description": "Retrieve a preview for the project (stream) and model (branch), at an optional angle", - "responses": { - "200": { - "description": "A preview was successfully retrieved.", - "content": { - "image/png": { - "schema": { "type": "string", "format": "binary" } + "/preview/{streamId}/commits/{commitId}/{angle}": { + "parameters": [ + { + "in": "path", + "name": "streamId", + "required": true, + "schema": { "type": "string" } + }, + { + "in": "path", + "name": "commitId", + "required": true, + "schema": { "type": "string" } + }, + { + "in": "path", + "name": "angle", + "required": true, + "schema": { + "oneOf": [ + { "type": "integer", "minimum": 0 }, + { "type": "string", "enum": ["all"] } + ] + } + } + ], + "options": { + "description": "Options for the endpoint", + "responses": { + "200": { "description": "Options successfully retrieved." } + } + }, + "get": { + "description": "Retrieve a preview for the project (stream) and version (commit), at an optional angle", + "responses": { + "200": { + "description": "A preview was successfully retrieved.", + "content": { + "image/png": { + "schema": { "type": "string", "format": "binary" } + } } } } } - } - }, - "/preview/{streamId}/commits/{commitId}/{angle}": { - "parameters": [ - { - "in": "path", - "name": "streamId", - "required": true, - "schema": { "type": "string" } - }, - { - "in": "path", - "name": "commitId", - "required": true, - "schema": { "type": "string" } + }, + "/preview/{streamId}/objects/{objectId}/{angle}": { + "parameters": [ + { + "in": "path", + "name": "streamId", + "required": true, + "schema": { "type": "string" } + }, + { + "in": "path", + "name": "objectId", + "required": true, + "schema": { "type": "string" } + }, + { + "in": "path", + "name": "angle", + "schema": { + "oneOf": [ + { "type": "integer", "minimum": 0, "maximum": 360 }, + { "type": "string", "enum": ["all"] } + ] + } + } + ], + "options": { + "description": "Options for the endpoint", + "responses": { + "200": { "description": "Options successfully retrieved." } + } }, - { - "in": "path", - "name": "angle", - "required": true, - "schema": { - "oneOf": [ - { "type": "integer", "minimum": 0 }, - { "type": "string", "enum": ["all"] } - ] + "get": { + "description": "Retrieve a preview for the project (stream) and object, at an optional angle", + "responses": { + "200": { + "description": "A preview was successfully retrieved.", + "content": { + "image/png": { + "schema": { "type": "string", "format": "binary" } + } + } + }, + "403": { "description": "Forbidden" } } } - ], - "options": { - "description": "Options for the endpoint", - "responses": { - "200": { "description": "Options successfully retrieved." } - } }, - "get": { - "description": "Retrieve a preview for the project (stream) and version (commit), at an optional angle", - "responses": { - "200": { - "description": "A preview was successfully retrieved.", + "/auth/pwdreset/request": { + "post": { + "description": "Reset a password", + "requestBody": { "content": { - "image/png": { - "schema": { "type": "string", "format": "binary" } + "application/json": { + "schema": { + "type": "object", + "properties": { + "email": { "type": "string", "format": "email" } + }, + "required": ["email"] + } + } + } + }, + "responses": { + "200": { + "description": "The password reset workflow was successfully started." + }, + "400": { + "description": "Invalid input", + "content": { + "text/html": { + "schema": { "type": "string" } + } } } } } - } - }, - "/preview/{streamId}/objects/{objectId}/{angle}": { - "parameters": [ - { - "in": "path", - "name": "streamId", - "required": true, - "schema": { "type": "string" } - }, - { - "in": "path", - "name": "objectId", - "required": true, - "schema": { "type": "string" } - }, - { - "in": "path", - "name": "angle", - "schema": { - "oneOf": [ - { "type": "integer", "minimum": 0, "maximum": 360 }, - { "type": "string", "enum": ["all"] } - ] - } - } - ], - "options": { - "description": "Options for the endpoint", - "responses": { - "200": { "description": "Options successfully retrieved." } - } }, - "get": { - "description": "Retrieve a preview for the project (stream) and object, at an optional angle", - "responses": { - "200": { - "description": "A preview was successfully retrieved.", + "/auth/pwdreset/finalize": { + "post": { + "description": "Finish resetting a password", + "requestBody": { "content": { - "image/png": { - "schema": { "type": "string", "format": "binary" } + "application/json": { + "schema": { + "type": "object", + "properties": { + "tokenId": { "type": "string" }, + "password": { "type": "string" } + }, + "required": ["tokenId", "password"] + } } } }, - "403": { "description": "Forbidden" } - } - } - }, - "/auth/pwdreset/request": { - "post": { - "description": "Reset a password", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "email": { "type": "string", "format": "email" } - }, - "required": ["email"] + "responses": { + "200": { "description": "The password was successfully reset." }, + "400": { + "description": "Invalid input", + "content": { + "text/html": { + "schema": { "type": "string" } + } } } } - }, - "responses": { - "200": { - "description": "The password reset workflow was successfully started." - }, - "400": { "description": "Invalid input" } - } - } - }, - "/auth/pwdreset/finalize": { - "post": { - "description": "Finish resetting a password", - "responses": { - "200": { "description": "The password was successfully reset." } } - } - }, - "/graphql": { - "post": { - "requestBody": { - "content": { - "application/json": {} + }, + "/graphql": { + "post": { + "requestBody": { + "content": { + "application/json": {} + } + }, + "summary": "GraphQL", + "description": "GraphQL endpoint", + "responses": { + "400": { + "description": "Invalid input", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "message": { "type": "string" }, + "extensions": { + "type": "object", + "properties": { + "code": { "type": "string" } + } + } + } + } + } + } + } + } + } + } } - }, - "summary": "GraphQL", - "description": "GraphQL endpoint", - "responses": { "default": { "description": "GraphQL endpoint" } } + } } } }