From 87362be154b8bf92de9dac5ef959a32e68dbea66 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Wed, 20 Sep 2023 10:51:21 +0100 Subject: [PATCH] Removing required from roles on user API, as it is now paid. --- packages/server/specs/openapi.json | 5 +---- packages/server/specs/openapi.yaml | 3 --- packages/server/specs/resources/user.ts | 2 +- packages/server/src/definitions/openapi.ts | 6 +++--- specs/openapi.json | 1 - specs/openapi.yaml | 1 - 6 files changed, 5 insertions(+), 13 deletions(-) delete mode 120000 specs/openapi.json delete mode 120000 specs/openapi.yaml diff --git a/packages/server/specs/openapi.json b/packages/server/specs/openapi.json index 1e5718c5b5..5301d340bc 100644 --- a/packages/server/specs/openapi.json +++ b/packages/server/specs/openapi.json @@ -1550,8 +1550,7 @@ } }, "required": [ - "email", - "roles" + "email" ] }, "userOutput": { @@ -1622,7 +1621,6 @@ }, "required": [ "email", - "roles", "_id" ] } @@ -1701,7 +1699,6 @@ }, "required": [ "email", - "roles", "_id" ] } diff --git a/packages/server/specs/openapi.yaml b/packages/server/specs/openapi.yaml index 07320917b8..a525ec3be1 100644 --- a/packages/server/specs/openapi.yaml +++ b/packages/server/specs/openapi.yaml @@ -1324,7 +1324,6 @@ components: role ID, e.g. ADMIN. required: - email - - roles userOutput: type: object properties: @@ -1385,7 +1384,6 @@ components: type: string required: - email - - roles - _id required: - data @@ -1451,7 +1449,6 @@ components: type: string required: - email - - roles - _id required: - data diff --git a/packages/server/specs/resources/user.ts b/packages/server/specs/resources/user.ts index d00ed02f81..caf736f1ab 100644 --- a/packages/server/specs/resources/user.ts +++ b/packages/server/specs/resources/user.ts @@ -92,7 +92,7 @@ const userSchema = object( }, }, }, - { required: ["email", "roles"] } + { required: ["email"] } ) const userOutputSchema = { diff --git a/packages/server/src/definitions/openapi.ts b/packages/server/src/definitions/openapi.ts index fe5c17b218..5c44b6259f 100644 --- a/packages/server/src/definitions/openapi.ts +++ b/packages/server/src/definitions/openapi.ts @@ -599,7 +599,7 @@ export interface components { global?: boolean; }; /** @description Contains the roles of the user per app (assuming they are not a builder user). This field can only be set on a business or enterprise license. */ - roles: { [key: string]: string }; + roles?: { [key: string]: string }; }; userOutput: { data: { @@ -629,7 +629,7 @@ export interface components { global?: boolean; }; /** @description Contains the roles of the user per app (assuming they are not a builder user). This field can only be set on a business or enterprise license. */ - roles: { [key: string]: string }; + roles?: { [key: string]: string }; /** @description The ID of the user. */ _id: string; }; @@ -662,7 +662,7 @@ export interface components { global?: boolean; }; /** @description Contains the roles of the user per app (assuming they are not a builder user). This field can only be set on a business or enterprise license. */ - roles: { [key: string]: string }; + roles?: { [key: string]: string }; /** @description The ID of the user. */ _id: string; }[]; diff --git a/specs/openapi.json b/specs/openapi.json deleted file mode 120000 index 6e1531e3f4..0000000000 --- a/specs/openapi.json +++ /dev/null @@ -1 +0,0 @@ -../packages/server/specs/openapi.json \ No newline at end of file diff --git a/specs/openapi.yaml b/specs/openapi.yaml deleted file mode 120000 index 67db6af71f..0000000000 --- a/specs/openapi.yaml +++ /dev/null @@ -1 +0,0 @@ -../packages/server/specs/openapi.yaml \ No newline at end of file