Fix duplicate product path in swagger docs

This commit is contained in:
Tiago Yamamoto 2025-12-19 19:32:16 -03:00
parent cee817cd60
commit e5103db905
2 changed files with 1 additions and 218 deletions

View file

@ -461,137 +461,6 @@
}
}
},
"/api/v1/products/{id}": {
"get": {
"produces": [
"application/json"
],
"tags": [
"Produtos"
],
"summary": "Obter produto",
"parameters": [
{
"type": "string",
"description": "Product ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/domain.Product"
}
},
"404": {
"description": "Not Found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"delete": {
"tags": [
"Produtos"
],
"summary": "Remover produto",
"parameters": [
{
"type": "string",
"description": "Product ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": ""
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "Not Found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"patch": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Produtos"
],
"summary": "Atualizar produto",
"parameters": [
{
"type": "string",
"description": "Product ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Campos para atualização",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handler.updateProductRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/domain.Product"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "Not Found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/v1/auth/login": {
"post": {
"description": "Autentica usuário e retorna token JWT.",
@ -2870,4 +2739,4 @@
"in": "header"
}
}
}
}

View file

@ -804,92 +804,6 @@ paths:
summary: Cadastro de produto com rastreabilidade de lote
tags:
- Produtos
/api/v1/products/{id}:
delete:
parameters:
- description: Product ID
in: path
name: id
required: true
type: string
responses:
"204":
description: ""
"400":
description: Bad Request
schema:
additionalProperties:
type: string
type: object
"404":
description: Not Found
schema:
additionalProperties:
type: string
type: object
summary: Remover produto
tags:
- Produtos
get:
parameters:
- description: Product ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.Product'
"404":
description: Not Found
schema:
additionalProperties:
type: string
type: object
summary: Obter produto
tags:
- Produtos
patch:
consumes:
- application/json
parameters:
- description: Product ID
in: path
name: id
required: true
type: string
- description: Campos para atualização
in: body
name: payload
required: true
schema:
$ref: '#/definitions/handler.updateProductRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.Product'
"400":
description: Bad Request
schema:
additionalProperties:
type: string
type: object
"404":
description: Not Found
schema:
additionalProperties:
type: string
type: object
summary: Atualizar produto
tags:
- Produtos
/api/v1/auth/login:
post:
consumes: