2023-08-09 01:10:33 +03:00
|
|
|
# List Projects And Branches Test
|
|
|
|
|
2024-07-10 19:17:15 +03:00
|
|
|
``` api
|
2023-08-09 01:10:33 +03:00
|
|
|
-- Should list all projects
|
|
|
|
GET /api/projects
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"projectName": "project-one"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"projectName": "project-three"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"projectName": "project-two"
|
2024-06-12 01:22:09 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"projectName": "scratch"
|
2023-08-09 01:10:33 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
-- Should list projects starting with project-t
|
|
|
|
GET /api/projects?prefix=project-t
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"projectName": "project-three"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"projectName": "project-two"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
-- Should list all branches
|
|
|
|
GET /api/projects/project-one/branches
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"branchName": "branch-one"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"branchName": "branch-three"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"branchName": "branch-two"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"branchName": "main"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
-- Should list all branches beginning with branch-t
|
|
|
|
GET /api/projects/project-one/branches?prefix=branch-t
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"branchName": "branch-three"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"branchName": "branch-two"
|
|
|
|
}
|
|
|
|
]
|
2024-07-10 22:15:33 +03:00
|
|
|
```
|
|
|
|
|