export const createRoleSchema = {
  body: {
    type: 'object',
    required: ['name', 'permissions'],
    properties: {
      name: { type: 'string', minLength: 1 },
      permissions: {
        oneOf: [
          { type: 'string', pattern: '^\\*$' },
          { type: 'array', items: { type: 'string' } },
        ],
      },
    },
  },
};

export const updateRoleSchema = {
  body: {
    type: 'object',
    properties: {
      name: { type: 'string', minLength: 1 },
      permissions: {
        oneOf: [
          { type: 'string', pattern: '^\\*$' },
          { type: 'array', items: { type: 'string' } },
        ],
      },
    },
  },
};
