Add 200 code for import APIs#1166
Conversation
|
LGTM |
|
@nathannfan based on your comment, it appears this is addressing a bug in the swagger, as the service is returning 200. Was the service changed (breaking change?) or just missed before? |
|
@veronicagg I'm not sure. Context: Import operations can use SAS key or Storage Key. The reason I changed the response code to 201 in a previous commit was that the service was returning 201 for import operations using SAS key, and my SDK tests were failing. Now Johan is getting 200 when running his own tests. I have a suspicion that the service is returning 201 for SAS key and 200 for using Storage key, but I haven't verified. I'd be happy to investigate. |
|
@nathannfan I see, my question about change in behavior is mostly to know if I should label this change as a potential sdk breaking change, or it's more like a bug fix because it never worked. |
|
@veronicagg I've figured out what happened. It is a bug fix. Looks like importing a bacpac to create a new database returns 200, and importing a bacpac into an existing database returns 201, the opposite of what I had expected. When I first added Import/Export, I had originally added 201 to the Import create database and 200 to Import update database, and both sdk tests passed, so I took that to mean my swagger was accurate. Later on, I happened to notice that update database was actually getting 201 back, but didn't think to check whether create database was getting 200 back, again because the tests continued to pass. |
veronicagg
left a comment
There was a problem hiding this comment.
Change looks good, thanks! I'm a little curious on the statement "tests continue to pass" are you adding new tests somewhere so this would not regress in the future?
|
No modification for NodeJS |
Import was returning 201 when this swagger was updated to return 201, and SDK tests were passing.
Import just returned 200 and caused SDK tests to fail, so leaving both 200 and 201 documented.
PR information
api-versionin the path should match theapi-versionin the spec).Quality of Swagger