You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up to #1187, which typed every fmt.Errorf inside every Validate function in the openapi3 package. During that sweep I noted adjacent untyped sites; this records the ones that are genuinely spec Validate() errors and could benefit from typed clusters in a future PR. Not a prioritization signal.
Scope (trimmed). This now covers only errors raised from Validate() on the spec. An earlier version of this issue also listed loader $ref errors (loader.go), the JSON-Schema-compilation and value-validation paths (schema_jsonschema_validator.go, the schema.go value checks), and the NewRegexpFormatValidator constructor panic. Those are dropped: they fire during loading, during runtime value validation, or (for the constructor) at setup time, not during spec validation, so they never surface as Validate() findings and a typed cluster there wouldn't be reachable via the Validate()errors.As walk.
Candidates (spec validation only)
Each entry: current bare error → proposed typed cluster.
Duplicate value in enum: [...] → EnumDuplicateValueError{Value}
Duplicate entry in required: [...] → RequiredFieldDuplicatedError{Field}
Follow-up to #1187, which typed every
fmt.Errorfinside everyValidatefunction in theopenapi3package. During that sweep I noted adjacent untyped sites; this records the ones that are genuinely specValidate()errors and could benefit from typed clusters in a future PR. Not a prioritization signal.Scope (trimmed). This now covers only errors raised from
Validate()on the spec. An earlier version of this issue also listed loader$referrors (loader.go), the JSON-Schema-compilation and value-validation paths (schema_jsonschema_validator.go, theschema.govalue checks), and theNewRegexpFormatValidatorconstructor panic. Those are dropped: they fire during loading, during runtime value validation, or (for the constructor) at setup time, not during spec validation, so they never surface asValidate()findings and a typed cluster there wouldn't be reachable via theValidate()errors.Aswalk.Candidates (spec validation only)
Each entry: current bare error → proposed typed cluster.
enum: [...]→EnumDuplicateValueError{Value}required: [...]→RequiredFieldDuplicatedError{Field}oneOf/anyOf/allOfelement validation failure →SchemaCombinatorElementValidationError{Combinator, Cause}(context wrapper)tagselement validation failure →TagInvalidError{Cause}(context wrapper)Notes
Error()strings can be preserved byte-for-byte, following the same backward-compat pattern as openapi3: type the remaining bare-error validation sites #1187.validation_error.goandvalidation_error_context.goapplies.