mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-11-08 22:50:26 +00:00
8ea00b9484
- Use Flask blueprint - Split model and views into smaller parts - Bug fixes - API adjustment
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()
|