| 1 |
// Copyright 2023 Princess B33f Heavy Industries / Dave Shanley |
| 2 |
// SPDX-License-Identifier: MIT |
| 3 |
|
| 4 |
package errors |
| 5 |
|
| 6 |
const ( |
| 7 |
HowToFixReservedValues string = "parameter values need to URL Encoded to ensure reserved " + |
| 8 |
"values are correctly encoded, for example: '%s'" |
| 9 |
HowToFixParamInvalidInteger string = "Convert the value '%s' into an integer" |
| 10 |
HowToFixParamInvalidNumber string = "Convert the value '%s' into a number" |
| 11 |
HowToFixParamInvalidString string = "Convert the value '%s' into a string (cannot start with a number, or be a floating point)" |
| 12 |
HowToFixParamInvalidBoolean string = "Convert the value '%s' into a true/false value" |
| 13 |
HowToFixParamInvalidEnum string = "Instead of '%s', use one of the allowed values: '%s'" |
| 14 |
HowToFixParamInvalidFormEncode string = "Use a form style encoding for parameter values, for example: '%s'" |
| 15 |
HowToFixInvalidXml string = "Ensure xml is well-formed and matches schema structure" |
| 16 |
HowToFixXmlPrefix string = "Make sure to prepend the correct prefix '%s' to the declared fields" |
| 17 |
HowToFixXmlNamespace string = "Make sure to declare the 'xmlns:%s' with the correct namespace URI" |
| 18 |
HowToFixFormDataReservedCharacters string = "Make sure to correcly encode specials characters to percent encoding, or set allowReserved to true" |
| 19 |
HowToFixInvalidSchema string = "Ensure that the object being submitted, matches the schema correctly" |
| 20 |
HowToFixInvalidTypeEncoding string = "Ensure that the object being submitted matches the property encoding Content-Type" |
| 21 |
HowToFixParamInvalidSpaceDelimitedObjectExplode string = "When using 'explode' with space delimited parameters, " + |
| 22 |
"they should be separated by spaces. For example: '%s'" |
| 23 |
HowToFixParamInvalidPipeDelimitedObjectExplode string = "When using 'explode' with pipe delimited parameters, " + |
| 24 |
"they should be separated by pipes '|'. For example: '%s'" |
| 25 |
HowToFixParamInvalidDeepObjectMultipleValues string = "There can only be a single value per property name, " + |
| 26 |
"deepObject parameters should contain the property key in square brackets next to the parameter name. For example: '%s'" |
| 27 |
HowToFixParamInvalidDeepObjectPathConflict string = "Use either '%s[%s]' or nested properties like '%s[%s]', not both" |
| 28 |
HowToFixInvalidJSON string = "The JSON submitted is invalid, please check the syntax" |
| 29 |
HowToFixInvalidUrlEncoded string = "Ensure URL Encoded submitted is well-formed and matches schema structure" |
| 30 |
HowToFixDecodingError string = "The object can't be decoded, so make sure it's being encoded correctly according to the spec." |
| 31 |
HowToFixInvalidContentType string = "The content type is invalid, Use one of the %d supported types for this operation: %s" |
| 32 |
HowToFixInvalidResponseCode string = "The service is responding with a code that is not defined in the spec, fix the service or add the code to the specification" |
| 33 |
HowToFixInvalidEncoding string = "Ensure the correct encoding has been used on the object" |
| 34 |
HowToFixMissingValue string = "Ensure the value has been set" |
| 35 |
HowToFixPath string = "Check the path is correct, and check that the correct HTTP method has been used (e.g. GET, POST, PUT, DELETE)" |
| 36 |
HowToFixPathMethod string = "Add the missing operation to the contract for the path" |
| 37 |
HowToFixInvalidMaxItems string = "Reduce the number of items in the array to %d or less" |
| 38 |
HowToFixInvalidMinItems string = "Increase the number of items in the array to %d or more" |
| 39 |
HowToFixMissingHeader string = "Make sure the service responding sets the required headers with this response code" |
| 40 |
HowToFixInvalidRenderedSchema string = "Check the request schema for circular references or invalid structures" |
| 41 |
HowToFixInvalidJsonSchema string = "Check the request schema for invalid JSON Schema syntax, complex regex patterns, or unsupported schema constructs" |
| 42 |
) |