mirror of
				https://github.com/ae-utbm/sith.git
				synced 2025-11-04 02:53:06 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			24 lines
		
	
	
		
			528 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			528 B
		
	
	
	
		
			Python
		
	
	
	
	
	
from ninja import ModelSchema, Schema
 | 
						|
from pydantic import Field, HttpUrl
 | 
						|
 | 
						|
from api.models import ApiClient
 | 
						|
from core.schemas import SimpleUserSchema
 | 
						|
 | 
						|
 | 
						|
class ApiClientSchema(ModelSchema):
 | 
						|
    class Meta:
 | 
						|
        model = ApiClient
 | 
						|
        fields = ["id", "name"]
 | 
						|
 | 
						|
    owner: SimpleUserSchema
 | 
						|
    permissions: list[str] = Field(alias="all_permissions")
 | 
						|
 | 
						|
 | 
						|
class ThirdPartyAuthParamsSchema(Schema):
 | 
						|
    client_id: int
 | 
						|
    third_party_app: str
 | 
						|
    privacy_link: HttpUrl
 | 
						|
    username: str
 | 
						|
    callback_url: HttpUrl
 | 
						|
    signature: str
 |