diff --git a/Makefile b/Makefile index 06878a8..8d3c102 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ generate: --go_out ./proto --go_opt paths=source_relative \ --go-grpc_out ./proto --go-grpc_opt paths=source_relative \ --grpc-gateway_out ./proto --grpc-gateway_opt paths=source_relative \ - --swagger_out=allow_merge=true,merge_file_name=main:./resources \ + --openapiv2_out=./resources \ ./api/main.proto run: diff --git a/resources/main.swagger.json b/resources/main.swagger.json index 077d258..6d479d1 100644 --- a/resources/main.swagger.json +++ b/resources/main.swagger.json @@ -4,6 +4,11 @@ "title": "main.proto", "version": "version not set" }, + "tags": [ + { + "name": "CRM" + } + ], "consumes": [ "application/json" ], @@ -24,7 +29,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/rpcStatus" } } }, @@ -55,7 +60,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/rpcStatus" } } }, @@ -77,7 +82,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/rpcStatus" } } }, @@ -108,7 +113,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/rpcStatus" } } }, @@ -134,6 +139,7 @@ "categories": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/crmCategory" } } @@ -145,6 +151,7 @@ "categories": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/crmCategory" } } @@ -166,6 +173,7 @@ "children": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/crmCategory" } } @@ -202,6 +210,7 @@ "products": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/crmProduct" } } @@ -232,9 +241,10 @@ "description": { "type": "string" }, - "grouped_products": { + "groupedProducts": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/crmGroupedProduct" } }, @@ -248,12 +258,14 @@ "variants": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/crmVariant" } }, "characteristics": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/crmCharacteristic" } }, @@ -292,6 +304,7 @@ "properties": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/crmProperty" } } @@ -300,21 +313,15 @@ "protobufAny": { "type": "object", "properties": { - "type_url": { + "@type": { "type": "string" - }, - "value": { - "type": "string", - "format": "byte" } - } + }, + "additionalProperties": {} }, - "runtimeError": { + "rpcStatus": { "type": "object", "properties": { - "error": { - "type": "string" - }, "code": { "type": "integer", "format": "int32" @@ -325,6 +332,7 @@ "details": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/protobufAny" } }