Azure / Azure/azure-openapi-validator

The BodyTopLevelProperties rule is mistakenly flagging paged responses

Open
#722 11 comments 0 reactions 3 assignees Claimed by @bdefoy View on GitHub
Dominant language
TypeScript
Stars
53
Forks
57
Avg merge
1d 23h
Merged PRs (30d)
2

Description

**Describe the bug**
The [BodyTopLevelProperties](https://github.com/Azure/azure-openapi-validator/blob/main/docs/body-top-level-properties.md) check is incorrectly flagging the response in List operations, which rturn a page of data as if they were resource GET operations. There are several examples in this PR: https://github.com/Azure/azure-rest-api-specs-pr/pull/18696
**To Reproduce**
Steps to reproduce the behavior:
Create list operations like: https://github.com/Azure/azure-rest-api-specs-pr/blob/a6bade603572212620a6cbb906f400e19d899b1b/specification/edge/resource-manager/Microsoft.Edge/configurationmanager/preview/2024-06-01-preview/configurationmanager.json#L62-L99

**Expected behavior**
This check should not be applied to list operations at all - in ARM specs, having an odd number of PATH segments and a last segment that is not a path variable should prevent the rule from being applied

**Screenshots**
See the link above.

**Desktop (please complete the following information):**
n/a, this occurs in CI

**Additional context**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.