diff --git a/.github/workflows/rest-api-fuzzer.yml b/.github/workflows/rest-api-fuzzer.yml index 0c8c31ca85..4737c4fa4e 100644 --- a/.github/workflows/rest-api-fuzzer.yml +++ b/.github/workflows/rest-api-fuzzer.yml @@ -138,9 +138,10 @@ jobs: ${{ github.workspace }}/bin/restler/Restler compile ${{ github.workspace }}/speckle-server/setup/fuzzer/config.restler.json - name: Print the contents of the Restler compile directory + if: always() run: | - ls -la ${{ github.workspace }} - ls -la ${{ github.workspace }}/Compile + ls -la ${{ github.workspace }} || true + ls -la ${{ github.workspace }}/Compile || true - name: Save Grammar id: cache-grammar-save diff --git a/setup/fuzzer/speckle-server.openapi.json b/setup/fuzzer/speckle-server.openapi.json index eaf968b3bd..e7f6818bf2 100644 --- a/setup/fuzzer/speckle-server.openapi.json +++ b/setup/fuzzer/speckle-server.openapi.json @@ -1,11 +1,10 @@ { - "swagger": "3.1.1", - "basePath": "/", - "info": { "title": "Speckle.", "version": "dev" }, - "definitions": {}, - "servers": [ - { "url": "http://localhost:3000", "description": "Development and Testing server" } - ], + "openapi": "3.1.1", + "info": { + "title": "Speckle.", + "version": "dev", + "license": { "name": "Apache 2.0" } + }, "paths": { "/explorer": { "get": { @@ -18,6 +17,7 @@ }, "/auth/local/login": { "post": { + "summary": "Login with email and password", "parameters": [ { "in": "query", @@ -26,7 +26,6 @@ "schema": { "type": "string" } } ], - "description": "Login with email and password", "responses": { "200": { "description": "User logged in successfully" }, "400": { "description": "Invalid input" }, @@ -71,7 +70,7 @@ } } }, - "description": "Register with email and password", + "summary": "Register with email and password", "responses": { "200": { "description": "User registered successfully" }, "400": { @@ -496,102 +495,102 @@ } } } + } + }, + "/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." } } }, - "/api/getobjects/{streamId}": { + "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" } + } + } + } + } + } + }, + "/auth/verifyemail": { + "get": { + "summary": "Verify email", + "description": "Verifies an email address", "parameters": [ { - "in": "path", - "name": "streamId", + "in": "query", + "name": "t", "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" }, - "404": { - "description": "Stream was not found.", - "headers": { - "X-RateLimit-Remaining": { - "schema": { "type": "integer" } - } + "responses": { + "302": { + "description": "Redirects to the home page.", + "headers": { + "Location": { + "schema": { "type": "string", "format": "uri" } } } } } - }, - "/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" } - } - } - } + } + }, + "/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" } } - }, - "/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" } + ], + "post": { + "description": "Uploads a file to a project (stream)", + "responses": { + "200": { + "description": "file successfully uploaded to the project (stream)" }, - { - "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" - } + "404": { + "description": "Stream or branch could not be found.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "string" } } } @@ -599,281 +598,281 @@ } } } - }, - "/metrics": { - "get": { - "summary": "Metrics", - "description": "Returns Prometheus metrics", - "responses": { "200": { "description": "Returns Prometheus metrics" } } + } + }, + "/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"] } + ] + } + } + ], + "options": { + "description": "Options for the endpoint", + "responses": { + "200": { "description": "Options successfully retrieved." } } }, - "/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"] } - ] + "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" } + } } } - ], - "options": { - "description": "Options for the endpoint", - "responses": { - "200": { "description": "Options successfully retrieved." } - } + } + } + }, + "/preview/{streamId}/branches/{branchName}/{angle}": { + "parameters": [ + { + "in": "path", + "name": "streamId", + "required": true, + "schema": { "type": "string" } }, - "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" } - } - } - } + { + "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." } + } }, - "/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"] } - ] + "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." } - } + } + } + }, + "/preview/{streamId}/commits/{commitId}/{angle}": { + "parameters": [ + { + "in": "path", + "name": "streamId", + "required": true, + "schema": { "type": "string" } }, - "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" } - } - } - } + { + "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." } + } }, - "/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"] } - ] + "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" } + } } } - ], - "options": { - "description": "Options for the endpoint", - "responses": { - "200": { "description": "Options successfully retrieved." } - } + } + } + }, + "/preview/{streamId}/objects/{objectId}/{angle}": { + "parameters": [ + { + "in": "path", + "name": "streamId", + "required": true, + "schema": { "type": "string" } }, - "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" } - } - } - } + { + "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." } + } }, - "/preview/{streamId}/objects/{objectId}/{angle}": { - "parameters": [ - { - "in": "path", - "name": "streamId", - "required": true, - "schema": { "type": "string" } - }, - { - "in": "path", - "name": "objectId", - "required": true, - "schema": { "type": "string" } + "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" } + } + } }, - { - "in": "path", - "name": "angle", - "schema": { - "oneOf": [ - { "type": "integer", "minimum": 0, "maximum": 360 }, - { "type": "string", "enum": ["all"] } - ] + "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"] + } } } - ], - "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.", - "content": { - "image/png": { - "schema": { "type": "string", "format": "binary" } - } + "responses": { + "200": { + "description": "The password reset workflow was successfully started." + }, + "400": { + "description": "Invalid input", + "content": { + "text/html": { + "schema": { "type": "string" } } - }, - "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"] - } + } + }, + "/auth/pwdreset/finalize": { + "post": { + "description": "Finish resetting a password", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "tokenId": { "type": "string" }, + "password": { "type": "string" } + }, + "required": ["tokenId", "password"] } } - }, - "responses": { - "200": { - "description": "The password reset workflow was successfully started." - }, - "400": { - "description": "Invalid input", - "content": { - "text/html": { - "schema": { "type": "string" } - } + } + }, + "responses": { + "200": { "description": "The password was successfully reset." }, + "400": { + "description": "Invalid input", + "content": { + "text/html": { + "schema": { "type": "string" } } } } } - }, - "/auth/pwdreset/finalize": { - "post": { - "description": "Finish resetting a password", - "requestBody": { + } + }, + "/graphql": { + "post": { + "requestBody": { + "content": { + "application/json": {} + } + }, + "summary": "GraphQL", + "description": "GraphQL endpoint", + "responses": { + "400": { + "description": "Invalid input", "content": { "application/json": { "schema": { "type": "object", "properties": { - "tokenId": { "type": "string" }, - "password": { "type": "string" } - }, - "required": ["tokenId", "password"] - } - } - } - }, - "responses": { - "200": { "description": "The password was successfully reset." }, - "400": { - "description": "Invalid input", - "content": { - "text/html": { - "schema": { "type": "string" } - } - } - } - } - } - }, - "/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" } - } + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "message": { "type": "string" }, + "extensions": { + "type": "object", + "properties": { + "code": { "type": "string" } } } }