mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-10 23:32:27 -05:00
fix docs
This commit is contained in:
@@ -115,6 +115,7 @@ def update_organization(organization_id):
|
|||||||
error = str(e.__dict__['orig'])
|
error = str(e.__dict__['orig'])
|
||||||
if "duplicate key" in error and "domain_pkey" in error:
|
if "duplicate key" in error and "domain_pkey" in error:
|
||||||
return jsonify(result='error', message='Domain already exists'), 400
|
return jsonify(result='error', message='Domain already exists'), 400
|
||||||
|
# 'organisation' here because of ix_organisation_name index in db
|
||||||
elif "duplicate key" in error and "organisation_name" in error:
|
elif "duplicate key" in error and "organisation_name" in error:
|
||||||
return jsonify(result='error', message='Organization name already exists'), 400
|
return jsonify(result='error', message='Organization name already exists'), 400
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -124,8 +124,8 @@ use them.
|
|||||||
- Add Agreement to models.py with the fields identified above
|
- Add Agreement to models.py with the fields identified above
|
||||||
- Create migration to add/update table
|
- Create migration to add/update table
|
||||||
|
|
||||||
2. Update the Organisation model:
|
2. Update the Organization model:
|
||||||
- Add one-to-many field linking one Organisation to multiple Agreements
|
- Add one-to-many field linking one Organization to multiple Agreements
|
||||||
- Add model property to convert budget amount into message limit
|
- Add model property to convert budget amount into message limit
|
||||||
- Add model property to provide remaining budget based on sent messages
|
- Add model property to provide remaining budget based on sent messages
|
||||||
- Add model property about whether free tier or not
|
- Add model property about whether free tier or not
|
||||||
|
|||||||
@@ -70,9 +70,9 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
notes:
|
notes:
|
||||||
type: string
|
type: string
|
||||||
organisation:
|
organization:
|
||||||
type: string
|
type: string
|
||||||
organisation_type:
|
organization_type:
|
||||||
type: string
|
type: string
|
||||||
enum: ["federal", "state", "other"]
|
enum: ["federal", "state", "other"]
|
||||||
default: "federal"
|
default: "federal"
|
||||||
@@ -121,7 +121,7 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
name:
|
name:
|
||||||
type: string
|
type: string
|
||||||
organisations:
|
organizations:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
@@ -247,7 +247,7 @@ paths:
|
|||||||
status:
|
status:
|
||||||
type: string
|
type: string
|
||||||
enum: ["ok"]
|
enum: ["ok"]
|
||||||
/_status/live-service-and-organisation-counts:
|
/_status/live-service-and-organization-counts:
|
||||||
get:
|
get:
|
||||||
description: 'Retrieve a count of live services and organizations in the Notify system'
|
description: 'Retrieve a count of live services and organizations in the Notify system'
|
||||||
tags:
|
tags:
|
||||||
@@ -262,7 +262,7 @@ paths:
|
|||||||
properties:
|
properties:
|
||||||
services:
|
services:
|
||||||
type: number
|
type: number
|
||||||
organisations:
|
organizations:
|
||||||
type: number
|
type: number
|
||||||
/user:
|
/user:
|
||||||
get:
|
get:
|
||||||
@@ -302,7 +302,7 @@ paths:
|
|||||||
properties:
|
properties:
|
||||||
data:
|
data:
|
||||||
$ref: "#/components/schemas/userObject"
|
$ref: "#/components/schemas/userObject"
|
||||||
/organisations:
|
/organizations:
|
||||||
get:
|
get:
|
||||||
security:
|
security:
|
||||||
- bearerAuth: []
|
- bearerAuth: []
|
||||||
@@ -329,7 +329,7 @@ paths:
|
|||||||
type: string
|
type: string
|
||||||
name:
|
name:
|
||||||
type: string
|
type: string
|
||||||
organisation_type:
|
organization_type:
|
||||||
type: string
|
type: string
|
||||||
enum: ["federal", "state", "other"]
|
enum: ["federal", "state", "other"]
|
||||||
/service:
|
/service:
|
||||||
|
|||||||
Reference in New Issue
Block a user