mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-11-14 09:30:27 +00:00
28 lines
643 B
Python
28 lines
643 B
Python
from lima import fields, Schema
|
|
|
|
|
|
class DomainSchema(Schema):
|
|
id = fields.Integer()
|
|
name = fields.String()
|
|
|
|
|
|
class RoleSchema(Schema):
|
|
id = fields.Integer()
|
|
name = fields.String()
|
|
|
|
|
|
class ApiKeySchema(Schema):
|
|
id = fields.Integer()
|
|
role = fields.Embed(schema=RoleSchema)
|
|
domains = fields.Embed(schema=DomainSchema, many=True)
|
|
description = fields.String()
|
|
key = fields.String()
|
|
|
|
|
|
class ApiPlainKeySchema(Schema):
|
|
id = fields.Integer()
|
|
role = fields.Embed(schema=RoleSchema)
|
|
domains = fields.Embed(schema=DomainSchema, many=True)
|
|
description = fields.String()
|
|
plain_key = fields.String()
|