1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-31 00:16:47 +01:00
unleash.unleash/src/lib/openapi/spec/permission-schema.ts
Christopher Kolstad 53354224fc
chore: Bump biome and configure husky (#6589)
Upgrades biome to 1.6.1, and updates husky pre-commit hook.

Most changes here are making type imports explicit.
2024-03-18 13:58:05 +01:00

31 lines
1.0 KiB
TypeScript

import type { FromSchema } from 'json-schema-to-ts';
export const permissionSchema = {
$id: '#/components/schemas/permissionSchema',
type: 'object',
additionalProperties: false,
required: ['permission'],
description: 'Project and environment permissions',
properties: {
permission: {
description:
'[Project](https://docs.getunleash.io/reference/rbac#project-permissions) or [environment](https://docs.getunleash.io/reference/rbac#environment-permissions) permission name',
type: 'string',
example: 'UPDATE_FEATURE_STRATEGY',
},
project: {
description: 'The project this permission applies to',
type: 'string',
example: 'my-project',
},
environment: {
description: 'The environment this permission applies to',
type: 'string',
example: 'development',
},
},
components: {},
} as const;
export type PermissionSchema = FromSchema<typeof permissionSchema>;