mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			18 lines
		
	
	
		
			419 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			419 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| const joi = require('joi');
 | |
| const { nameType } = require('../routes/admin-api/util');
 | |
| 
 | |
| const projectSchema = joi
 | |
|     .object()
 | |
|     .keys({
 | |
|         id: nameType,
 | |
|         name: joi.string().required(),
 | |
|         description: joi
 | |
|             .string()
 | |
|             .allow(null)
 | |
|             .allow('')
 | |
|             .optional(),
 | |
|     })
 | |
|     .options({ allowUnknown: false, stripUnknown: true });
 | |
| 
 | |
| module.exports = projectSchema;
 |