Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$REF sibilings violation [BUG] #31500

Open
DennisvDijk opened this issue Nov 11, 2024 · 1 comment
Open

$REF sibilings violation [BUG] #31500

DennisvDijk opened this issue Nov 11, 2024 · 1 comment
Assignees
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization. data-plane question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@DennisvDijk
Copy link

DennisvDijk commented Nov 11, 2024

API Spec link

https://github.com/Azure/azure-rest-api-specs/blob/main/specification/cognitiveservices/data-plane/AzureOpenAI/inference/stable/2024-10-21/inference.json

API Spec version

2024-10-21

Describe the bug

When we try to lint this specific release, the linter (both Spectral & Vacuum) returns a no-$ref-siblings rule violation. Indicating that at line 1351, there is a sibling amongst a ref which is displayed below.

              "parallel_tool_calls": {
                "$ref": "#/components/schemas/ParallelToolCalls",
                "nullable": true
              },

We're aware that Autorest has performed lints for these specs but I'm wondering whether or not these errors we're also triggered.

Expected behavior

Since the spec is 3.0, not 3.1, ref rules are still applied. We expect a oneOf block or some sort to fix this issue.

Please see: https://meta.stoplight.io/docs/spectral/4dec24461f3af-open-api-rules#no-ref-siblings.

Actual behavior

Linting errors:

inference.json:1352:17 | error    | a `$ref` cannot be placed next to any other properties                                               | no-$ref-siblings           | Schemas              | $.components.schemas['ParallelToolCalls']

Reproduction Steps

Download Vacuum or Spectral cli (or any other spec linter) and run XXXXX lint inference.json | grep error to explicitly return error logs. .

Environment

No response

@DennisvDijk DennisvDijk added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Nov 11, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added question The issue doesn't require a change to the product in order to be resolved. Most issues start as that customer-reported Issues that are reported by GitHub users external to the Azure organization. labels Nov 11, 2024
@DennisvDijk DennisvDijk changed the title [BUG] $REF sibilings violation [BUG] Nov 12, 2024
@v-jiaodi
Copy link
Member

@yetamsft Please help take a look, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization. data-plane question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

3 participants