rcpd/swat-codegen/documentation.yaml

1251 lines
44 KiB
YAML
Raw Normal View History

2024-11-03 15:35:53 +11:00
{
"openapi" : "3.1.0",
"info" : {
"title" : "SWAT Account Service API",
"description" : "API for the SWAT Account Service that allows creation, management, and authentication of SWAT accounts. A SWAT account can be used to access SWAT services, such as RCPD 3.0 (rcpd-service) and map marker. Accounts in RCPD 2.0 have been migrated to SWAT accounts with the same username and password.",
"version" : "0.14.0"
},
"externalDocs" : {
"url" : "/"
},
"servers" : [ {
"url" : "https://swataftermath.com:8443/"
} ],
"tags" : [ {
"name" : "Account Resource",
"description" : "Resource for managing accounts, such as creating new accounts, and modifying existing accounts."
}, {
"name" : "Authentication Resource",
"description" : "Resource for authenticating and getting a JWT."
}, {
"name" : "Email Verification Resource",
"description" : "Resource for verifying email addresses on accounts."
}, {
"name" : "Open API Resource",
"description" : "Resource for retrieving Open API documentation."
}, {
"name" : "Password Resource",
"description" : "Resource for resetting forgotten passwords."
} ],
"paths" : {
"/openapi/documentation.yaml" : {
"get" : {
"tags" : [ "Open API Resource" ],
"description" : "Get the raw Open API documentation.",
"parameters" : [ ],
"responses" : {
"200" : {
"description" : "The raw Open API documentation.",
"headers" : { },
"content" : {
"text/yaml" : {
"schema" : {
"type" : "string",
"title" : "String"
}
}
}
}
},
"deprecated" : false
}
},
"/account" : {
"post" : {
"tags" : [ "Account Resource" ],
"description" : "Create a new SWAT account. Email address will need to be verified after the account is created, before you can log in.",
"parameters" : [ ],
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/AccountCreationRequest"
}
}
},
"required" : true
},
"responses" : {
"500" : {
"description" : "An error occurred in the system.",
"headers" : { },
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
},
"examples" : {
"General Exception Response example" : {
"value" : {
"reference" : "kcog4koca5xhiegavarp",
"message" : "NullPointerException when deserializing value.",
"serviceName" : "swat-account-service"
}
}
}
}
}
},
"201" : {
"description" : "New SWAT account successfully created.",
"headers" : { }
},
"409" : {
"description" : "User name or email address is already registered.",
"headers" : { },
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
},
"examples" : {
"Duplicate Username or Email Exception Example" : {
"value" : {
"reference" : "kcog4koca5xhiegavarp",
"message" : "Email address [ testemail@test.com ] is already registered in the system.",
"serviceName" : "swat-account-service"
}
}
}
}
}
},
"422" : {
"description" : "The request was invalid.",
"headers" : { },
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ValidationErrorResponse"
},
"examples" : {
"Invalid Request Exception Response example" : {
"value" : {
"reference" : "kcog4koca5xhiegavarp",
"message" : "request has validation errors",
"serviceName" : "swat-account-service",
"errors" : {
"emailAddress" : [ "must not be blank" ]
}
}
}
}
}
}
}
},
"deprecated" : false
}
},
"/account/{username}" : {
"put" : {
"tags" : [ "Account Resource" ],
"description" : "Update your SWAT account. This resource supports partial PUT operations, where all null values are ignored.",
"parameters" : [ {
"name" : "username",
"in" : "path",
"description" : "The username or email address of your account to update.",
"required" : true,
"deprecated" : false,
"explode" : false,
"schema" : {
"type" : "string",
"title" : "String"
},
"example" : "Skater901"
} ],
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/AccountUpdateRequest"
}
}
},
"required" : true
},
"responses" : {
"500" : {
"description" : "An error occurred in the system.",
"headers" : { },
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
},
"examples" : {
"General Exception Response example" : {
"value" : {
"reference" : "kcog4koca5xhiegavarp",
"message" : "NullPointerException when deserializing value.",
"serviceName" : "swat-account-service"
}
}
}
}
}
},
"204" : {
"description" : "The account was updated.",
"headers" : { }
},
"401" : {
"description" : "Authorization token not provided or is invalid.",
"headers" : { },
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
},
"examples" : {
"Example Unauthorized Response" : {
"value" : {
"reference" : "kcog4koca5xhiegavarp",
"message" : "missing or invalid bearer token",
"serviceName" : "swat-account-service"
}
}
}
}
}
},
"403" : {
"description" : "You are attempting to update an account that you do not have access to.",
"headers" : { },
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
},
"examples" : {
"Example Forbidden Response" : {
"value" : {
"reference" : "kcog4koca5xhiegavarp",
"message" : "HTTP 403 Forbidden",
"serviceName" : "swat-account-service"
}
}
}
}
}
},
"422" : {
"description" : "The request was invalid.",
"headers" : { },
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ValidationErrorResponse"
},
"examples" : {
"Invalid Request Exception Response example" : {
"value" : {
"reference" : "kcog4koca5xhiegavarp",
"message" : "request has validation errors",
"serviceName" : "swat-account-service",
"errors" : {
"newPassword" : [ "must not be blank" ]
}
}
}
}
}
}
}
},
"deprecated" : false,
"security" : [ {
"SWAT-Token" : [ ]
} ]
}
},
"/account/{username}/activate-migrated" : {
"post" : {
"tags" : [ "Account Resource" ],
"description" : "Activate a migrated account, by setting an email address and changing the password. This is required for all migrated accounts before they can be used to get tokens.",
"parameters" : [ {
"name" : "username",
"in" : "path",
"description" : "The username of the account to activate.",
"required" : true,
"deprecated" : false,
"explode" : false,
"schema" : {
"type" : "string",
"title" : "String"
},
"example" : "Skater901"
} ],
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ActivateMigratedAccountRequest"
}
}
},
"required" : true
},
"responses" : {
"500" : {
"description" : "An error occurred in the system.",
"headers" : { },
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
},
"examples" : {
"General Exception Response example" : {
"value" : {
"reference" : "kcog4koca5xhiegavarp",
"message" : "NullPointerException when deserializing value.",
"serviceName" : "swat-account-service"
}
}
}
}
}
},
"204" : {
"description" : "Migrated account activated successfully. An email will have been sent to the provided email address with a verification link to verify the email address.",
"headers" : { }
},
"400" : {
"description" : "Account has already been activated.",
"headers" : { },
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
},
"examples" : {
"Account Already Activated Exception Response" : {
"value" : {
"reference" : "kcog4koca5xhiegavarp",
"message" : "Account has already been activated.",
"serviceName" : "swat-account-service"
}
}
}
}
}
},
"401" : {
"description" : "The account does not exist or the password is incorrect.",
"headers" : { },
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
},
"examples" : {
"Example Unauthorized Response" : {
"value" : {
"reference" : "kcog4koca5xhiegavarp",
"message" : "Invalid username or password.",
"serviceName" : "swat-account-service"
}
}
}
}
}
},
"409" : {
"description" : "The requested email address is already registered to another SWAT account.",
"headers" : { },
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
},
"examples" : {
"Email Address Already Registered Exception Response" : {
"value" : {
"reference" : "kcog4koca5xhiegavarp",
"message" : "Email address [ myemailaddress@gmail.com ] is already registered.",
"serviceName" : "swat-account-service"
}
}
}
}
}
},
"422" : {
"description" : "The request was invalid.",
"headers" : { },
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ValidationErrorResponse"
},
"examples" : {
"Invalid Request Exception Response example" : {
"value" : {
"reference" : "kcog4koca5xhiegavarp",
"message" : "request has validation errors",
"serviceName" : "swat-account-service",
"errors" : {
"emailAddress" : [ "must not be blank" ],
"currentPassword" : [ "must not be blank" ],
"newPassword" : [ "must not be blank" ]
}
}
}
}
}
}
}
},
"deprecated" : false
}
},
"/login" : {
"post" : {
"tags" : [ "Authentication Resource" ],
"description" : "Get a JWT from a username/password or email address/password combination.",
"parameters" : [ ],
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/LoginRequest"
}
}
},
"required" : true
},
"responses" : {
"200" : {
"description" : "Successfully logged in.",
"headers" : { },
"content" : {
"application/json" : {
"schema" : {
"type" : "string",
"title" : "String"
},
"examples" : {
"Example JWT Response" : {
"value" : "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkYjA3Nzc2ZS05ZTg2LTRhNGUtOTRkMC03ZDE3NzY2ODZkOWEiLCJqdGkiOiI4NWY4Njg5Yy0wODg5LTRlODUtOWM5Zi05MzY0MDllN2ZlMDciLCJhdWQiOiIiLCJpc3MiOiIiLCJleHAiOjE2OTA1NTczMzZ9.js0KMh7tyqGV4j7zQUs1du4RX16MQczXDCxgGmE_z_QX-551-O53dqX5MgnTufMOFmJ6pevzOwJqnAUcdM8Y2l2qrvUGuWO57vejwdo-tqZFE96AYZHH0cMuxZMNaA3-gtcd11dOvv01RAJWQkPEcj7aEgA2D0-paayhWClSpvMRUC2IkhTKbDvAO_5yAaseKKrSemJjboWrbfUHYvpz9GtvLhXUhWzFLzemu6ZQu2oSiGtuF7VcZfvJYwYdVL_LlxkPAEdiw_-8DYDWhBW4MuXOW8wlpLqtx4U2Ma2-Mn33e1gQll9xsazn85YnWHe_FAU1wQXiVhBb4PaYnr36yg"
}
}
}
}
},
"401" : {
"description" : "Account doesn't exist or password is wrong.",
"headers" : { },
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
},
"examples" : {
"Example Unauthorized Response" : {
"value" : {
"reference" : "kcog4koca5xhiegavarp",
"message" : "Invalid username or password.",
"serviceName" : "swat-account-service"
}
}
}
}
}
},
"422" : {
"description" : "The request was invalid.",
"headers" : { },
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ValidationErrorResponse"
},
"examples" : {
"Invalid Request Exception Response example" : {
"value" : {
"reference" : "kcog4koca5xhiegavarp",
"message" : "request has validation errors",
"serviceName" : "swat-account-service",
"errors" : {
"username" : [ "must not be blank" ]
}
}
}
}
}
}
},
"490" : {
"description" : "The username and password were correct, but the email address for this account has not yet been verified.",
"headers" : { },
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
},
"examples" : {
"Unverified Email Address Exception Response" : {
"value" : {
"reference" : "kcog4koca5xhiegavarp",
"message" : "Email address has not been verified",
"serviceName" : "swat-account-service"
}
}
}
}
}
},
"491" : {
"description" : "This is a migrated account from old RCPD. Please activate the account using the /account/{username}/activate-migrated endpoint.",
"headers" : { },
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
},
"examples" : {
"Not Activated Migrated Account Exception Response" : {
"value" : {
"reference" : "kcog4koca5xhiegavarp",
"message" : "Migrated RCPD account, please activate it.",
"serviceName" : "swat-account-service"
}
}
}
}
}
},
"492" : {
"description" : "Your password is correct, but must be changed.",
"headers" : { },
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
},
"examples" : {
"Password Change Required Exception Response" : {
"value" : {
"reference" : "kcog4koca5xhiegavarp",
"message" : "Your password must be changed.",
"serviceName" : "swat-account-service"
}
}
}
}
}
},
"500" : {
"description" : "An error occurred in the system.",
"headers" : { },
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
},
"examples" : {
"General Exception Response example" : {
"value" : {
"reference" : "kcog4koca5xhiegavarp",
"message" : "NullPointerException when deserializing value.",
"serviceName" : "swat-account-service"
}
}
}
}
}
}
},
"deprecated" : false
}
},
"/account/{username}/request-verification-code" : {
"post" : {
"tags" : [ "Email Verification Resource" ],
"description" : "Re-send the verification code for the specified account, creating a new code if the old code has expired.",
"parameters" : [ {
"name" : "username",
"in" : "path",
"description" : "The username or email address of the account you wish to perform the action on.",
"required" : true,
"deprecated" : false,
"explode" : false,
"schema" : {
"type" : "string",
"title" : "String"
},
"example" : "test@test.com"
} ],
"responses" : {
"500" : {
"description" : "An error occurred in the system.",
"headers" : { },
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
},
"examples" : {
"General Exception Response example" : {
"value" : {
"reference" : "kcog4koca5xhiegavarp",
"message" : "NullPointerException when deserializing value.",
"serviceName" : "swat-account-service"
}
}
}
}
}
},
"204" : {
"description" : "An email has been sent with a verification code for the specified email address. Please note, if the email address is not registered, this response will still be returned, in order to prevent malicious actors from discovering registered email addresses.",
"headers" : { }
}
},
"deprecated" : false
}
},
"/account/{username}/verify-email" : {
"post" : {
"tags" : [ "Email Verification Resource" ],
"description" : "Verify that your email address is a real email address and you have access to it.",
"parameters" : [ {
"name" : "username",
"in" : "path",
"description" : "The username or email address of the account you wish to perform the action on.",
"required" : true,
"deprecated" : false,
"explode" : false,
"schema" : {
"type" : "string",
"title" : "String"
},
"example" : "test@test.com"
} ],
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/VerifyEmailRequest"
}
}
},
"required" : true
},
"responses" : {
"500" : {
"description" : "An error occurred in the system.",
"headers" : { },
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
},
"examples" : {
"General Exception Response example" : {
"value" : {
"reference" : "kcog4koca5xhiegavarp",
"message" : "NullPointerException when deserializing value.",
"serviceName" : "swat-account-service"
}
}
}
}
}
},
"204" : {
"description" : "Your email address has been verified and you are now able to login and get a token.",
"headers" : { }
},
"403" : {
"description" : "The provided verification code is not valid for the specified account.",
"headers" : { },
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
},
"examples" : {
"Example Forbidden Response" : {
"value" : {
"reference" : "kcog4koca5xhiegavarp",
"message" : "HTTP 403 Forbidden",
"serviceName" : "swat-account-service"
}
}
}
}
}
},
"404" : {
"description" : "The provided verification code does not exist.",
"headers" : { },
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
},
"examples" : {
"Not Found Exception Response Example" : {
"value" : {
"reference" : "kcog4koca5xhiegavarp",
"message" : "email verification code [ {verificationCode} ] not found",
"serviceName" : "swat-account-service"
}
}
}
}
}
},
"422" : {
"description" : "The request was invalid.",
"headers" : { },
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ValidationErrorResponse"
},
"examples" : {
"Invalid Request Exception Response example" : {
"value" : {
"reference" : "kcog4koca5xhiegavarp",
"message" : "request has validation errors",
"serviceName" : "swat-account-service",
"errors" : {
"verificationCode" : [ "must not be blank" ]
}
}
}
}
}
}
}
},
"deprecated" : false
}
},
"/account/{username}/request-password-reset-code" : {
"post" : {
"tags" : [ "Password Resource" ],
"description" : "Request a one-time use code to be emailed to the account's email address that can be used to change the account's password.",
"parameters" : [ {
"name" : "username",
"in" : "path",
"description" : "The username or email address of the account you wish to request a password reset code for.",
"required" : true,
"deprecated" : false,
"explode" : false,
"schema" : {
"type" : "string",
"title" : "String"
},
"example" : "test@test.com"
} ],
"responses" : {
"500" : {
"description" : "An error occurred in the system.",
"headers" : { },
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
},
"examples" : {
"General Exception Response example" : {
"value" : {
"reference" : "kcog4koca5xhiegavarp",
"message" : "NullPointerException when deserializing value.",
"serviceName" : "swat-account-service"
}
}
}
}
}
},
"204" : {
"description" : "An email has been sent with a password reset code for the account specified by the email address. Please note, if the account is not registered, this response will still be returned, in order to prevent malicious actors from discovering registered email addresses.",
"headers" : { }
}
},
"deprecated" : false
}
},
"/account/{username}/reset-password" : {
"post" : {
"tags" : [ "Password Resource" ],
"description" : "Use the one-time use code to change the account's password.",
"parameters" : [ {
"name" : "username",
"in" : "path",
"description" : "The username or email address of the account to reset the password on.",
"required" : true,
"deprecated" : false,
"explode" : false,
"schema" : {
"type" : "string",
"title" : "String"
},
"example" : "test@test.com"
} ],
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/PasswordResetRequest"
}
}
},
"required" : true
},
"responses" : {
"500" : {
"description" : "An error occurred in the system.",
"headers" : { },
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
},
"examples" : {
"General Exception Response example" : {
"value" : {
"reference" : "kcog4koca5xhiegavarp",
"message" : "NullPointerException when deserializing value.",
"serviceName" : "swat-account-service"
}
}
}
}
}
},
"204" : {
"description" : "The password has been successfully changed.",
"headers" : { }
},
"403" : {
"description" : "The provided code is not valid for the specified account.",
"headers" : { },
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
},
"examples" : {
"Example Forbidden Response" : {
"value" : {
"reference" : "kcog4koca5xhiegavarp",
"message" : "HTTP 403 Forbidden",
"serviceName" : "swat-account-service"
}
}
}
}
}
},
"404" : {
"description" : "The provided one-time code is not valid.",
"headers" : { },
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
},
"examples" : {
"Password Reset Code not found response example" : {
"value" : {
"reference" : "kcog4koca5xhiegavarp",
"message" : "Password reset code [ 54F5C0BE482828847C650669CE89D57D ] does not exist",
"serviceName" : "swat-account-service"
}
}
}
}
}
},
"422" : {
"description" : "The request was invalid.",
"headers" : { },
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ValidationErrorResponse"
},
"examples" : {
"Invalid Request Exception Response example" : {
"value" : {
"reference" : "kcog4koca5xhiegavarp",
"message" : "request has validation errors",
"serviceName" : "swat-account-service",
"errors" : {
"code" : [ "must not be blank" ]
}
}
}
}
}
}
}
},
"deprecated" : false
}
},
"/account/{username}/change-password" : {
"post" : {
"tags" : [ "Password Resource" ],
"description" : "Change password of the specified account using the existing password to authenticate. Use this endpoint if you are unable to get a token because you are forced to update your password.",
"parameters" : [ {
"name" : "username",
"in" : "path",
"description" : "The username or email address of the account to change the password on.",
"required" : true,
"deprecated" : false,
"explode" : false,
"schema" : {
"type" : "string",
"title" : "String"
},
"example" : "test@test.com"
} ],
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ChangePasswordRequest"
}
}
},
"required" : true
},
"responses" : {
"500" : {
"description" : "An error occurred in the system.",
"headers" : { },
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
},
"examples" : {
"General Exception Response example" : {
"value" : {
"reference" : "kcog4koca5xhiegavarp",
"message" : "NullPointerException when deserializing value.",
"serviceName" : "swat-account-service"
}
}
}
}
}
},
"204" : {
"description" : "The password has been successfully changed.",
"headers" : { }
},
"401" : {
"description" : "The account and password combination is invalid.",
"headers" : { },
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
},
"examples" : {
"Example Unauthorized Response" : {
"value" : {
"reference" : "kcog4koca5xhiegavarp",
"message" : "missing or invalid bearer token",
"serviceName" : "swat-account-service"
}
}
}
}
}
},
"422" : {
"description" : "The request was invalid.",
"headers" : { },
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ValidationErrorResponse"
},
"examples" : {
"Invalid Request Exception Response example" : {
"value" : {
"reference" : "kcog4koca5xhiegavarp",
"message" : "request has validation errors",
"serviceName" : "swat-account-service",
"errors" : {
"newPassword" : [ "must not be blank" ]
}
}
}
}
}
}
}
},
"deprecated" : false
}
}
},
"components" : {
"schemas" : {
"AccountCreationRequest" : {
"type" : "object",
"description" : "User name, email address, and password for this account.",
"properties" : {
"emailAddress" : {
"type" : "string",
"description" : "The email address to register this account under. Must be in the standard email format, characters followed by @ followed by characters followed by . followed by characters.",
"example" : "testemail@test.com",
"maxLength" : 100,
"minLength" : 0,
"title" : "String"
},
"password" : {
"type" : "string",
"description" : "The password for this SWAT account.",
"example" : "password123",
"maxLength" : 100,
"minLength" : 8,
"title" : "String"
},
"username" : {
"type" : "string",
"description" : "The username for this SWAT account.",
"example" : "Test User",
"maxLength" : 100,
"minLength" : 0,
"title" : "String"
}
},
"required" : [ "emailAddress", "password", "username" ],
"title" : "AccountCreationRequest"
},
"ErrorResponse" : {
"type" : "object",
"properties" : {
"message" : {
"type" : "string",
"description" : "A message describing the error that occurred.",
"example" : "An error occurred.",
"maxLength" : 2147483647,
"minLength" : 0,
"title" : "String"
},
"reference" : {
"type" : "string",
"description" : "A unique reference for your error. Provide this to the admins to help track down your issue.",
"example" : "kcog4koca5xhiegavarp",
"maxLength" : 20,
"minLength" : 20,
"title" : "String"
},
"serviceName" : {
"type" : "string",
"description" : "The name of this service. Will always be swat-account-service.",
"example" : "swat-account-service",
"maxLength" : 20,
"minLength" : 20,
"title" : "String"
}
},
"required" : [ "message", "reference", "serviceName" ],
"title" : "ErrorResponse"
},
"ValidationErrorResponse" : {
"type" : "object",
"properties" : {
"errors" : {
"type" : "object",
"additionalProperties" : {
"type" : "array",
"items" : {
"type" : "string",
"title" : "String"
},
"title" : "List<String>"
},
"description" : "Key value pairs, where each key is the name of a property of the request object, and each value is a list of strings, each string indicating a validation error for that property.",
"example" : "{ \"username\": [ \"must not be blank\" ] }",
"maxLength" : 2147483647,
"minLength" : 0,
"title" : "Map<String,List<String>>"
},
"message" : {
"type" : "string",
"description" : "A message describing the error that occurred.",
"example" : "An error occurred.",
"maxLength" : 2147483647,
"minLength" : 0,
"title" : "String"
},
"reference" : {
"type" : "string",
"description" : "A unique reference for your error. Provide this to the admins to help track down your issue.",
"example" : "kcog4koca5xhiegavarp",
"maxLength" : 20,
"minLength" : 20,
"title" : "String"
},
"serviceName" : {
"type" : "string",
"description" : "The name of this service. Will always be swat-account-service.",
"example" : "swat-account-service",
"maxLength" : 20,
"minLength" : 20,
"title" : "String"
}
},
"required" : [ "errors", "message", "reference", "serviceName" ],
"title" : "ValidationErrorResponse"
},
"AccountUpdateRequest" : {
"type" : "object",
"description" : "The properties of your SWAT account you wish to update.",
"properties" : {
"password" : {
"type" : [ "null", "string" ],
"description" : "The new password for your account.",
"example" : "mynewpassword123",
"maxLength" : 100,
"minLength" : 8,
"title" : "String"
}
},
"title" : "AccountUpdateRequest"
},
"ActivateMigratedAccountRequest" : {
"type" : "object",
"description" : "The email address for the account, along with the current password to authenticate, and the new password.",
"properties" : {
"currentPassword" : {
"type" : "string",
"description" : "The current password for your migrated SWAT account you wish to activate.",
"example" : "mypassword123",
"maxLength" : 2147483647,
"minLength" : 0,
"title" : "String"
},
"emailAddress" : {
"type" : "string",
"description" : "The email address to set for this account. Must be in the standard email format, characters followed by @ followed by characters followed by . followed by characters.",
"example" : "myemailaddress@gmail.com",
"maxLength" : 100,
"minLength" : 0,
"title" : "String"
},
"newPassword" : {
"type" : "string",
"description" : "The new password for your SWAT account.",
"example" : "mynewpassword",
"maxLength" : 100,
"minLength" : 8,
"title" : "String"
}
},
"required" : [ "currentPassword", "emailAddress", "newPassword" ],
"title" : "ActivateMigratedAccountRequest"
},
"LoginRequest" : {
"type" : "object",
"description" : "The username (or email address) and password to login with.",
"properties" : {
"password" : {
"type" : "string",
"description" : "The password for the SWAT account you wish to log in to.",
"example" : "password123",
"maxLength" : 100,
"minLength" : 0,
"title" : "String"
},
"username" : {
"type" : "string",
"description" : "The username or email address of the SWAT account you wish to log in to.",
"example" : "Test User",
"maxLength" : 100,
"minLength" : 0,
"title" : "String"
}
},
"required" : [ "password", "username" ],
"title" : "LoginRequest"
},
"VerifyEmailRequest" : {
"type" : "object",
"description" : "The verification code sent to your email address.",
"properties" : {
"verificationCode" : {
"type" : "string",
"description" : "The verification code sent to your email address.",
"maxLength" : 2147483647,
"minLength" : 0,
"title" : "String"
}
},
"required" : [ "verificationCode" ],
"title" : "VerifyEmailRequest"
},
"PasswordResetRequest" : {
"type" : "object",
"description" : "The one-time use code and new password.",
"properties" : {
"code" : {
"type" : "string",
"description" : "The one-time use code sent to you in an email.",
"example" : "54F5C0BE482828847C650669CE89D57D",
"maxLength" : 32,
"minLength" : 32,
"title" : "String"
},
"password" : {
"type" : "string",
"description" : "The new password to set for the account.",
"example" : "password123",
"maxLength" : 100,
"minLength" : 8,
"title" : "String"
}
},
"required" : [ "code", "password" ],
"title" : "PasswordResetRequest"
},
"ChangePasswordRequest" : {
"type" : "object",
"description" : "The current and new passwords.",
"properties" : {
"newPassword" : {
"type" : "string",
"description" : "The new password.",
"example" : "mynewpassword",
"maxLength" : 100,
"minLength" : 8,
"title" : "String"
},
"password" : {
"type" : "string",
"description" : "The current password for the account.",
"example" : "mypassword",
"maxLength" : 100,
"minLength" : 0,
"title" : "String"
}
},
"required" : [ "newPassword", "password" ],
"title" : "ChangePasswordRequest"
}
},
"examples" : { },
"securitySchemes" : {
"SWAT-Token" : {
"type" : "http",
"description" : "A JWT provided by this service. Must be provided as an Authorization header using the format \"Bearer {JWT}\"",
"in" : "header",
"scheme" : "bearer",
"bearerFormat" : "JWT"
}
}
}
}