basePath: / definitions: dto.CreateProductInput: properties: name: type: string price: type: number type: object dto.CreateUserInput: properties: email: type: string name: type: string password: type: string type: object dto.GetJWTInput: properties: email: type: string password: type: string type: object dto.GetJWTOutput: properties: access_token: type: string type: object entity.Product: properties: created_at: type: string id: type: string name: type: string price: type: number type: object handlers.Error: properties: message: type: string type: object host: localhost:8085 info: contact: email: wrferreira1003@gmail.com name: Wellington Ferreira url: https://github.com/wrferreira1003 description: API Server Go com Go e Chi license: name: MIT url: https://opensource.org/licenses/MIT termsOfService: http://swagger.io/terms/ title: API Server Go version: "1.0" paths: /products: get: consumes: - application/json description: Get Product parameters: - description: Page number in: query name: page type: string - description: Number of products per page in: query name: limit type: string - description: Sort by in: query name: sort type: string produces: - application/json responses: "200": description: OK schema: items: $ref: '#/definitions/entity.Product' type: array "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.Error' security: - ApiKeyAuth: [] summary: Get Product tags: - Products post: consumes: - application/json description: Create Product parameters: - description: use request in: body name: request required: true schema: $ref: '#/definitions/dto.CreateProductInput' produces: - application/json responses: "201": description: Created "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.Error' security: - ApiKeyAuth: [] summary: Create Product tags: - Products /products/{id}: delete: consumes: - application/json description: Delete Product parameters: - description: Product ID format: uuid in: path name: id required: true type: string produces: - application/json responses: "200": description: OK "404": description: Not Found schema: $ref: '#/definitions/handlers.Error' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.Error' security: - ApiKeyAuth: [] summary: Delete Product tags: - Products get: consumes: - application/json description: Get Product parameters: - description: Product ID format: uuid in: path name: id required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/entity.Product' "404": description: Not Found schema: $ref: '#/definitions/handlers.Error' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.Error' security: - ApiKeyAuth: [] summary: Get Product tags: - Products put: consumes: - application/json description: Update Product parameters: - description: Product ID format: uuid in: path name: id required: true type: string - description: product update request in: body name: request required: true schema: $ref: '#/definitions/dto.CreateProductInput' produces: - application/json responses: "200": description: OK "404": description: Not Found schema: $ref: '#/definitions/handlers.Error' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.Error' security: - ApiKeyAuth: [] summary: Update Product tags: - Products /users: post: consumes: - application/json description: Create User parameters: - description: use request in: body name: request required: true schema: $ref: '#/definitions/dto.CreateUserInput' produces: - application/json responses: "201": description: Created "400": description: Bad Request "500": description: Internal Server Error summary: Create User tags: - Users /users/generate_token: post: consumes: - application/json description: Get a user JWT parameters: - description: use request in: body name: request required: true schema: $ref: '#/definitions/dto.GetJWTInput' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/dto.GetJWTOutput' "404": description: Not Found "500": description: Internal Server Error summary: Get a user JWT tags: - Users securityDefinitions: ApiKeyAuth: in: header name: Authorization type: apiKey swagger: "2.0"