Experimental
Schema
BadRequestFieldViolation
Type:
object
description
Type:
string
All schema constraints and annotations
{
"description": "A description of why the request element is bad.",
"type": "string"
}field
Type:
string
A path that leads to a field in the request body. The value will be a sequence of dot-separated identifiers that identify a protocol buffer field.
Consider the following:
message CreateContactRequest { message EmailAddress { enum Type { TYPE_UNSPECIFIED = 0; HOME = 1; WORK = 2; }
optional string email = 1; repeated EmailType type = 2; }
string full_name = 1; repeated EmailAddress email_addresses = 2; }
In this example, in proto field could take one of the following values:
full_namefor a violation in thefull_namevalueemail_addresses[0].emailfor a violation in theemailfield of the firstemail_addressesmessageemail_addresses[2].type[1]for a violation in the secondtypevalue in the thirdemail_addressesmessage.
In JSON, the same values are represented as:
fullNamefor a violation in thefullNamevalueemailAddresses[0].emailfor a violation in theemailfield of the firstemailAddressesmessageemailAddresses[2].type[1]for a violation in the secondtypevalue in the thirdemailAddressesmessage.
All schema constraints and annotations
{
"description": "A path that leads to a field in the request body. The value will be a\nsequence of dot-separated identifiers that identify a protocol buffer\nfield.\n\nConsider the following:\n\nmessage CreateContactRequest {\nmessage EmailAddress {\nenum Type {\nTYPE_UNSPECIFIED = 0;\nHOME = 1;\nWORK = 2;\n}\n\noptional string email = 1;\nrepeated EmailType type = 2;\n}\n\nstring full_name = 1;\nrepeated EmailAddress email_addresses = 2;\n}\n\nIn this example, in proto `field` could take one of the following values:\n\n* `full_name` for a violation in the `full_name` value\n* `email_addresses[0].email` for a violation in the `email` field of the\nfirst `email_addresses` message\n* `email_addresses[2].type[1]` for a violation in the second `type`\nvalue in the third `email_addresses` message.\n\nIn JSON, the same values are represented as:\n\n* `fullName` for a violation in the `fullName` value\n* `emailAddresses[0].email` for a violation in the `email` field of the\nfirst `emailAddresses` message\n* `emailAddresses[2].type[1]` for a violation in the second `type`\nvalue in the third `emailAddresses` message.",
"type": "string"
}localizedMessage
Schema:
LocalizedMessage
All schema constraints and annotations
{
"$ref": "#/components/schemas/LocalizedMessage",
"description": "Provides a localized error message for field-level errors that is safe to\nreturn to the API consumer."
}reason
Type:
string
[A-Z][A-Z0-9_]+[A-Z0-9],
which represents UPPER_SNAKE_CASE.All schema constraints and annotations
{
"description": "The reason of the field-level error. This is a constant value that\nidentifies the proximate cause of the field-level error. It should\nuniquely identify the type of the FieldViolation within the scope of the\nErrorInfo.domain. This should be at most 63\ncharacters and match a regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`,\nwhich represents UPPER_SNAKE_CASE.",
"type": "string"
}All schema constraints and annotations
{
"description": "A message type used to describe a single bad request field.",
"properties": {
"description": {
"description": "A description of why the request element is bad.",
"type": "string"
},
"field": {
"description": "A path that leads to a field in the request body. The value will be a\nsequence of dot-separated identifiers that identify a protocol buffer\nfield.\n\nConsider the following:\n\nmessage CreateContactRequest {\nmessage EmailAddress {\nenum Type {\nTYPE_UNSPECIFIED = 0;\nHOME = 1;\nWORK = 2;\n}\n\noptional string email = 1;\nrepeated EmailType type = 2;\n}\n\nstring full_name = 1;\nrepeated EmailAddress email_addresses = 2;\n}\n\nIn this example, in proto `field` could take one of the following values:\n\n* `full_name` for a violation in the `full_name` value\n* `email_addresses[0].email` for a violation in the `email` field of the\nfirst `email_addresses` message\n* `email_addresses[2].type[1]` for a violation in the second `type`\nvalue in the third `email_addresses` message.\n\nIn JSON, the same values are represented as:\n\n* `fullName` for a violation in the `fullName` value\n* `emailAddresses[0].email` for a violation in the `email` field of the\nfirst `emailAddresses` message\n* `emailAddresses[2].type[1]` for a violation in the second `type`\nvalue in the third `emailAddresses` message.",
"type": "string"
},
"localizedMessage": {
"$ref": "#/components/schemas/LocalizedMessage",
"description": "Provides a localized error message for field-level errors that is safe to\nreturn to the API consumer."
},
"reason": {
"description": "The reason of the field-level error. This is a constant value that\nidentifies the proximate cause of the field-level error. It should\nuniquely identify the type of the FieldViolation within the scope of the\nErrorInfo.domain. This should be at most 63\ncharacters and match a regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`,\nwhich represents UPPER_SNAKE_CASE.",
"type": "string"
}
},
"title": "FieldViolation",
"type": "object"
}