mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 23:41:17 -05:00
All string "constants" in app.models converted to app.enums.
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from app.models import INVITED_USER_STATUS_TYPES, ORGANIZATION_TYPES
|
||||
from app.enums import InvitedUserStatus, OrganizationType
|
||||
from app.schema_validation.definitions import uuid
|
||||
|
||||
post_create_organization_schema = {
|
||||
@@ -8,7 +8,7 @@ post_create_organization_schema = {
|
||||
"properties": {
|
||||
"name": {"type": "string"},
|
||||
"active": {"type": ["boolean", "null"]},
|
||||
"organization_type": {"enum": ORGANIZATION_TYPES},
|
||||
"organization_type": {"enum": [e.value for e in OrganizationType]},
|
||||
},
|
||||
"required": ["name", "organization_type"],
|
||||
}
|
||||
@@ -20,7 +20,7 @@ post_update_organization_schema = {
|
||||
"properties": {
|
||||
"name": {"type": ["string", "null"]},
|
||||
"active": {"type": ["boolean", "null"]},
|
||||
"organization_type": {"enum": ORGANIZATION_TYPES},
|
||||
"organization_type": {"enum": [e.value for e in OrganizationType]},
|
||||
},
|
||||
"required": [],
|
||||
}
|
||||
@@ -51,6 +51,6 @@ post_update_invited_org_user_status_schema = {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "POST update organization invite schema",
|
||||
"type": "object",
|
||||
"properties": {"status": {"enum": INVITED_USER_STATUS_TYPES}},
|
||||
"properties": {"status": {"enum": [e.value for e in InvitedUserStatus]}},
|
||||
"required": ["status"],
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user