schmurfy / chipi

Lines not covered in tests TCV-001
Coverage
Critical
7 occurrences in this check
Lines not covered in tests
 51			}
 52		} else if typ.Kind() == reflect.Slice {
 53			responseSchema, err := b.schema.GenerateFilteredSchemaFor(ctx, swagger, typ, filterObject)
 54			if err != nil { 55				return err 56			} 57			if responseSchema.Value.Format == "binary" {
 58				contentType = "application/octet-stream"
 59			}
Lines not covered in tests
 40
 41		if typ.Kind() == reflect.Struct {
 42			responseSchema, err := b.schema.GenerateFilteredSchemaFor(ctx, swagger, typ, filterObject)
 43			if err != nil { 44				return err 45			} 46
 47			resp.Content = openapi3.Content{
 48				contentType: &openapi3.MediaType{
Lines not covered in tests
 95		if p, ok := ret[0].Interface().(*openapi3.Parameter); ok && (p != nil) {
 96			if p.Description != "" {
 97				resp.Description = &p.Description
 98			} 99		}
100	}
101
Lines not covered in tests
 34		}
 35
 36		err := fillResponseFromTags(requestObjectType, resp, responseField)
 37		if err != nil { 38			return err 39		} 40
 41		if typ.Kind() == reflect.Struct {
 42			responseSchema, err := b.schema.GenerateFilteredSchemaFor(ctx, swagger, typ, filterObject)
Lines not covered in tests
 93		})
 94
 95		if p, ok := ret[0].Interface().(*openapi3.Parameter); ok && (p != nil) {
 96			if p.Description != "" { 97				resp.Description = &p.Description 98			}
 99		}
100	}
Lines not covered in tests
 29		}
 30
 31		typ := responseField.Type
 32		if typ.Kind() == reflect.Ptr { 33			typ = typ.Elem() 34		} 35
 36		err := fillResponseFromTags(requestObjectType, resp, responseField)
 37		if err != nil {
Lines not covered in tests
 86	nilValue := reflect.New(requestObjectType)
 87
 88	opMethod, hasOperationAnnotations := reflect.PtrTo(requestObjectType).MethodByName("CHIPI_Response_Annotations")
 89	if hasOperationAnnotations { 90		ret := opMethod.Func.Call([]reflect.Value{ 91			nilValue, 92			reflect.ValueOf(""), 93		}) 94 95		if p, ok := ret[0].Interface().(*openapi3.Parameter); ok && (p != nil) { 96			if p.Description != "" {
 97				resp.Description = &p.Description
 98			}