Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

Fix: Circular dependency issue with sibling schemas/definitions. #375

Merged
merged 4 commits into from
Dec 15, 2020

Conversation

timotheeguerin
Copy link
Member

@timotheeguerin timotheeguerin commented Dec 14, 2020

fix Azure/autorest#3630

When a model is following the pattern $ref and Sibling Elements described here https://swagger.io/docs/specification/using-ref/

This is causing a circular dependency issue because the model(with the properties) gets removed and the model with the reference get the ref updated to itself.

The solution is to figure out which of the 2 models to delete(The one not being a ref)

Todo:

  • Tests
  • Changelog

@azure-pipelines
Copy link

You may test this build by running autorest --reset and then either:


add --use: to the command line:

autorest --use:https://tinyurl.com/ycqc8ulb ...


or use the following in your autorest configuration:

use-extension:
  "@autorest/modelerfour": "https://tinyurl.com/ycqc8ulb" 

If this build is good for you, give this comment a thumbs up. (👍)

And you should run autorest --reset again once you're finished testing to remove it.

@Azure Azure deleted a comment from azure-pipelines bot Dec 14, 2020
@Azure Azure deleted a comment from azure-pipelines bot Dec 14, 2020
@Azure Azure deleted a comment from azure-pipelines bot Dec 14, 2020
@timotheeguerin timotheeguerin merged commit 2736459 into master Dec 15, 2020
@timotheeguerin timotheeguerin deleted the fix/siblings branch December 15, 2020 19:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error on Circular $ref in policy PR
2 participants