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

Improve error message if "parameters" contains "$ref" #4961

Open
mikeharder opened this issue May 2, 2024 · 0 comments
Open

Improve error message if "parameters" contains "$ref" #4961

mikeharder opened this issue May 2, 2024 · 0 comments
Assignees

Comments

@mikeharder
Copy link
Member

PR Azure/azure-rest-api-specs#28160 is failing LintDiff with this error:

"!Error: Invalid Reference file: -- file:///mnt/vss/_work/1/azure-rest-api-specs/specification/common-types/resource-management/v5/types.json#/components/parameters/ApiVersionParameter"

We believe this is because the spec uses $ref under section parameters which is not allowed per the OAS2 spec.

AutoRest should try to improve this error message, to give spec authors more information what is wrong with their spec.

Teams discussion: https://teams.microsoft.com/l/message/19:4f661242c446452e895359cc3ef45125@thread.tacv2/1714671337559?tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47&groupId=0cab4ce9-7691-42ae-82e3-460d4346a710&parentMessageId=1714671337559&teamName=ARM%20API%20Reviewers&channelName=ARM%20linter%20rules&createdTime=1714671337559&allowXTenantAccess=false

@mikeharder mikeharder self-assigned this May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

1 participant