@@ -28,8 +28,8 @@ func (v *paramValidator) ValidateSecurity(request *http.Request) (bool, []*error
2828func (v * paramValidator ) ValidateSecurityWithPathItem (request * http.Request , pathItem * v3.PathItem , pathValue string ) (bool , []* errors.ValidationError ) {
2929 if pathItem == nil {
3030 return false , []* errors.ValidationError {{
31- ValidationType : helpers .ParameterValidationPath ,
32- ValidationSubType : "missing" ,
31+ ValidationType : helpers .PathValidation ,
32+ ValidationSubType : helpers . ValidationMissing ,
3333 Message : fmt .Sprintf ("%s Path '%s' not found" , request .Method , request .URL .Path ),
3434 Reason : fmt .Sprintf ("The %s request contains a path of '%s' " +
3535 "however that path, or the %s method for that path does not exist in the specification" ,
@@ -71,7 +71,7 @@ func (v *paramValidator) ValidateSecurityWithPathItem(request *http.Request, pat
7171 Message : fmt .Sprintf ("Security scheme '%s' is missing" , secName ),
7272 Reason : fmt .Sprintf ("The security scheme '%s' is defined as being required, " +
7373 "however it's missing from the components" , secName ),
74- ValidationType : "security" ,
74+ ValidationType : helpers . SecurityValidation ,
7575 SpecLine : sec .GoLow ().Requirements .ValueNode .Line ,
7676 SpecCol : sec .GoLow ().Requirements .ValueNode .Column ,
7777 HowToFix : "Add the missing security scheme to the components" ,
@@ -131,7 +131,7 @@ func (v *paramValidator) validateHTTPSecurityScheme(
131131 {
132132 Message : fmt .Sprintf ("Authorization header for '%s' scheme" , secScheme .Scheme ),
133133 Reason : "Authorization header was not found" ,
134- ValidationType : "security" ,
134+ ValidationType : helpers . SecurityValidation ,
135135 ValidationSubType : secScheme .Scheme ,
136136 SpecLine : sec .GoLow ().Requirements .ValueNode .Line ,
137137 SpecCol : sec .GoLow ().Requirements .ValueNode .Column ,
@@ -159,7 +159,7 @@ func (v *paramValidator) validateAPIKeySecurityScheme(
159159 {
160160 Message : fmt .Sprintf ("API Key %s not found in header" , secScheme .Name ),
161161 Reason : "API Key not found in http header for security scheme 'apiKey' with type 'header'" ,
162- ValidationType : "security" ,
162+ ValidationType : helpers . SecurityValidation ,
163163 ValidationSubType : "apiKey" ,
164164 SpecLine : sec .GoLow ().Requirements .ValueNode .Line ,
165165 SpecCol : sec .GoLow ().Requirements .ValueNode .Column ,
@@ -183,7 +183,7 @@ func (v *paramValidator) validateAPIKeySecurityScheme(
183183 {
184184 Message : fmt .Sprintf ("API Key %s not found in query" , secScheme .Name ),
185185 Reason : "API Key not found in URL query for security scheme 'apiKey' with type 'query'" ,
186- ValidationType : "security" ,
186+ ValidationType : helpers . SecurityValidation ,
187187 ValidationSubType : "apiKey" ,
188188 SpecLine : sec .GoLow ().Requirements .ValueNode .Line ,
189189 SpecCol : sec .GoLow ().Requirements .ValueNode .Column ,
@@ -207,7 +207,7 @@ func (v *paramValidator) validateAPIKeySecurityScheme(
207207 {
208208 Message : fmt .Sprintf ("API Key %s not found in cookies" , secScheme .Name ),
209209 Reason : "API Key not found in http request cookies for security scheme 'apiKey' with type 'cookie'" ,
210- ValidationType : "security" ,
210+ ValidationType : helpers . SecurityValidation ,
211211 ValidationSubType : "apiKey" ,
212212 SpecLine : sec .GoLow ().Requirements .ValueNode .Line ,
213213 SpecCol : sec .GoLow ().Requirements .ValueNode .Column ,
0 commit comments