Skip to content
Snippets Groups Projects

update swagger documentation

Merged Tucker Gary Siegel requested to merge oob-fix into develop
2 files
+ 18
6
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -12,19 +12,25 @@ import (
var GetGddValues = services.GetGddValues
// GetDailyGdd godoc
<<<<<<< controllers/gdd_controller.go
// @Summary Get GDD Values for given year
// @Tags Gdd, public
// @Security ApiKeyAuth
=======
// @Summary Get gdd values
// @Tags Gdd, public
// @Description get gdd values
>>>>>>> controllers/gdd_controller.go
// @Accept json
// @Produce json
// @Success 200 {object} models.GddResponse
// @Failure 400 {object} errors.StandardError
// @Param year query int true "Year to get gdd for"
// @Param product query string true "Crop to calculate gdd for" Enums(corn, soybean, sunflower, tomato, sugar_beet, peanut, cotton, potato, wheat, pea, oat, spring_wheat, rice, sorghum)
// @Param product query string true "Crop to calculate gdd for" Enums(corn)
// @Param latitude query number true "Latitude to search for"
// @Param longitude query number true "Longitude to search for"
// @Param accumulate query boolean true "Accumulate gdd values"
// @Param plantingDate query string true "Plant date, ISO8601 or RFC3339 format"
// @Param plantingDate query string true "Plant date RFC3339 format"
// @Router /gdd/daily [get]
func GetDailyGdd(c *fiber.Ctx) error {
ctx := common.DawnCtx{FiberCtx: c}
@@ -33,14 +39,14 @@ func GetDailyGdd(c *fiber.Ctx) error {
}
// GetNormalGdd godoc
// @Summary Get gdd normals
// @Tags Gdd
// @Description get gdd normals
// @Summary Get GDD normals over the past 30 years
// @Tags Gdd, public
// @Security ApiKeyAuth
// @Accept json
// @Produce json
// @Success 200 {object} models.GddResponse
// @Failure 400 {object} errors.StandardError
// @Param product query string true "Crop to calculate gdd for" Enums(corn, soybean, sunflower, tomato, sugar_beet, peanut, cotton, potato, wheat, pea, oat, spring_wheat, rice, sorghum)
// @Param product query string true "Crop to calculate gdd for" Enums(corn)
// @Param latitude query number true "Latitude to search for"
// @Param longitude query number true "Longitude to search for"
// @Param accumulate query boolean true "Accumulate gdd values"
Loading