Duplicate schema coming from nowhere
See original GitHub issueBefore filling a bug
- have you checked the faq for known issues.
- have you checked existing issues
Describe the bug
I am getting the following duplicate schema issues:
error | PreCheck/DuplicateSchema | Duplicate Schema named 'KeyVaultProperties' (4 differences):
- properties: {"keyName":{"x-ms-client-name":"KeyName","$ref":"#/components/schemas/schemas:36","description":"Name of the Key from KeyVault"},"keyVaultUri":{"x-ms-client-name":"KeyVaultUri","$ref":"#/components/schemas/schemas:37","description":"Uri of KeyVault"},"keyVersion":{"x-ms-client-name":"KeyVersion","$ref":"#/components/schemas/schemas:38","description":"Key Version"},"identity":{"$ref":"#/components/schemas/schemas:63"}} => <none>
- type: "object" => "array"
- items: <none> => {"$ref":"#/components/schemas/schemas:35"}
- x-ms-client-name: <none> => "KeyVaultProperties"; This error can be *temporarily* avoided by using the 'modelerfour.lenient-model-deduplication' setting. NOTE: This setting will be removed in a future version of @autorest/modelerfour; schemas should be updated to fix this issue sooner than that.
Looks like it is comparing a model (here) and a property (here). I am not sure if the x-ms-client-flatten
is involved or not, but it looks like to be involved.
To reproduce, you need to
- change the version of
autorest.csharp
here from3.0.0-beta.20220426.2
to3.0.0-beta.20220426.4
- go to this directory and run
dotnet build /t:GenerateCode
Expected behavior
We do not have a duplicate schema previously, therefore we do not want a duplicate schema issue if we did not change the swagger.
Issue Analytics
- State:
- Created a year ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Cloning a schema with a one line command - Connor McDonald
What about if the “unit of work” is not an entire pluggable database. What if we just want to clone just a schema...
Read more >Duplicate field 'HowTo' new error - WordPress.org
I have a few pages on my site that utilize the Yoast 'How To' block. In the last few days, with no editing...
Read more >Clone schema without copying table grants
According to docs, Cloning a schema clones all the contained objects in the schema. Though as a workaround, you can use time travel...
Read more >Unexpected MongoServerError 11000 (duplicate) for a field ...
I should note that nowhere in my code is 'products.name' mentioned. ERROR: MongoServerError: E11000 duplicate key error collection: ...
Read more >Copy only Schema to an other database - FME Community
Hello. Is there a way we could copy only the schema ( table name and related attribute ) no data into another database,...
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
@timotheeguerin I tried the fix, and it works. Thanks!
waiting on confirmation that this other bug #4523 fixed in the same PR is resolved and then will merge and the fix should be available.