Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dawn-gdd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
dawn
go-backend
dawn-gdd
Commits
82df0758
Commit
82df0758
authored
2 years ago
by
Tucker Gary Siegel
Browse files
Options
Downloads
Patches
Plain Diff
update swagger documentation
parent
c20fb3fa
No related branches found
No related tags found
1 merge request
!23
update swagger documentation
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
controllers/gdd_controller.go
+12
-6
12 additions, 6 deletions
controllers/gdd_controller.go
main.go
+6
-0
6 additions, 0 deletions
main.go
with
18 additions
and
6 deletions
controllers/gdd_controller.go
+
12
−
6
View file @
82df0758
...
...
@@ -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"
...
...
This diff is collapsed.
Click to expand it.
main.go
+
6
−
0
View file @
82df0758
...
...
@@ -4,6 +4,12 @@ import (
"gitlab.cs.umd.edu/dawn/go-backend/dawn-gdd/cmd"
)
// @title Dawn GDD Service
// @contact.name API Support
// @contact.email tgsiegel@umd.edu
// @securityDefinitions.apikey ApiKeyAuth
// @in header
// @name Authorization
func
main
()
{
cmd
.
Execute
()
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment