Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions public/manual-checklist/Requirements_for_query_operations.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
rules:
- id: "QUE-040-01-2507-2507-M"
title: "Evaluation of perfomance of resourse query operation"
message: |
"The impact on the interface performance needs to be evaluated. If the impact on the interface performance is great, it is recommended that an independent API be provided to return the total number of resources"
option: Mandatory

- id: "QUE-050-01-2507-2507-M"
title: "Cloud services must provide APIs for querying their own service quotas"
message: |
"Services that are not interconnected with Quota Center do not need to provide the Quota API. Services that are interconnected with Quota Center must provide the Quota API."
61 changes: 61 additions & 0 deletions public/rulesets/default/Requirements_for_query_operations.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
rules:
- id: "QUE-040-01-2507-2507-M"
title: "The total number of resources that meet the query conditions is returned when the resource list is queried."
message: The API response must include the total number of matching resources using the field 'count'.
option: Mandatory
description: This rule checks that GET list query responses include the total number of resources using the standardized 'count' field.
location: paths
element: responses
call:
function: CheckResponseIncludesCount
functionParams:
method: "get"
pathMustNotContainPathParams: true
responseCode: "200"
responseContainArray: true
fieldName: "count"
fieldType: "integer"
required: true
allowedNames:
- "count"
disallowedNames:
- "total"
- "total_count"
severity: high
status: devel

- id: "QUE-050-01-2507-2507-M"
title: "Cloud services must provide APIs for querying their own service quotas."
message: Service must expose a quota query endpoint like GET /v1/quotas.
option: Mandatory
description: Checks that a service exposes a quota query endpoint, e.g. GET /v1/quotas.
location: paths
element: path
call:
function: CheckQuotaApiPresence
functionParams:
pathPattern: "/v1/quotas"
method: "get"
severity: high
status: devel

- id: "QUE-060-01-2507-2507-M"
title: "Querying resource details requires returning creation and modification time parameters"
message: Resourse detail query APIs must return 'create_time' and 'update_time' fields in the response.
option: Mandatory
description: Verifies that resource detail GET endpoints with path parameters (e.g., /resource/{id}) return 'create_time' and 'update_time' fields.
location: paths
element: responses
call:
function: CheckTimeFieldsInDetailQuery
functionParams:
method: "get"
pathMustContainPathParameter: "id"
responseCode: "200"
requiredFields:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add also created_at, updated_at

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

- "create_time"
- "update_time"
- "created_at"
- "updated_at"
severity: high
status: devel