diff --git a/docs/docs.go b/docs/docs.go index 37662df..88c6e3a 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -9,16 +9,7 @@ const docTemplate = `{ "info": { "description": "{{escape .Description}}", "title": "{{.Title}}", - "termsOfService": "http://swagger.io/terms/", - "contact": { - "name": "API Support", - "url": "http://www.swagger.io/support", - "email": "support@swagger.io" - }, - "license": { - "name": "Apache 2.0", - "url": "http://www.apache.org/licenses/LICENSE-2.0.html" - }, + "contact": {}, "version": "{{.Version}}" }, "host": "{{.Host}}", @@ -1518,7 +1509,7 @@ const docTemplate = `{ "type": "string" }, "product_quantity": { - "type": "number" + "type": "string" }, "product_type": { "type": "string" @@ -1586,7 +1577,7 @@ const docTemplate = `{ // SwaggerInfo holds exported Swagger Info so clients can modify it var SwaggerInfo = &swag.Spec{ Version: "1.0", - Host: "localhost:80", + Host: "", BasePath: "/api/v1", Schemes: []string{}, Title: "Database API Wrapper", diff --git a/docs/swagger.json b/docs/swagger.json index 6daa340..53776d3 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -3,19 +3,9 @@ "info": { "description": "API for accessing the SnackLog product database.", "title": "Database API Wrapper", - "termsOfService": "http://swagger.io/terms/", - "contact": { - "name": "API Support", - "url": "http://www.swagger.io/support", - "email": "support@swagger.io" - }, - "license": { - "name": "Apache 2.0", - "url": "http://www.apache.org/licenses/LICENSE-2.0.html" - }, + "contact": {}, "version": "1.0" }, - "host": "localhost:80", "basePath": "/api/v1", "paths": { "/products/search": { @@ -1512,7 +1502,7 @@ "type": "string" }, "product_quantity": { - "type": "number" + "type": "string" }, "product_type": { "type": "string" diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 4e70cad..14eed31 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -892,7 +892,7 @@ definitions: product_name_de: type: string product_quantity: - type: number + type: string product_type: type: string quantity: @@ -929,17 +929,9 @@ definitions: items: {} type: array type: object -host: localhost:80 info: - contact: - email: support@swagger.io - name: API Support - url: http://www.swagger.io/support + contact: {} description: API for accessing the SnackLog product database. - license: - name: Apache 2.0 - url: http://www.apache.org/licenses/LICENSE-2.0.html - termsOfService: http://swagger.io/terms/ title: Database API Wrapper version: "1.0" paths: diff --git a/internal/database/product/product.go b/internal/database/product/product.go index 0724939..1f7d554 100644 --- a/internal/database/product/product.go +++ b/internal/database/product/product.go @@ -37,7 +37,7 @@ type Product struct { UniqueScansN int `json:"unique_scans_n" bson:"unique_scans_n,truncate"` FoodGroupsTags []interface{} `json:"food_groups_tags" bson:"food_groups_tags,truncate"` States string `json:"states" bson:"states"` - ProductQuantity float64 `json:"product_quantity" bson:"product_quantity,truncate"` + ProductQuantity string `json:"product_quantity" bson:"product_quantity,truncate"` Brands string `json:"brands" bson:"brands"` Quantity string `json:"quantity" bson:"quantity"` EnvironmentalScoreData struct {