Дополнил задание с API

This commit is contained in:
ArhaNge1
2026-10-16 15:58:58 +03:00
parent 3ce874af8e
commit b5430c7a9f
30 changed files with 560 additions and 46 deletions
@@ -0,0 +1,5 @@
name: Environment 1
variables:
- name: baseUrl
value: http://localhost:5090
description: http://localhost:5090
@@ -0,0 +1,6 @@
info:
name: hello
type: folder
request:
auth: inherit
@@ -0,0 +1,34 @@
info:
name: get /hello
type: http
seq: 1
tags:
- PokedexApi
http:
method: GET
url: "{{baseUrl}}/hello"
auth: inherit
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5
forwardAuthorizationHeader: false
examples:
- name: 200 Response
description: OK
request:
url: "{{baseUrl}}/hello"
method: GET
response:
status: 200
statusText: OK
headers:
- name: Content-Type
value: text/plain
body:
type: text
data: ""
@@ -0,0 +1,21 @@
opencollection: 1.0.0
info:
name: PokedexApi
config:
proxy:
inherit: true
config:
protocol: http
hostname: ""
port: ""
auth:
username: ""
password: ""
bypassProxy: ""
bundled: false
extensions:
bruno:
ignore:
- node_modules
- .git
@@ -0,0 +1,6 @@
info:
name: pokemons
type: folder
request:
auth: inherit
@@ -0,0 +1,31 @@
info:
name: get /pokemons
type: http
seq: 1
tags:
- PokedexApi
http:
method: GET
url: "{{baseUrl}}/pokemons"
auth: inherit
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5
forwardAuthorizationHeader: false
examples:
- name: 200 Response
description: OK
request:
url: "{{baseUrl}}/pokemons"
method: GET
response:
status: 200
statusText: OK
body:
type: text
data: ""
@@ -0,0 +1,47 @@
info:
name: post /pokemons
type: http
seq: 2
tags:
- PokedexApi
http:
method: POST
url: "{{baseUrl}}/pokemons"
body:
type: json
data: |-
{
"name": "",
"type": "",
"level": ""
}
auth: inherit
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5
forwardAuthorizationHeader: false
examples:
- name: 200 Response
description: OK
request:
url: "{{baseUrl}}/pokemons"
method: POST
body:
type: json
data: |-
{
"name": "Bulbasaur",
"type": "Grass",
"level": 6
}
response:
status: 200
statusText: OK
body:
type: text
data: ""
@@ -0,0 +1,6 @@
info:
name: type
type: folder
request:
auth: inherit
@@ -0,0 +1,6 @@
info:
name: "{type}"
type: folder
request:
auth: inherit
@@ -0,0 +1,39 @@
info:
name: get /pokemons/type/:type
type: http
seq: 1
tags:
- PokedexApi
http:
method: GET
url: "{{baseUrl}}/pokemons/type/:type"
params:
- name: type
value: ""
type: path
auth: inherit
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5
forwardAuthorizationHeader: false
examples:
- name: 200 Response
description: OK
request:
url: "{{baseUrl}}/pokemons/type/:type"
method: GET
params:
- name: type
value: ""
type: path
response:
status: 200
statusText: OK
body:
type: text
data: ""
@@ -0,0 +1,39 @@
info:
name: delete /pokemons/:id
type: http
seq: 3
tags:
- PokedexApi
http:
method: DELETE
url: "{{baseUrl}}/pokemons/:id"
params:
- name: id
value: ""
type: path
auth: inherit
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5
forwardAuthorizationHeader: false
examples:
- name: 200 Response
description: OK
request:
url: "{{baseUrl}}/pokemons/:id"
method: DELETE
params:
- name: id
value: ""
type: path
response:
status: 200
statusText: OK
body:
type: text
data: ""
@@ -0,0 +1,6 @@
info:
name: "{id}"
type: folder
request:
auth: inherit
@@ -0,0 +1,39 @@
info:
name: get /pokemons/:id
type: http
seq: 1
tags:
- PokedexApi
http:
method: GET
url: "{{baseUrl}}/pokemons/:id"
params:
- name: id
value: ""
type: path
auth: inherit
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5
forwardAuthorizationHeader: false
examples:
- name: 200 Response
description: OK
request:
url: "{{baseUrl}}/pokemons/:id"
method: GET
params:
- name: id
value: ""
type: path
response:
status: 200
statusText: OK
body:
type: text
data: ""
@@ -0,0 +1,55 @@
info:
name: put /pokemons/:id
type: http
seq: 2
tags:
- PokedexApi
http:
method: PUT
url: "{{baseUrl}}/pokemons/:id"
params:
- name: id
value: ""
type: path
body:
type: json
data: |-
{
"name": "",
"type": "",
"level": ""
}
auth: inherit
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5
forwardAuthorizationHeader: false
examples:
- name: 200 Response
description: OK
request:
url: "{{baseUrl}}/pokemons/:id"
method: PUT
params:
- name: id
value: ""
type: path
body:
type: json
data: |-
{
"name": "",
"type": "",
"level": ""
}
response:
status: 200
statusText: OK
body:
type: text
data: ""