- Add OpenApiDocs controller for serving bundled API docs - Split monolithic api-docs.yaml into modular components/ - Add organized paths/ directory with endpoint definitions - Create bundling scripts (JS, PHP, Python) for merging docs - Add API_DOCS_README.md with documentation guidelines - Update Routes.php for new API documentation endpoints - Update swagger.php view and TestDefSiteModel
114 lines
2.7 KiB
YAML
114 lines
2.7 KiB
YAML
/api/tests:
|
|
get:
|
|
tags: [Tests]
|
|
summary: List test definitions
|
|
security:
|
|
- bearerAuth: []
|
|
parameters:
|
|
- name: page
|
|
in: query
|
|
schema:
|
|
type: integer
|
|
default: 1
|
|
description: Page number for pagination
|
|
- name: perPage
|
|
in: query
|
|
schema:
|
|
type: integer
|
|
default: 20
|
|
description: Number of items per page
|
|
- name: SiteID
|
|
in: query
|
|
schema:
|
|
type: integer
|
|
description: Filter by site ID
|
|
- name: TestType
|
|
in: query
|
|
schema:
|
|
type: string
|
|
enum: [TEST, PARAM, CALC, GROUP, TITLE]
|
|
description: Filter by test type
|
|
- name: VisibleScr
|
|
in: query
|
|
schema:
|
|
type: integer
|
|
enum: [0, 1]
|
|
description: Filter by screen visibility (0=hidden, 1=visible)
|
|
- name: VisibleRpt
|
|
in: query
|
|
schema:
|
|
type: integer
|
|
enum: [0, 1]
|
|
description: Filter by report visibility (0=hidden, 1=visible)
|
|
- name: search
|
|
in: query
|
|
schema:
|
|
type: string
|
|
description: Search by test code or name
|
|
responses:
|
|
'200':
|
|
description: List of test definitions
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
status:
|
|
type: string
|
|
data:
|
|
type: array
|
|
items:
|
|
$ref: '../components/schemas/tests.yaml#/TestDefinition'
|
|
pagination:
|
|
type: object
|
|
properties:
|
|
total:
|
|
type: integer
|
|
description: Total number of records matching the query
|
|
|
|
post:
|
|
tags: [Tests]
|
|
summary: Create test definition
|
|
security:
|
|
- bearerAuth: []
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '../components/schemas/tests.yaml#/TestDefinition'
|
|
responses:
|
|
'201':
|
|
description: Test definition created
|
|
|
|
patch:
|
|
tags: [Tests]
|
|
summary: Update test definition
|
|
security:
|
|
- bearerAuth: []
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '../components/schemas/tests.yaml#/TestDefinition'
|
|
responses:
|
|
'200':
|
|
description: Test definition updated
|
|
|
|
/api/tests/{id}:
|
|
get:
|
|
tags: [Tests]
|
|
summary: Get test definition by ID
|
|
security:
|
|
- bearerAuth: []
|
|
parameters:
|
|
- name: id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: integer
|
|
responses:
|
|
'200':
|
|
description: Test definition details
|