docs: Add example YAML files
- examples/custom.yaml: Custom YAML format example - examples/postman.yaml: Postman Collection v2.1 example - examples/openapi.yaml: OpenAPI 3.0 example
This commit is contained in:
1 parent
bf47218831
commit
2250961d09
3 files changed
+150
No files matched your search
@@ -0,0 +1,48 @@
|
||||
name: "Test Authorization"
|
||||
base_url: http://localhost:8080
|
||||
variables:
|
||||
email: test@example.com
|
||||
password: Test123!
|
||||
|
||||
steps:
|
||||
- name: "Register User"
|
||||
request:
|
||||
method: POST
|
||||
url: /api/register
|
||||
headers:
|
||||
Content-Type: application/json
|
||||
body:
|
||||
email: "{{email}}"
|
||||
password: "{{password}}"
|
||||
extract:
|
||||
- name: user_id
|
||||
json_path: "$.id"
|
||||
assert:
|
||||
- type: status
|
||||
value: 201
|
||||
|
||||
- name: "Login"
|
||||
request:
|
||||
method: POST
|
||||
url: /api/login
|
||||
headers:
|
||||
Content-Type: application/json
|
||||
body:
|
||||
email: "{{email}}"
|
||||
password: "{{password}}"
|
||||
extract:
|
||||
- name: token
|
||||
json_path: "$.token"
|
||||
assert:
|
||||
- type: status
|
||||
value: 200
|
||||
|
||||
- name: "Get Profile"
|
||||
request:
|
||||
method: GET
|
||||
url: /api/profile
|
||||
headers:
|
||||
Authorization: "Bearer {{token}}"
|
||||
assert:
|
||||
- type: status
|
||||
value: 200
|
||||
Reference in new issue
Block a user