$ref to original location not found
See original GitHub issueDescribe the bug
When running the following command to generate Microsoft.Authorizaiton schemas, autorest pipeline failed at openapi-document/emitter
(with --debug
) :
autorest --azureresourceschema --tag=schema-authorization-2020-09-01 https://github.com/Azure/azure-rest-api-specs/blob/dfedab416d1c4fe521f6f3c58cdcb0da37107b84/specification/resources/resource-manager/readme.md
AutoRest code generation utility [cli version: 3.0.6339; node: v14.15.5, max-memory: 2048 MB]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
Loading AutoRest core '/home/leni/.autorest/@autorest_core@3.0.6373/node_modules/@autorest/core/dist' (3.0.6373)
Loading AutoRest extension '@autorest/azureresourceschema' (~3.0.45->3.0.92)
Error: $ref to original location '#/components/schemas/schemas:516' is not found in the new refs collection
Please provide as much information as you can. This would be:
- OpenAPI files having the issues:
- Autorest command used:
autorest --azureresourceschema --tag=schema-authorization-2020-09-01 https://github.com/Azure/azure-rest-api-specs/blob/dfedab416d1c4fe521f6f3c58cdcb0da37107b84/specification/resources/resource-manager/readme.md
Expected behavior The Microsoft.Authorization ARM Template schemas can be successfully generated.
Additional context
Tried to debug into autorest code, the obj
value is as follows, when throwing the Error:
{
"x-ms-metadata": {
"apiVersions": [
"2020-06-01"
],
"filename": [
"mem:///394?oai3.shaken.json"
],
"name": "paths·1fnlsr8·providers-microsoft-resources-deployments-deploymentname-whatif·post·responses·202·headers·location",
"originalLocations": [
"file:///home/leni/workspace/azure-rest-api-specs/specification/resources/resource-manager/Microsoft.Resources/stable/2020-06-01/resources.json#/components/headers/paths·1fnlsr8·providers-microsoft-resources-deployments-deploymentname-whatif·post·responses·202·headers·location"
],
"x-ms-secondary-file": true
},
"schema": {
"$ref": "#/components/schemas/schemas:516"
},
"description": "URL to get status of this long-running operation."
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
To Fix Not Found Reference Files | AutoCAD LT 2020
Right-click the selected reference and select Select New Path from the context menu. Note: It is recommended that for a single selected broken...
Read more >Show Reference File in Finder Not Working in Photos App
When I click on them it says Find Original. I go to the folder and select Choose Folder. But, nothing changes. If i...
Read more >c# - Could not resolve this reference. Could not locate the ...
If you want to know the location it was referenced from, you'd have to open the .csproj file in a text editor and...
Read more >7 Situations Where There Is the "Location Is Not Available" ...
Step 1. Launch MiniTool Power Data Recovery. Select the drive which prompts "location is not available" error, and click Scan. Step 2: Preview ......
Read more >Troubleshoot bookmarks
By default, Word doesn't display them. ... Reference source not found. ... to another location in the same document the bookmark remains with...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @tonianelope could you open another issue with a swagger spec reproducing the erorr as this doesn’t seem to be the exact same problem
Hi am having a similar issue where I have the following definition see below: (RenamedExampleProperty is refrencing the definition of Example as it is the same property only with a different name). But the PR doesn’t fix the issue for me.