File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change 18
18
UserInstructionFragment ,
19
19
UserCRUDRequest ,
20
20
)
21
+ from pydantic import BaseModel , Field , Extra
21
22
22
23
23
- from rasenmaeher_api .web .api .product .schema import ProductAddRequest
24
+ # FIXME: Move to libpvarki
25
+ class ProductAddRequest (BaseModel ): # pylint: disable=too-few-public-methods
26
+ """Request to add product interoperability."""
27
+
28
+ certcn : str = Field (description = "CN of the certificate" )
29
+ x509cert : str = Field (description = "Certificate encoded with CFSSL conventions (newlines escaped)" )
30
+
31
+ class Config : # pylint: disable=too-few-public-methods
32
+ """Example values for schema"""
33
+
34
+ extra = Extra .forbid
35
+ schema_extra = {
36
+ "examples" : [
37
+ {
38
+ "certcn" : "product.deployment.tld" ,
39
+ "x509cert" : "-----BEGIN CERTIFICATE-----\\ nMIIEwjCC...\\ n-----END CERTIFICATE-----\\ n" ,
40
+ },
41
+ ],
42
+ }
24
43
25
44
26
45
LOGGER = logging .getLogger (__name__ )
You can’t perform that action at this time.
0 commit comments