|
|
#### Usuário
|
|
|
|
|
|
<details>
|
|
|
<summary><code>POST</code> <code><b>/</b></code><code>users</code></summary>
|
|
|
|
|
|
##### Parameters
|
|
|
|
|
|
> | name | type | data type | description |
|
|
|
> |-----------|-----------|-------------------------|-----------------------------------------------------------------------|
|
|
|
> | name | required | String | N/A |
|
|
|
> | email | required | String | N/A |
|
|
|
> | password | required | String | N/A |
|
|
|
> | birthday | required | Date | N/A |
|
|
|
> | city | required | String | N/A |
|
|
|
> | uf | required | String | N/A |
|
|
|
> | phone | required | Long | N/A |
|
|
|
> | restrictions | required | List | Lista composta pelas restrições do usuário (nome e categoria) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
##### Responses
|
|
|
|
|
|
> | http code | content-type | response |
|
|
|
> |---------------|-----------------------------------|---------------------------------------------------------------------|
|
|
|
> | `200` | `text/plain;charset=UTF-8` | `Usuário criado` |
|
|
|
|
|
|
##### Example cURL
|
|
|
|
|
|
> ```javascript
|
|
|
> curl -X POST -H "Content-Type: application/json" --data @post.json http://localhost:8080/users
|
|
|
> ```
|
|
|
|
|
|
</details>
|
|
|
|
|
|
------------------------------------------------------------------------------------------
|
|
|
|
|
|
#### Restrições
|
|
|
|
|
|
<details>
|
|
|
<summary><code>GET</code> <code><b>/</b></code> <code>restrictions</code></summary>
|
|
|
|
|
|
##### Parameters
|
|
|
|
|
|
> None
|
|
|
|
|
|
##### Responses
|
|
|
|
|
|
> | http code | content-type | response |
|
|
|
> |---------------|-----------------------------------|---------------------------------------------------------------------|
|
|
|
> | `200` | `text/plain;charset=UTF-8` | JSON List |
|
|
|
|
|
|
##### Example cURL
|
|
|
|
|
|
> ```javascript
|
|
|
> curl -X GET -H "Content-Type: application/json" http://localhost:8080/restrictions
|
|
|
> ```
|
|
|
|
|
|
</details>
|
|
|
|
|
|
<details>
|
|
|
<summary><code>POST</code> <code><b>/</b></code><code>restrictions</code></summary>
|
|
|
|
|
|
##### Parameters
|
|
|
|
|
|
> | name | type | data type | description |
|
|
|
> |-----------|-----------|-------------------------|-----------------------------------------------------------------------|
|
|
|
> | name | required | String | Nome da restrição |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
##### Responses
|
|
|
|
|
|
> | http code | content-type | response |
|
|
|
> |---------------|-----------------------------------|---------------------------------------------------------------------|
|
|
|
> | `200` | `text/plain;charset=UTF-8` | `Restrição criada` |
|
|
|
|
|
|
##### Example cURL
|
|
|
|
|
|
> ```javascript
|
|
|
> curl -X POST -H "Content-Type: application/json" --data @post.json http://localhost:8080/restrictions
|
|
|
> ```
|
|
|
|
|
|
</details> |
|
|
\ No newline at end of file |