-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Multiple specs error with latest autorest due tag config multiple defination #13147
Comments
The issue in those specs is that the In those specs this result in having multiple tags config being read and so including multiple version specs together. See for example in this readme specification/softwareplan/resource-manager/readme.md ``` yaml
openapi-type: arm
tag: package-2019-06-01-preview
```
### Tag: package-2019-06-01-preview
These settings apply only when `--tag=package-2019-06-01-preview` is specified on the command line.
``` yaml $(tag) == 'package-2019-06-01-preview'
input-file:
- Microsoft.SoftwarePlan/preview/2019-06-01-preview/softwareplan.json
```
``` yaml
openapi-type: arm
tag: package-2019-12-01
```
### Tag: package-2019-12-01
These settings apply only when `--tag=package-2019-12-01` is specified on the command line.
``` yaml $(tag) == 'package-2019-12-01'
input-file:
- Microsoft.SoftwarePlan/stable/2019-12-01/softwareplan.json
``` It does the following:
SolutionRemove the 2nd tag override. It shouldn't be here. Not sure if it something was trying to be achieved with this or this is some copy paste leftover |
Adding /specification/iotcentral/resource-manager/readme.md and cc @leni-msft |
Adding specification/hybriddatamanager/resource-manager/readme.md and cc @prtank and @ t-prta |
Hey, could you point me to some documentation about how these tags should be defined? |
@prtank I explained in this reply the problem and solution. The issue is always the same. The tag gets redefined twice and the 2nd (for the same behavior as before) needs to be removed |
Hi Timothee, I did see your comment on having only a single tag in the file. I should've been clearer, could you tell me how the tags work and what they're meant to signify? |
Or was your question more on how does the configuration in autorest works? |
If the tags are used to specify which file to pick how should multiple API versions be handled? I remember adding the second tag while adding the second API version. |
So before the way it used to read the config the second tag assignment was just being ignore the first one had priority. so it was just like if it was not there. The config file can be seen as just executing some code and assigning variables. with block condition being if statement. Not exactly sure what you wanted to do for multi api. You can still have multiple tag condition to load the correct input-file depending on the So the markdown would look like this ``` yaml
openapi-type: arm
tag: package-2019-06-01-preview
```
### Tag: package-2019-06-01-preview
These settings apply only when `--tag=package-2019-06-01-preview` is specified on the command line.
``` yaml $(tag) == 'package-2019-06-01-preview'
input-file:
- Microsoft.SoftwarePlan/preview/2019-06-01-preview/softwareplan.json
```
### Tag: package-2019-12-01
These settings apply only when `--tag=package-2019-12-01` is specified on the command line.
``` yaml $(tag) == 'package-2019-12-01'
input-file:
- Microsoft.SoftwarePlan/stable/2019-12-01/softwareplan.json
``` |
Fix issue Azure#13147 in hybriddatamanager
Thanks for the details Timothee. I have raised PR Fix issue 13147 for HybridDataManager#13296 with the change |
* Create hybriddata.json Added updated swagger file for Microsoft.HybridData * Create readme.md * Updated readme files * Update readme.md * Removed unused API endpoints * Updated example files and swagger * Fixed error in path to example files * Fixed Go and Ruby Readme Files * Added suppression for OperationIdNounVerb * Added DataManagers_Update and examples * Added suppression for ARM Violation and updated swagger and example files * Updated swagger to sdk script for ruby * Added Python swagger to sdk * Added PartiallySucceeded status * Added swagger and examples for API Version 2019-06-01 Added swagger and examples for API version 2019-06-01 Adding PartiallySucceeded job status * Removed partially succeeded status from 2016-06-01 swagger * Updating body of 202 response * After running prettier Ran npm install; npm run prettier -- --write "specification/hybriddatamanager/**/*.json" * Updated readme files to include 2019-06 api version * Updated descriptions as per PR comments * Committing Prettier check change * Updated HybridDataManager to fix issue 13147 Fix issue #13147 in hybriddatamanager Co-authored-by: t-prta <46665688+prerna-tank-ms@users.noreply.github.com>
Fix issue 13147 for HybridDataManager (#13296) * Create hybriddata.json Added updated swagger file for Microsoft.HybridData * Create readme.md * Updated readme files * Update readme.md * Removed unused API endpoints * Updated example files and swagger * Fixed error in path to example files * Fixed Go and Ruby Readme Files * Added suppression for OperationIdNounVerb * Added DataManagers_Update and examples * Added suppression for ARM Violation and updated swagger and example files * Updated swagger to sdk script for ruby * Added Python swagger to sdk * Added PartiallySucceeded status * Added swagger and examples for API Version 2019-06-01 Added swagger and examples for API version 2019-06-01 Adding PartiallySucceeded job status * Removed partially succeeded status from 2016-06-01 swagger * Updating body of 202 response * After running prettier Ran npm install; npm run prettier -- --write "specification/hybriddatamanager/**/*.json" * Updated readme files to include 2019-06 api version * Updated descriptions as per PR comments * Committing Prettier check change * Updated HybridDataManager to fix issue 13147 Fix issue Azure/azure-rest-api-specs#13147 in hybriddatamanager Co-authored-by: t-prta <46665688+prerna-tank-ms@users.noreply.github.com>
Fix issue 13147 for HybridDataManager (Azure#13296) * Create hybriddata.json Added updated swagger file for Microsoft.HybridData * Create readme.md * Updated readme files * Update readme.md * Removed unused API endpoints * Updated example files and swagger * Fixed error in path to example files * Fixed Go and Ruby Readme Files * Added suppression for OperationIdNounVerb * Added DataManagers_Update and examples * Added suppression for ARM Violation and updated swagger and example files * Updated swagger to sdk script for ruby * Added Python swagger to sdk * Added PartiallySucceeded status * Added swagger and examples for API Version 2019-06-01 Added swagger and examples for API version 2019-06-01 Adding PartiallySucceeded job status * Removed partially succeeded status from 2016-06-01 swagger * Updating body of 202 response * After running prettier Ran npm install; npm run prettier -- --write "specification/hybriddatamanager/**/*.json" * Updated readme files to include 2019-06 api version * Updated descriptions as per PR comments * Committing Prettier check change * Updated HybridDataManager to fix issue 13147 Fix issue Azure/azure-rest-api-specs#13147 in hybriddatamanager Co-authored-by: t-prta <46665688+prerna-tank-ms@users.noreply.github.com>
Fix issue 13147 for HybridDataManager (Azure#13296) * Create hybriddata.json Added updated swagger file for Microsoft.HybridData * Create readme.md * Updated readme files * Update readme.md * Removed unused API endpoints * Updated example files and swagger * Fixed error in path to example files * Fixed Go and Ruby Readme Files * Added suppression for OperationIdNounVerb * Added DataManagers_Update and examples * Added suppression for ARM Violation and updated swagger and example files * Updated swagger to sdk script for ruby * Added Python swagger to sdk * Added PartiallySucceeded status * Added swagger and examples for API Version 2019-06-01 Added swagger and examples for API version 2019-06-01 Adding PartiallySucceeded job status * Removed partially succeeded status from 2016-06-01 swagger * Updating body of 202 response * After running prettier Ran npm install; npm run prettier -- --write "specification/hybriddatamanager/**/*.json" * Updated readme files to include 2019-06 api version * Updated descriptions as per PR comments * Committing Prettier check change * Updated HybridDataManager to fix issue 13147 Fix issue Azure/azure-rest-api-specs#13147 in hybriddatamanager Co-authored-by: t-prta <46665688+prerna-tank-ms@users.noreply.github.com>
Fix issue 13147 for HybridDataManager (#13296) * Create hybriddata.json Added updated swagger file for Microsoft.HybridData * Create readme.md * Updated readme files * Update readme.md * Removed unused API endpoints * Updated example files and swagger * Fixed error in path to example files * Fixed Go and Ruby Readme Files * Added suppression for OperationIdNounVerb * Added DataManagers_Update and examples * Added suppression for ARM Violation and updated swagger and example files * Updated swagger to sdk script for ruby * Added Python swagger to sdk * Added PartiallySucceeded status * Added swagger and examples for API Version 2019-06-01 Added swagger and examples for API version 2019-06-01 Adding PartiallySucceeded job status * Removed partially succeeded status from 2016-06-01 swagger * Updating body of 202 response * After running prettier Ran npm install; npm run prettier -- --write "specification/hybriddatamanager/**/*.json" * Updated readme files to include 2019-06 api version * Updated descriptions as per PR comments * Committing Prettier check change * Updated HybridDataManager to fix issue 13147 Fix issue Azure/azure-rest-api-specs#13147 in hybriddatamanager Co-authored-by: t-prta <46665688+prerna-tank-ms@users.noreply.github.com>
Hey Timothee, I see that the PR has been merged. Can i consider this issue closed for HybridDataManager? |
* Create hybriddata.json Added updated swagger file for Microsoft.HybridData * Create readme.md * Updated readme files * Update readme.md * Removed unused API endpoints * Updated example files and swagger * Fixed error in path to example files * Fixed Go and Ruby Readme Files * Added suppression for OperationIdNounVerb * Added DataManagers_Update and examples * Added suppression for ARM Violation and updated swagger and example files * Updated swagger to sdk script for ruby * Added Python swagger to sdk * Added PartiallySucceeded status * Added swagger and examples for API Version 2019-06-01 Added swagger and examples for API version 2019-06-01 Adding PartiallySucceeded job status * Removed partially succeeded status from 2016-06-01 swagger * Updating body of 202 response * After running prettier Ran npm install; npm run prettier -- --write "specification/hybriddatamanager/**/*.json" * Updated readme files to include 2019-06 api version * Updated descriptions as per PR comments * Committing Prettier check change * Updated HybridDataManager to fix issue 13147 Fix issue Azure#13147 in hybriddatamanager Co-authored-by: t-prta <46665688+prerna-tank-ms@users.noreply.github.com>
These specs:
specification/softwareplan/resource-manager/readme.md
and
specification/desktopvirtualization/resource-manager/readme.md
and
specification/iotcentral/resource-manager/readme.md
and
specification/hybriddatamanager/resource-manager/readme.md
fail when processed with autorest 3.1.0-dev.2.
Discussions with @timotheeguerin suggests that they are issues in the swagger redefining tags:
it used to test release_2 but now is testing release_1 with that $ref as an attribute
Builds showing issue:
https://dev.azure.com/azure-sdk/public/_build/results?buildId=748819&view=logs&j=1a6ae1a5-56d5-51f8-8f8d-f67115b54b1a&t=937f187a-1519-5cb7-77a5-47832257e788
https://dev.azure.com/azure-sdk/public/_build/results?buildId=751474&view=logs&j=ac074fc7-7a1e-5636-a7ea-9c59e123a9ef&t=79ef76a9-b720-5417-f045-9a3cbd25ad16
The text was updated successfully, but these errors were encountered: