Added description schema
This commit is contained in:
		@@ -1 +1,2 @@
 | 
			
		||||
#!/usr/bin/env python3
 | 
			
		||||
from .description_schema import DescriptionSchema
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										9
									
								
								storage_service/schemas/description_schema.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								storage_service/schemas/description_schema.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,9 @@
 | 
			
		||||
from marshmallow import Schema, fields, RAISE
 | 
			
		||||
from marshmallow.validate import Regexp, Length
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class DescriptionSchema(Schema):
 | 
			
		||||
    tag = fields.Str(required=True, validate=[Regexp("^[a-zA-Z]+[0-9a-zA-Z_]*$"), Length(min=2, max=32)])
 | 
			
		||||
 | 
			
		||||
    class Meta:
 | 
			
		||||
        unknown = RAISE  # Later this could be changed to EXCLUDE to maintain compatibility among versions
 | 
			
		||||
		Reference in New Issue
	
	Block a user