Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HTTP/OAS] Add descriptions for role management APIs #184265

Merged
merged 7 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ export function defineDeleteRolesRoutes({ router }: RouteDefinitionParams) {
router.delete(
{
path: '/api/security/role/{name}',
options: {
access: 'public',
lcawl marked this conversation as resolved.
Show resolved Hide resolved
description: `Delete a role`,
},
validate: {
params: schema.object({ name: schema.string({ minLength: 1 }) }),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ export function defineGetRolesRoutes({
router.get(
{
path: '/api/security/role/{name}',
options: {
access: 'public',
description: `Get a role`,
},
validate: {
params: schema.object({ name: schema.string({ minLength: 1 }) }),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,14 @@ export function defineGetAllRolesRoutes({
config,
}: RouteDefinitionParams) {
router.get(
{ path: '/api/security/role', validate: false },
{
path: '/api/security/role',
options: {
access: 'public',
description: `Get all roles`,
},
validate: false,
},
createLicensedRouteHandler(async (context, request, response) => {
try {
const hideReservedRoles = buildFlavor === 'serverless';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ export function definePutRolesRoutes({
router.put(
{
path: '/api/security/role/{name}',
options: {
access: 'public',
description: `Create or update a role`,
},
validate: {
params: schema.object({ name: schema.string({ minLength: 1, maxLength: 1024 }) }),
query: schema.object({ createOnly: schema.boolean({ defaultValue: false }) }),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ export function defineInvalidateSessionsRoutes({ router, getSession }: RouteDefi
),
}),
},
options: { tags: ['access:sessionManagement'] },
options: {
tags: ['access:sessionManagement'],
access: 'public',
description: `Invalidate user sessions`,
},
},
async (_context, request, response) => {
return response.ok({
Expand Down