-
Notifications
You must be signed in to change notification settings - Fork 0
/
models_custom.py
33 lines (27 loc) · 1.13 KB
/
models_custom.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from pydantic import BaseModel, Field
from typing import List
class CreateEntityRequest(BaseModel):
name: str
class Claim(BaseModel):
name: str = Field(..., example="email")
value: str = Field(..., example="[email protected]")
class CredentialOfferRequest(BaseModel):
issuerDid: str = Field(..., example="did:prism:123456789abcdefghi")
connectionId: str = Field(..., example="123456789abcdefghi")
attrClaims : list[Claim]
class Attribute(BaseModel):
name: str = Field(..., example="email")
dataType: str = Field(..., example="string")
class CreateSchemaRequest(BaseModel):
schemaName: str = Field(..., example="Test_Profile_2")
schemaVersion: str = Field(..., example="1.0.0")
schemaDescription: str = Field(..., example="This is a test schema")
schemaId: str = Field(..., example="https://profila.com/profila-profile-1.0.0")
schemaTags: List[str] = Field(..., example=["test"])
attributes: List[Attribute] = Field(...)
class NewApiKey(BaseModel):
newApiKey: str = Field(
...,
description='API key of the new entity.',
example='user.wgTLw6hlclMBb7aNLFIQ0xw3fCxvmPR1',
)