From 2ea2a06364f42cbb75afbebdc30efb5d683a7081 Mon Sep 17 00:00:00 2001 From: bglamadrid Date: Thu, 15 Aug 2024 23:28:45 -0400 Subject: [PATCH] chore!: remove auth related endpoints these were - `/public/guest` - `/public/register` - `/public/login` - `/access` - `/access/{resource}` along went some tags no longer used - `authorization` - `session` --- CHANGELOG.md | 10 ++ src/trebol-api.json | 242 -------------------------------------------- 2 files changed, 10 insertions(+), 242 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d9b5c44..1a52d62 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Endpoints `/data/customers` and `/data/salespeople` - Schemas `Customer` and `Salesperson` - Tags `customers` and `salespeople` +- [BREAKING CHANGE] Auth-related resources + - Paths + - `/public/guest` + - `/public/register` + - `/public/login` + - `/access` + - `/access/{resource}` + - Unusedd tags + - `authorization` + - `session` ## [v1.7.3] - 2024-03-11 diff --git a/src/trebol-api.json b/src/trebol-api.json index 1c7cf1a..a9be7e4 100644 --- a/src/trebol-api.json +++ b/src/trebol-api.json @@ -14,9 +14,6 @@ } }, "tags": [ - { - "name": "authorization" - }, { "name": "preflight" }, @@ -29,9 +26,6 @@ { "name": "account" }, - { - "name": "session" - }, { "name": "create" }, @@ -82,95 +76,6 @@ } ], "paths": { - "/access": { - "summary": "Allowed (authorized) access to API routes", - "description": "Operation that hints the API consumer on what paths, routes, or resources can be accessed in the /data API.", - "get": { - "tags": [ - "authorization" - ], - "responses": { - "200": { - "$ref": "#/components/responses/AuthorizedAccessToRoutes" - }, - "403": { - "$ref": "#/components/responses/Error" - } - }, - "security": [ - { - "AuthorizedRequest": [] - } - ], - "operationId": "access-routes-get", - "summary": "Query allowed API routes", - "description": "GET the API resource paths that the current session is authorized to use." - }, - "options": { - "tags": [ - "preflight" - ], - "responses": { - "200": { - "$ref": "#/components/responses/AllowMethodGET" - } - }, - "security": [ - {} - ], - "operationId": "access-routes-options", - "summary": "Preflight check for API resource accesses", - "description": "Fetch OPTIONS for communicating with this resource." - } - }, - "/access/{resource}": { - "summary": "Authorized access to a certain resource", - "description": "Operation that hints the API consumer on what actions can be performed against another resource in the /data API.", - "get": { - "tags": [ - "authorization" - ], - "responses": { - "200": { - "$ref": "#/components/responses/AuthorizedAccessToResource" - }, - "403": { - "$ref": "#/components/responses/Error" - } - }, - "security": [ - { - "AuthorizedRequest": [] - } - ], - "operationId": "access-resource-actions-get", - "summary": "Query allowed API operations on the resource", - "description": "GET operations that the current user is authorized to request against the resource." - }, - "options": { - "tags": [ - "preflight" - ], - "responses": { - "200": { - "$ref": "#/components/responses/AllowMethodGET" - } - }, - "operationId": "access-resource-options", - "summary": "Preflight check for resource operation accesses", - "description": "Fetch OPTIONS for communicating with this resource." - }, - "parameters": [ - { - "name": "resource", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, "/data/people": { "summary": "Person data API endpoint", "description": "Operations to fetch people data. \nEditing operations cannot be done through this resource.", @@ -1957,153 +1862,6 @@ "description": "Fetch OPTIONS for communicating with this resource." } }, - "/public/guest": { - "summary": "Guest session opener", - "description": "", - "post": { - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Person" - } - } - }, - "required": true - }, - "tags": [ - "account", - "session" - ], - "responses": { - "200": { - "description": "Normal response; a guest token was generated. It is included in the response headers and body." - }, - "403": { - "description": "Erroneous, empty response to improper use; the user was already logged in or using a valid guest token." - } - }, - "security": [ - {} - ], - "operationId": "guest-session-request", - "summary": "Start a guest session", - "description": "POST personal information to generate a token for a temporary guest session." - }, - "options": { - "tags": [ - "preflight" - ], - "responses": { - "200": { - "$ref": "#/components/responses/AllowMethodPOST" - } - }, - "security": [ - {} - ], - "operationId": "guest-session-options", - "summary": "Preflight check for guest session opener", - "description": "Fetch OPTIONS for communicating with this resource." - } - }, - "/public/login": { - "summary": "Session opener", - "post": { - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LoginCredentials" - } - } - }, - "required": true - }, - "tags": [ - "account", - "session" - ], - "responses": { - "200": { - "description": "Normal response; the credentials are correct, and an authorization token was generated. It is included in the response headers and body." - }, - "403": { - "description": "Erroneous, empty response, sent when the credentials are rejected." - } - }, - "security": [ - {} - ], - "operationId": "login-request", - "summary": "Start a logged-in session", - "description": "POST credentials to authenticate, generate an authorization token and start a new session." - }, - "options": { - "tags": [ - "preflight" - ], - "responses": { - "200": { - "$ref": "#/components/responses/AllowMethodPOST" - } - }, - "security": [ - {} - ], - "operationId": "login-options", - "summary": "Preflight check for session opener", - "description": "Fetch OPTIONS for communicating with this resource." - } - }, - "/public/register": { - "summary": "Account registrar", - "post": { - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserRegistration" - } - } - }, - "required": true - }, - "tags": [ - "account" - ], - "responses": { - "200": { - "$ref": "#/components/responses/Empty" - }, - "400": { - "$ref": "#/components/responses/Error" - } - }, - "security": [ - {} - ], - "operationId": "register-request", - "summary": "Request a new user account", - "description": "POST details for a new user account, including its profile information." - }, - "options": { - "tags": [ - "preflight" - ], - "responses": { - "200": { - "$ref": "#/components/responses/AllowMethodPOST" - } - }, - "security": [ - {} - ], - "operationId": "register-options", - "summary": "Preflight check for account registrar", - "description": "Fetch OPTIONS for communicating with this resource." - } - }, "/data/billing_types": { "summary": "Billing types API endpoint", "description": "Operations to fetch billing types data. \nEditing operations cannot be done through this resource.",