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

Face Swagger doesn't respect case for OperationStatus #5953

Closed
lmazuel opened this issue May 14, 2019 · 4 comments
Closed

Face Swagger doesn't respect case for OperationStatus #5953

lmazuel opened this issue May 14, 2019 · 4 comments
Labels
Cognitive - Face Service Attention Workflow: This issue is responsible by Azure service team.

Comments

@lmazuel
Copy link
Member

lmazuel commented May 14, 2019

JSON received:

{
  "CreatedTime": "2019-05-09T16:12:11.5891562Z",
  "LastActionTime": "2019-05-09T16:12:15.1138077Z",
  "Message": "Failed to retrieve the source object. This failure can be caused by deleting source object or training source object during snapshot taking.",
  "ResourceLocation": null,
  "Status": "failed"
}

But Swagger defined status, lastActionTime, etc.

Note that Swagger are case sensitive, hence this is a Swagger issue:

Reference:
Azure/azure-sdk-for-python#5224

@lmazuel
Copy link
Member Author

lmazuel commented May 20, 2019

Hi @lebronJ
Sorry, but my own recording shows the capital letters case + a customer saw it. My own recording:
https://github.com/Azure/azure-sdk-for-python/blob/master/azure-cognitiveservices-vision-face/tests/recordings/test_snapshot.yaml#L67

@lebronJ
Copy link
Contributor

lebronJ commented May 27, 2019

Hi @lmazuel
Sorry, please ignore my last reply (deleted). I can reproduce that Face API returns upper case for operation status.

Our plan to fix this is to change Face API's behavior to return lower case, then this problem will be auto resolved for Python SDK. Moreover in this approach, there's no need to change the Swagger, thus no effect to API references or other SDKs. We will roll this change out globally with our next planned release, ETA at round Jun 7th.

What do you think about this fix? Is this super urgent so that we need a quicker hot fix?

@lmazuel
Copy link
Member Author

lmazuel commented May 29, 2019

Hi @lebronJ
First, yes, this would solve the problem and no, it's not urgent that you should urge your timeline.

I must mention that's a breaking change for customers that use directly your RestAPI today, their code won't work anymore. It's why ARM team forbids this kind of changes for instance. If your API is in preview however, or if the SDK are considered your top scenario, you might consider it as an acceptable side effect of a bug fix. Note that I'm not doing any recommendation about where it's the right solution or not, I just want to be sure you know the side effect of this one :)

@lebronJ
Copy link
Contributor

lebronJ commented Jun 3, 2019

Hi @lmazuel , thanks for the explanation. Per our team's internal discussion, we will treat this as a service bug fix and will change Face API's behavior to return lower case.

The reason behind this is the fact that our documentation and swagger are consistent (lower case), while response from service is different (upper case). Moreover, this API interface (Snapshot) is called in a quite low frequency since it was on board. So we think the potential side effect of fixing the service's response should be rather limited.

We have combined this fix in our ongoing release, if everything goes well, this issue will be solved by end of this week.

pathuang-sia added a commit that referenced this issue Oct 26, 2022
* GalleryImage, MarketplaceGalleryImage, VirtualMachine, and VirtualHardDisk 2021-09-01-preview changes (#6751)

* initial commit

* syntax error fix

* move galleryimageversionproperties under galleryimageproperties

* add galleryimageversion as child of galleryimageproperties

* update create/get galleryimage json example

* remove version readonly and fix version description

* add imagesource and fix imagepath example

* fix getgalleryimage.json

* pending to inprogress

* mark secret x-ms-secret

* fix osdisk uri to id in vms

* update to local

* create marketplacegalleryimages

* fix file name

* filenmae fix

* file rename

* file rename

* add missing exampl.es

* add enum

* update vm and vhd examples

* add num to galleryimages as well

* fix example: remove imagepath from response and fix sizeInMB

* update vhd example response with other properties

* fix vm create vlow

* fix example imagereference

* fix osdisk camel case

* remove securityprofile from response

* add readonly to sizeInMB

* update disksizeBytes and readonly to sizeInMB

* update missed diskSizeBytes in examples

* fix camelcase

* remove osprofile from response and request when osdisk is specified in vm put

* Add signature, set proper status properties to galleryImages & marketplaceGalleryImages (#6989)

* add signature, set proper status properties

* fix semantics

* fix status for all resources and remove signature

* remove imagePath from marketplacegalleryimage example

* fix status name

* add readonly to status

* add x-ms-client-flatten, and align errorMessage/errorCode description

* update property description

* add powerstate to virtualmachinestatus

* add provisioningstate enum and remove readonly for galleryimageversion.name

* Sync azurestackhci 2021-07 changes to 2021-09 (#7106)

* sync marketplacegalleryimage descriptions

* Add to custom words and fix example

* fix updatemarketplacegalleryimage.json

* add marketplaceGalleryImages to readme

* update all references to v3

* Revert "update all references to v3"

This reverts commit 186589ff6ab6f0d3b5257c2ebe8b078e1f29052a.

* npm run prettier

* User/vishalk/storage container rpsaasdev (#7084)

* swagger chanfes

* added availablesize and containersize in status

Co-authored-by: Vishal Kadam <vishalkadam@microsoft.com>

* V3 to v2

* fix typo

* Revert "fix typo"

This reverts commit 8ea4035c868811dedcf3d7db17cfb9decb3814f9.

* Revert "V3 to v2"

This reverts commit c04f9f7254e28485bfe2fa6a9fbcf9cd921d518e.

* convert all to v3

* v3 to v2, add ListOperationByCluster example

* linter feedback

* more fix based on linter feedback

* fix breaking change errors

* continue fixing breaking change

* User/vishalk/storage container (#5953)

* updated VHD object

* updated storage container swagger

* added available size property

* updated description of path

Co-authored-by: Vishal Kadam <vishalkadam@microsoft.com>

* Add canceled to provisioningState enum

Co-authored-by: Arka <Arkanayan@users.noreply.github.com>
Co-authored-by: vishal-kadam <33834843+vishal-kadam@users.noreply.github.com>
Co-authored-by: Vishal Kadam <vishalkadam@microsoft.com>
xiaoxuqi-ms pushed a commit that referenced this issue Nov 15, 2022
…ft.AzureStackHCI-2021-09-01-preview' (#21296)

* Adds base for updating Microsoft.AzureStackHCI from version stable/2021-09-01 to version 2021-09-01-preview

* Updates readme

* Updates API version in new specs and examples

* resolve conflicts

* [Microsoft.AzureStackHCI] 2021-09-01-preview update (#7147)

* GalleryImage, MarketplaceGalleryImage, VirtualMachine, and VirtualHardDisk 2021-09-01-preview changes (#6751)

* initial commit

* syntax error fix

* move galleryimageversionproperties under galleryimageproperties

* add galleryimageversion as child of galleryimageproperties

* update create/get galleryimage json example

* remove version readonly and fix version description

* add imagesource and fix imagepath example

* fix getgalleryimage.json

* pending to inprogress

* mark secret x-ms-secret

* fix osdisk uri to id in vms

* update to local

* create marketplacegalleryimages

* fix file name

* filenmae fix

* file rename

* file rename

* add missing exampl.es

* add enum

* update vm and vhd examples

* add num to galleryimages as well

* fix example: remove imagepath from response and fix sizeInMB

* update vhd example response with other properties

* fix vm create vlow

* fix example imagereference

* fix osdisk camel case

* remove securityprofile from response

* add readonly to sizeInMB

* update disksizeBytes and readonly to sizeInMB

* update missed diskSizeBytes in examples

* fix camelcase

* remove osprofile from response and request when osdisk is specified in vm put

* Add signature, set proper status properties to galleryImages & marketplaceGalleryImages (#6989)

* add signature, set proper status properties

* fix semantics

* fix status for all resources and remove signature

* remove imagePath from marketplacegalleryimage example

* fix status name

* add readonly to status

* add x-ms-client-flatten, and align errorMessage/errorCode description

* update property description

* add powerstate to virtualmachinestatus

* add provisioningstate enum and remove readonly for galleryimageversion.name

* Sync azurestackhci 2021-07 changes to 2021-09 (#7106)

* sync marketplacegalleryimage descriptions

* Add to custom words and fix example

* fix updatemarketplacegalleryimage.json

* add marketplaceGalleryImages to readme

* update all references to v3

* Revert "update all references to v3"

This reverts commit 186589ff6ab6f0d3b5257c2ebe8b078e1f29052a.

* npm run prettier

* User/vishalk/storage container rpsaasdev (#7084)

* swagger chanfes

* added availablesize and containersize in status

Co-authored-by: Vishal Kadam <vishalkadam@microsoft.com>

* V3 to v2

* fix typo

* Revert "fix typo"

This reverts commit 8ea4035c868811dedcf3d7db17cfb9decb3814f9.

* Revert "V3 to v2"

This reverts commit c04f9f7254e28485bfe2fa6a9fbcf9cd921d518e.

* convert all to v3

* v3 to v2, add ListOperationByCluster example

* linter feedback

* more fix based on linter feedback

* fix breaking change errors

* continue fixing breaking change

* User/vishalk/storage container (#5953)

* updated VHD object

* updated storage container swagger

* added available size property

* updated description of path

Co-authored-by: Vishal Kadam <vishalkadam@microsoft.com>

* Add canceled to provisioningState enum

Co-authored-by: Arka <Arkanayan@users.noreply.github.com>
Co-authored-by: vishal-kadam <33834843+vishal-kadam@users.noreply.github.com>
Co-authored-by: Vishal Kadam <vishalkadam@microsoft.com>

* cherry-pick merge conflict resolution

* storage container changes (#6614)

* storage container changes

* added availableSizeGB and containerSizeGB properties

* changed data type of containersize and availablesize

* converted gb to mb

* made availableSizeMB and containerSizeMB fields readonly

Co-authored-by: Vishal Kadam <vishalkadam@microsoft.com>

* Change hybrididentitymetadata vmid to resourceUid (#4921)

* change hybrididentitymetadata vmid to resourceUid

* update examples

* fix missed merging changes

* cherry-pick merge conflict resolution

* remove 2022-09-01 examples

* git difftool align differences with RPSaaSMaster

* spellcheck fix

* breaking change cross version fix

* fix version

* fix custom word typo

* fix default tag to 2022-10

* address description and example feedback

* address swagger modelvalidation errors

* missed linter and model validation error

* prettier fix

* fixing breaking change errors

* backport common.json from 2021-07-01-preview

* prettier on common.json

* replace Idenitty from v2 definitions

* fix property bag capitalization

* Add missed capitalization modifications

* Add missed semantic fix

* Add missed semantic fix

* revert property definition capitalization according to reviewer feedback

Co-authored-by: Arka <Arkanayan@users.noreply.github.com>
Co-authored-by: vishal-kadam <33834843+vishal-kadam@users.noreply.github.com>
Co-authored-by: Vishal Kadam <vishalkadam@microsoft.com>
Co-authored-by: aeweston-msft <59626096+aeweston-msft@users.noreply.github.com>
anandanthony pushed a commit to anandMicro/azure-rest-api-specs that referenced this issue Dec 16, 2022
…ft.AzureStackHCI-2021-09-01-preview' (Azure#21296)

* Adds base for updating Microsoft.AzureStackHCI from version stable/2021-09-01 to version 2021-09-01-preview

* Updates readme

* Updates API version in new specs and examples

* resolve conflicts

* [Microsoft.AzureStackHCI] 2021-09-01-preview update (Azure#7147)

* GalleryImage, MarketplaceGalleryImage, VirtualMachine, and VirtualHardDisk 2021-09-01-preview changes (Azure#6751)

* initial commit

* syntax error fix

* move galleryimageversionproperties under galleryimageproperties

* add galleryimageversion as child of galleryimageproperties

* update create/get galleryimage json example

* remove version readonly and fix version description

* add imagesource and fix imagepath example

* fix getgalleryimage.json

* pending to inprogress

* mark secret x-ms-secret

* fix osdisk uri to id in vms

* update to local

* create marketplacegalleryimages

* fix file name

* filenmae fix

* file rename

* file rename

* add missing exampl.es

* add enum

* update vm and vhd examples

* add num to galleryimages as well

* fix example: remove imagepath from response and fix sizeInMB

* update vhd example response with other properties

* fix vm create vlow

* fix example imagereference

* fix osdisk camel case

* remove securityprofile from response

* add readonly to sizeInMB

* update disksizeBytes and readonly to sizeInMB

* update missed diskSizeBytes in examples

* fix camelcase

* remove osprofile from response and request when osdisk is specified in vm put

* Add signature, set proper status properties to galleryImages & marketplaceGalleryImages (Azure#6989)

* add signature, set proper status properties

* fix semantics

* fix status for all resources and remove signature

* remove imagePath from marketplacegalleryimage example

* fix status name

* add readonly to status

* add x-ms-client-flatten, and align errorMessage/errorCode description

* update property description

* add powerstate to virtualmachinestatus

* add provisioningstate enum and remove readonly for galleryimageversion.name

* Sync azurestackhci 2021-07 changes to 2021-09 (Azure#7106)

* sync marketplacegalleryimage descriptions

* Add to custom words and fix example

* fix updatemarketplacegalleryimage.json

* add marketplaceGalleryImages to readme

* update all references to v3

* Revert "update all references to v3"

This reverts commit 186589ff6ab6f0d3b5257c2ebe8b078e1f29052a.

* npm run prettier

* User/vishalk/storage container rpsaasdev (Azure#7084)

* swagger chanfes

* added availablesize and containersize in status

Co-authored-by: Vishal Kadam <vishalkadam@microsoft.com>

* V3 to v2

* fix typo

* Revert "fix typo"

This reverts commit 8ea4035c868811dedcf3d7db17cfb9decb3814f9.

* Revert "V3 to v2"

This reverts commit c04f9f7254e28485bfe2fa6a9fbcf9cd921d518e.

* convert all to v3

* v3 to v2, add ListOperationByCluster example

* linter feedback

* more fix based on linter feedback

* fix breaking change errors

* continue fixing breaking change

* User/vishalk/storage container (Azure#5953)

* updated VHD object

* updated storage container swagger

* added available size property

* updated description of path

Co-authored-by: Vishal Kadam <vishalkadam@microsoft.com>

* Add canceled to provisioningState enum

Co-authored-by: Arka <Arkanayan@users.noreply.github.com>
Co-authored-by: vishal-kadam <33834843+vishal-kadam@users.noreply.github.com>
Co-authored-by: Vishal Kadam <vishalkadam@microsoft.com>

* cherry-pick merge conflict resolution

* storage container changes (Azure#6614)

* storage container changes

* added availableSizeGB and containerSizeGB properties

* changed data type of containersize and availablesize

* converted gb to mb

* made availableSizeMB and containerSizeMB fields readonly

Co-authored-by: Vishal Kadam <vishalkadam@microsoft.com>

* Change hybrididentitymetadata vmid to resourceUid (Azure#4921)

* change hybrididentitymetadata vmid to resourceUid

* update examples

* fix missed merging changes

* cherry-pick merge conflict resolution

* remove 2022-09-01 examples

* git difftool align differences with RPSaaSMaster

* spellcheck fix

* breaking change cross version fix

* fix version

* fix custom word typo

* fix default tag to 2022-10

* address description and example feedback

* address swagger modelvalidation errors

* missed linter and model validation error

* prettier fix

* fixing breaking change errors

* backport common.json from 2021-07-01-preview

* prettier on common.json

* replace Idenitty from v2 definitions

* fix property bag capitalization

* Add missed capitalization modifications

* Add missed semantic fix

* Add missed semantic fix

* revert property definition capitalization according to reviewer feedback

Co-authored-by: Arka <Arkanayan@users.noreply.github.com>
Co-authored-by: vishal-kadam <33834843+vishal-kadam@users.noreply.github.com>
Co-authored-by: Vishal Kadam <vishalkadam@microsoft.com>
Co-authored-by: aeweston-msft <59626096+aeweston-msft@users.noreply.github.com>
kayousef-zz pushed a commit to kayousef-zz/azure-rest-api-specs that referenced this issue Dec 21, 2022
…ft.AzureStackHCI-2021-09-01-preview' (Azure#21296)

* Adds base for updating Microsoft.AzureStackHCI from version stable/2021-09-01 to version 2021-09-01-preview

* Updates readme

* Updates API version in new specs and examples

* resolve conflicts

* [Microsoft.AzureStackHCI] 2021-09-01-preview update (Azure#7147)

* GalleryImage, MarketplaceGalleryImage, VirtualMachine, and VirtualHardDisk 2021-09-01-preview changes (Azure#6751)

* initial commit

* syntax error fix

* move galleryimageversionproperties under galleryimageproperties

* add galleryimageversion as child of galleryimageproperties

* update create/get galleryimage json example

* remove version readonly and fix version description

* add imagesource and fix imagepath example

* fix getgalleryimage.json

* pending to inprogress

* mark secret x-ms-secret

* fix osdisk uri to id in vms

* update to local

* create marketplacegalleryimages

* fix file name

* filenmae fix

* file rename

* file rename

* add missing exampl.es

* add enum

* update vm and vhd examples

* add num to galleryimages as well

* fix example: remove imagepath from response and fix sizeInMB

* update vhd example response with other properties

* fix vm create vlow

* fix example imagereference

* fix osdisk camel case

* remove securityprofile from response

* add readonly to sizeInMB

* update disksizeBytes and readonly to sizeInMB

* update missed diskSizeBytes in examples

* fix camelcase

* remove osprofile from response and request when osdisk is specified in vm put

* Add signature, set proper status properties to galleryImages & marketplaceGalleryImages (Azure#6989)

* add signature, set proper status properties

* fix semantics

* fix status for all resources and remove signature

* remove imagePath from marketplacegalleryimage example

* fix status name

* add readonly to status

* add x-ms-client-flatten, and align errorMessage/errorCode description

* update property description

* add powerstate to virtualmachinestatus

* add provisioningstate enum and remove readonly for galleryimageversion.name

* Sync azurestackhci 2021-07 changes to 2021-09 (Azure#7106)

* sync marketplacegalleryimage descriptions

* Add to custom words and fix example

* fix updatemarketplacegalleryimage.json

* add marketplaceGalleryImages to readme

* update all references to v3

* Revert "update all references to v3"

This reverts commit 186589ff6ab6f0d3b5257c2ebe8b078e1f29052a.

* npm run prettier

* User/vishalk/storage container rpsaasdev (Azure#7084)

* swagger chanfes

* added availablesize and containersize in status

Co-authored-by: Vishal Kadam <vishalkadam@microsoft.com>

* V3 to v2

* fix typo

* Revert "fix typo"

This reverts commit 8ea4035c868811dedcf3d7db17cfb9decb3814f9.

* Revert "V3 to v2"

This reverts commit c04f9f7254e28485bfe2fa6a9fbcf9cd921d518e.

* convert all to v3

* v3 to v2, add ListOperationByCluster example

* linter feedback

* more fix based on linter feedback

* fix breaking change errors

* continue fixing breaking change

* User/vishalk/storage container (Azure#5953)

* updated VHD object

* updated storage container swagger

* added available size property

* updated description of path

Co-authored-by: Vishal Kadam <vishalkadam@microsoft.com>

* Add canceled to provisioningState enum

Co-authored-by: Arka <Arkanayan@users.noreply.github.com>
Co-authored-by: vishal-kadam <33834843+vishal-kadam@users.noreply.github.com>
Co-authored-by: Vishal Kadam <vishalkadam@microsoft.com>

* cherry-pick merge conflict resolution

* storage container changes (Azure#6614)

* storage container changes

* added availableSizeGB and containerSizeGB properties

* changed data type of containersize and availablesize

* converted gb to mb

* made availableSizeMB and containerSizeMB fields readonly

Co-authored-by: Vishal Kadam <vishalkadam@microsoft.com>

* Change hybrididentitymetadata vmid to resourceUid (Azure#4921)

* change hybrididentitymetadata vmid to resourceUid

* update examples

* fix missed merging changes

* cherry-pick merge conflict resolution

* remove 2022-09-01 examples

* git difftool align differences with RPSaaSMaster

* spellcheck fix

* breaking change cross version fix

* fix version

* fix custom word typo

* fix default tag to 2022-10

* address description and example feedback

* address swagger modelvalidation errors

* missed linter and model validation error

* prettier fix

* fixing breaking change errors

* backport common.json from 2021-07-01-preview

* prettier on common.json

* replace Idenitty from v2 definitions

* fix property bag capitalization

* Add missed capitalization modifications

* Add missed semantic fix

* Add missed semantic fix

* revert property definition capitalization according to reviewer feedback

Co-authored-by: Arka <Arkanayan@users.noreply.github.com>
Co-authored-by: vishal-kadam <33834843+vishal-kadam@users.noreply.github.com>
Co-authored-by: Vishal Kadam <vishalkadam@microsoft.com>
Co-authored-by: aeweston-msft <59626096+aeweston-msft@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cognitive - Face Service Attention Workflow: This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

5 participants