diff --git a/controllers/data_download_controller.go b/controllers/data_download_controller.go index 957f2937aca974c40921e6bf31cf6baecc639ea5..efcb2957ba418d90f95230630348909ec1ad66d6 100644 --- a/controllers/data_download_controller.go +++ b/controllers/data_download_controller.go @@ -14,7 +14,7 @@ import ( // @Description Get gdd data csv // @Accept json // @Produce text/csv -// @Failure 400 {object} config.StandardError +// @Failure 400 {object} common.StandardError // @Param analog query boolean false "Add analog data to csv" // @Param cfs query boolean false "Add cfs data to csv" // @Param cfs_upper query boolean false "Add cfs upper bound data to csv" diff --git a/controllers/freezing_dates_controller.go b/controllers/freezing_dates_controller.go index e2c37ce150ba4777e3dc0baf10f05f4bb04db7cb..6b215e0fdc43cf5393fd02e39e4c451d6044d7b8 100644 --- a/controllers/freezing_dates_controller.go +++ b/controllers/freezing_dates_controller.go @@ -14,7 +14,7 @@ import ( // @Accept json // @Produce json // @Success 200 {object} models.FreezingDateResponse -// @Failure 400 {object} config.StandardError +// @Failure 400 {object} common.StandardError // @Param latitude query number true "Latitude to search for" // @Param longitude query number true "Longitude to search for" // @Param freezing_temp query number true "Freezing temperature to use" diff --git a/controllers/gdd_controller.go b/controllers/gdd_controller.go index 86448a2543d7d4e4cd95304c1a55ec85db9f8a7a..c0edb43a33c7d2fc9950e82f71d6f819bcc8efe6 100644 --- a/controllers/gdd_controller.go +++ b/controllers/gdd_controller.go @@ -17,7 +17,7 @@ var GetGddValues = services.GetGddValues // @Accept json // @Produce json // @Success 200 {object} models.GddResponse -// @Failure 400 {object} config.StandardError +// @Failure 400 {object} common.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 latitude query number true "Latitude to search for" @@ -37,7 +37,7 @@ func GetDailyGdd(c *fiber.Ctx) error { // @Accept json // @Produce json // @Success 200 {object} models.GddResponse -// @Failure 400 {object} config.StandardError +// @Failure 400 {object} common.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 latitude query number true "Latitude to search for" // @Param longitude query number true "Longitude to search for" diff --git a/controllers/misc_controller.go b/controllers/misc_controller.go index ab8af71f0cb50d569e9023ba3b3e4b7d50b40b05..0ffeb8580a18d3970377f4dd575ba512ec295bff 100644 --- a/controllers/misc_controller.go +++ b/controllers/misc_controller.go @@ -18,7 +18,7 @@ import ( // @Accept json // @Produce json // @Success 200 {object} models.AnalogResponse -// @Failure 400 {object} config.StandardError +// @Failure 400 {object} common.StandardError // @Param latitude query number true "Latitude to search for" // @Param longitude query number true "Longitude to search for" // @Router /api/weather/gdd/analog [get] @@ -44,7 +44,7 @@ func GetAnalogYear(c *fiber.Ctx) error { // @Accept json // @Produce json // @Success 200 {object} models.ConfidenceIntervalResposne -// @Failure 400 {object} config.StandardError +// @Failure 400 {object} common.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 latitude query number true "Latitude to search for" // @Param longitude query number true "Longitude to search for" diff --git a/controllers/nomads_controller.go b/controllers/nomads_controller.go index fb0cac71a9b5362bc4b1dad9601aa3ce259c13f0..3f8f6d46f8d493779b53fe5f782a1e8cf8cfe379 100644 --- a/controllers/nomads_controller.go +++ b/controllers/nomads_controller.go @@ -14,7 +14,7 @@ import ( // @Accept json // @Produce json // @Success 200 {object} models.GefsGddResponse -// @Failure 400 {object} config.StandardError +// @Failure 400 {object} common.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 latitude query number true "Latitude to search for" // @Param longitude query number true "Longitude to search for" @@ -32,7 +32,7 @@ func GetGefsGDD(c *fiber.Ctx) error { // @Accept json // @Produce json // @Success 200 {object} models.CfsGddResponse -// @Failure 400 {object} config.StandardError +// @Failure 400 {object} common.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 latitude query number true "Latitude to search for" // @Param longitude query number true "Longitude to search for" @@ -50,7 +50,7 @@ func GetCfsGDD(c *fiber.Ctx) error { // // @Accept json // // @Produce json // // @Success 200 {object} models.CfsGddResponse -// // @Failure 400 {object} config.StandardError +// // @Failure 400 {object} common.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 latitude query number true "Latitude to search for" // // @Param longitude query number true "Longitude to search for" diff --git a/controllers/seed_controllers.go b/controllers/seed_controllers.go index 24ca5b72cb254fac0c33b875d0a701d8488d3ab9..4b5cc2e30767cd77a151574a21b1eabbd455b96c 100644 --- a/controllers/seed_controllers.go +++ b/controllers/seed_controllers.go @@ -15,7 +15,7 @@ import ( // @Accept json // @Produce json // @Success 200 {object} models.SeedListResponse -// @Failure 400 {object} config.StandardError +// @Failure 400 {object} common.StandardError // @Param product query string true "Crop type to use" Enums(corn, soybean) // @Router /api/weather/gdd/seeds [get] func GetSeedList(c *fiber.Ctx) error { @@ -32,7 +32,7 @@ func GetSeedList(c *fiber.Ctx) error { // @Accept json // @Produce json // @Success 200 {object} models.CornMaturityResponse -// @Failure 400 {object} config.StandardError +// @Failure 400 {object} common.StandardError // @Param latitude query number true "Latitude to search for" // @Param longitude query number true "Longitude to search for" // @Param seed query string true "Corn seed to use" diff --git a/docs/docs.go b/docs/docs.go index 6adc5d37d5453735eb54fb7526a5fecd59edaf9b..3645be82c166cf180c813a7dfad3d58cd327939c 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -72,7 +72,7 @@ var doc = `{ "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/errors.StandardError" + "$ref": "#/definitions/common.StandardError" } } } @@ -117,7 +117,7 @@ var doc = `{ "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/errors.StandardError" + "$ref": "#/definitions/common.StandardError" } } } @@ -192,7 +192,7 @@ var doc = `{ "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/errors.StandardError" + "$ref": "#/definitions/common.StandardError" } } } @@ -260,7 +260,7 @@ var doc = `{ "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/errors.StandardError" + "$ref": "#/definitions/common.StandardError" } } } @@ -418,7 +418,7 @@ var doc = `{ "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/errors.StandardError" + "$ref": "#/definitions/common.StandardError" } } } @@ -500,7 +500,7 @@ var doc = `{ "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/errors.StandardError" + "$ref": "#/definitions/common.StandardError" } } } @@ -575,7 +575,7 @@ var doc = `{ "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/errors.StandardError" + "$ref": "#/definitions/common.StandardError" } } } @@ -650,7 +650,7 @@ var doc = `{ "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/errors.StandardError" + "$ref": "#/definitions/common.StandardError" } } } @@ -692,7 +692,7 @@ var doc = `{ "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/errors.StandardError" + "$ref": "#/definitions/common.StandardError" } } } @@ -758,7 +758,7 @@ var doc = `{ "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/errors.StandardError" + "$ref": "#/definitions/common.StandardError" } } } @@ -766,7 +766,7 @@ var doc = `{ } }, "definitions": { - "errors.StandardError": { + "common.StandardError": { "type": "object", "properties": { "description": { diff --git a/docs/swagger.json b/docs/swagger.json index 77fea7ab0bc414e9379944b9e8a482cdd25ffaf5..a110e77c39d9d6eb870da3c578e08881ff69cfe0 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -58,7 +58,7 @@ "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/errors.StandardError" + "$ref": "#/definitions/common.StandardError" } } } @@ -103,7 +103,7 @@ "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/errors.StandardError" + "$ref": "#/definitions/common.StandardError" } } } @@ -178,7 +178,7 @@ "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/errors.StandardError" + "$ref": "#/definitions/common.StandardError" } } } @@ -246,7 +246,7 @@ "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/errors.StandardError" + "$ref": "#/definitions/common.StandardError" } } } @@ -404,7 +404,7 @@ "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/errors.StandardError" + "$ref": "#/definitions/common.StandardError" } } } @@ -486,7 +486,7 @@ "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/errors.StandardError" + "$ref": "#/definitions/common.StandardError" } } } @@ -561,7 +561,7 @@ "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/errors.StandardError" + "$ref": "#/definitions/common.StandardError" } } } @@ -636,7 +636,7 @@ "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/errors.StandardError" + "$ref": "#/definitions/common.StandardError" } } } @@ -678,7 +678,7 @@ "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/errors.StandardError" + "$ref": "#/definitions/common.StandardError" } } } @@ -744,7 +744,7 @@ "400": { "description": "Bad Request", "schema": { - "$ref": "#/definitions/errors.StandardError" + "$ref": "#/definitions/common.StandardError" } } } @@ -752,7 +752,7 @@ } }, "definitions": { - "errors.StandardError": { + "common.StandardError": { "type": "object", "properties": { "description": { diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 9ad846550ace15df3cce1ac1158890443b013b91..8310da733a31b92aa675906d92a15e4f3a805a45 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -1,6 +1,6 @@ basePath: / definitions: - errors.StandardError: + common.StandardError: properties: description: type: string @@ -175,7 +175,7 @@ paths: "400": description: Bad Request schema: - $ref: '#/definitions/errors.StandardError' + $ref: '#/definitions/common.StandardError' summary: get freezing dates tags: - Freezing Dates @@ -205,7 +205,7 @@ paths: "400": description: Bad Request schema: - $ref: '#/definitions/errors.StandardError' + $ref: '#/definitions/common.StandardError' summary: Get analog year tags: - Gdd @@ -260,7 +260,7 @@ paths: "400": description: Bad Request schema: - $ref: '#/definitions/errors.StandardError' + $ref: '#/definitions/common.StandardError' summary: Get GDD values calculated from CFS tags: - Gdd @@ -310,7 +310,7 @@ paths: "400": description: Bad Request schema: - $ref: '#/definitions/errors.StandardError' + $ref: '#/definitions/common.StandardError' summary: Get confidence interval tags: - Gdd @@ -420,7 +420,7 @@ paths: "400": description: Bad Request schema: - $ref: '#/definitions/errors.StandardError' + $ref: '#/definitions/common.StandardError' summary: Get gdd data csv tags: - Gdd @@ -480,7 +480,7 @@ paths: "400": description: Bad Request schema: - $ref: '#/definitions/errors.StandardError' + $ref: '#/definitions/common.StandardError' summary: Get gdd values tags: - Gdd @@ -535,7 +535,7 @@ paths: "400": description: Bad Request schema: - $ref: '#/definitions/errors.StandardError' + $ref: '#/definitions/common.StandardError' summary: Get GDD values calculated from GEFS tags: - Gdd @@ -590,7 +590,7 @@ paths: "400": description: Bad Request schema: - $ref: '#/definitions/errors.StandardError' + $ref: '#/definitions/common.StandardError' summary: Get gdd normals tags: - Gdd @@ -618,7 +618,7 @@ paths: "400": description: Bad Request schema: - $ref: '#/definitions/errors.StandardError' + $ref: '#/definitions/common.StandardError' summary: Get list of seeds in database tags: - GDD Seed Data @@ -663,7 +663,7 @@ paths: "400": description: Bad Request schema: - $ref: '#/definitions/errors.StandardError' + $ref: '#/definitions/common.StandardError' summary: Get estimated maturity date from corn seed (uses CFS data if current GDUs are less than the crop maturity) tags: