From 3b424a913ff703d6f4a4eb094a3ecebe611fe1f5 Mon Sep 17 00:00:00 2001
From: Edwards Yan <117830579+Frompaje@users.noreply.github.com>
Date: Tue, 30 Apr 2024 14:24:26 -0300
Subject: [PATCH] =?UTF-8?q?docs:=20atualiza=C3=A7=C3=A3o=20do=20endpoint?=
=?UTF-8?q?=20de=20cadastro=20do=20usu=C3=A1rio=20(#42)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* docs: atualização do endpoint de cadastro do usuário
* docs: adicionei o name,reapeatPassowrd,username em req
* docs: "corrigir erros de cody style"
---
.github/pull_request_template.md | 56 +++++++++++++++++++
.../user/components/user-create-body.yaml | 26 +++++++--
openapi/features/user/user-create-path.yaml | 4 +-
openapi/main.yaml | 2 +-
4 files changed, 80 insertions(+), 8 deletions(-)
create mode 100644 .github/pull_request_template.md
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
new file mode 100644
index 0000000..c25b89f
--- /dev/null
+++ b/.github/pull_request_template.md
@@ -0,0 +1,56 @@
+Closes
+
+
+
+ Feature
+
+
+N/A
+
+
+
+
+
+ Bugfix
+
+
+- **Description**
+ N/A
+
+- **Cause**
+ N/A
+
+- **Solution**
+N/A
+
+
+
+
+ Changelog
+
+N/A
+
+
+
+
+ Visual evidences :framed_picture:
+
+
+
+
+
+
+ Checklist
+
+
+- [ ] Issue linked
+- [ ] Build working correctly
+- [ ] Tests created
+
+
+
+
+ Additional info
+
+N/A
+
diff --git a/openapi/features/user/components/user-create-body.yaml b/openapi/features/user/components/user-create-body.yaml
index 9e14cc0..60deec8 100644
--- a/openapi/features/user/components/user-create-body.yaml
+++ b/openapi/features/user/components/user-create-body.yaml
@@ -4,14 +4,30 @@ content:
schema:
type: object
properties:
- password:
+ name:
type: string
- description: Password for the new user account
- example: 'alexandre-123'
+ description: User account name
+ example: 'John Doe'
+ username:
+ type: string
+ description: User name
+ example: 'johndoe123'
email:
type: string
description: Email address for the new user account
- example: 'alexandre@gmail.com'
+ example: 'johndoe@example.com'
+ password:
+ type: string
+ description: Password for the new user account
+ example: '001@Mypassword'
+ repeatPassword:
+ type: string
+ description: Confirming the user's new password
+ example: '001@Mypassword'
+
required:
- - password
+ - name
+ - username
- email
+ - password
+ - repeatPassword
diff --git a/openapi/features/user/user-create-path.yaml b/openapi/features/user/user-create-path.yaml
index 8496fdf..0d22ecc 100644
--- a/openapi/features/user/user-create-path.yaml
+++ b/openapi/features/user/user-create-path.yaml
@@ -9,8 +9,8 @@ post:
$ref: './components/user-create-body.yaml'
responses:
- '204':
- description: User account created successfully
+ '201':
+ description: N/A
'400':
$ref: '../../shared/errors/validation-error.yaml'
'500':
diff --git a/openapi/main.yaml b/openapi/main.yaml
index 263de1a..7f34648 100644
--- a/openapi/main.yaml
+++ b/openapi/main.yaml
@@ -11,5 +11,5 @@ tags:
- name: user
description: Operations about user
paths:
- /user/create:
+ /api/users:
$ref: './features/user/user-create-path.yaml'