Mismatched CodePipeline CloudWatch fields
- Lenguaje dominante
- Go
- Estrellas
- 3.8k
- Forks
- 578
- Merge medio
- 8 h 18 min
- PR fusionados (30 d)
- 1
Descripción
Hi all, thanks for your support on this library. I was recently trying to replace our homemade structs for CodePipeline events with the ones defined in this package but I'm running into the following errors unmarshalling the `version` fields in `CodePipelineEventDetail` and `CodePipelineEventDetail`:
```Go
json: cannot unmarshal number 2.0 into Go struct field CodePipelineEventDetail.detail.version of type int64: errorString null
json: cannot unmarshal string into Go struct field CodePipelineEventDetailType.detail.type.version of type int64: errorString null
```
The unmarshalling works when `CodePipelineEventDetail.detail.version` is a `float64` and `CodePipelineEventDetailType.detail.type.version` is a string (using our own structs). Would y'all mind taking another look at the types for the two `versions` fields?
Based on the comments for each of them, it sounds like there's some mismatch in the schema/documentation:
https://github.com/aws/aws-lambda-go/blob/96ab249f3eb7644ebc3bb7a190d268184fdd9f4e/events/codepipeline_cloudwatch.go#L82-L83
https://github.com/aws/aws-lambda-go/blob/96ab249f3eb7644ebc3bb7a190d268184fdd9f4e/events/codepipeline_cloudwatch.go#L105-L106
Thanks!
Guía de contribución
Línea de trabajo
Comienza en events/codepipeline_cloudwatch.go, en las líneas referenciadas para los campos version de CodePipelineEventDetail y CodePipelineEventDetailType. Compara esas declaraciones con los errores de JSON unmarshalling reportados y los comentarios; después, confirma que valores numéricos y de cadena representativos de version se decodifican correctamente con los tipos corregidos.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- go
- Área
- backend
- Tipo de issue
- Error
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 45/100