Git Product home page Git Product logo

Comments (22)

naveedaz avatar naveedaz commented on May 23, 2024 1

@jhendrixMSFT The fix was checked in 10/13/2016. However, we hit some bumps with our deployment train and is now targeted for Nov 11 2016. Users will have to use api-version >= 2016-08-01. The latest composite swagger files have the updated api versions. https://github.com/Azure/azure-rest-api-specs/blob/master/arm-web/compositeWebAppClient.json.

from azure-rest-api-specs.

amarzavery avatar amarzavery commented on May 23, 2024

@naveedaz - Can you please take a look into this issue?

from azure-rest-api-specs.

amarzavery avatar amarzavery commented on May 23, 2024

@lmazuel
I have no clue why is the server sending you 0 instead of one of the valid values. This definitely is a bug on the server side. Either the spec needs to be updated or the server side needs a fix.

From code gen point of view, the extension "x-ms-enum" is documented over here.
Since "modelAsString" is set to false, sslState would be an enum in C# and Java. Node.js does not support enums. The generated node.js code will do the validation (throw if the value is not from the set of valid values) in this case.

I am not sure about Python. v3.4 has enums implemented and v2.7 does not.
@xingwu1 who implemented the python code gen would be in a better position to comment on the behavior in python.

from azure-rest-api-specs.

amarzavery avatar amarzavery commented on May 23, 2024

@lmazuel - Update to my comment:
Sorry, I concluded too fast. Is this the response from the server or the deserialized response from the python code gen? If the server is sending the correct response (string for sslState) then Python codegen is doing something different (Returning index of the enumValue)..

from azure-rest-api-specs.

lmazuel avatar lmazuel commented on May 23, 2024

This is the actual response from the server, I know it's important to check that this is not a language specific problem. No Python here :)
I cite Python for the record, to give context, but really it's the actual JSON from the server.

from azure-rest-api-specs.

lmazuel avatar lmazuel commented on May 23, 2024

Either the spec needs to be updated or the server side needs a fix.

It's what I think too.

from azure-rest-api-specs.

amarzavery avatar amarzavery commented on May 23, 2024

Thanks for confirming. Then this is a server side issue. @naveedaz from webapps team would be in a better position to comment.

from azure-rest-api-specs.

amarzavery avatar amarzavery commented on May 23, 2024

@naveedaz - Any update on this?

from azure-rest-api-specs.

naveedaz avatar naveedaz commented on May 23, 2024

From Microsoft.Web standpoint the response has enumerations as proper enumtypes like for SSLState: Disabled, SniEnabled, IpBasedEnabled etc.
However the requests are brokered from user to resource provider by Azure resource Manager, and the response from there seems to have 0,1,2 instead of the enum types.
@IlyaGrebnov Can you elaborate on why that is the case?

from azure-rest-api-specs.

IlyaGrebnov avatar IlyaGrebnov commented on May 23, 2024

@naveedaz ARM doesn't know schema of individual resources, so maping "string" to int (and vise-versa) is not possible at our layer. Most likely issue is caused by Microsoft.Web RP or client tools/libs.

from azure-rest-api-specs.

lmazuel avatar lmazuel commented on May 23, 2024

@naveedaz @IlyaGrebnov I can assure you that this it NOT a client tools/libs problem: the answer I got is direct from the REST API.

from azure-rest-api-specs.

IlyaGrebnov avatar IlyaGrebnov commented on May 23, 2024

Yes, I believe this is know bug in Antares/Geomaster RP which serialize enums to numbers by default.

from azure-rest-api-specs.

lmazuel avatar lmazuel commented on May 23, 2024

Any news on this one?

I made a screenshot of resources.azure.com to establish at 100% that this is not a Python issue
sslstatebug

from azure-rest-api-specs.

lmazuel avatar lmazuel commented on May 23, 2024

@IlyaGrebnov @naveedaz Is this possible to have a status on this one?
For now, it was "just" internally by me but now I have an open bug which related to this one (Azure/azure-sdk-for-python#544)

At least a status: we will fix it, we won't, you will need a new API version, there is an open issue there http://xxxx, etc.
Another guy in our team had to patch his code manually to do his //Build demo.
There is no workaround since the JSON exposed by the API uses an index from an enum we don't know (we have no guarantee that the enum order in the Swagger file is the one considered by the server).

Thank you for considering this.

from azure-rest-api-specs.

IlyaGrebnov avatar IlyaGrebnov commented on May 23, 2024

@naveedaz could you please comment on this? ARM simple proxy response from resource provider. And I believe this is issue on 'GeoMester'.

from azure-rest-api-specs.

devigned avatar devigned commented on May 23, 2024

@naveedaz are there any plan to correct this issue, or should we expect the API to continue to return the integer response?

If we are to expect the API to return the integer response, can you then ensure that any new enums will be added to the end of the list, thus preserving the correctness of the generated code? Any change to the order of the enumeration will be a breaking change to end users.

/cc @kamaljit for visibility.

from azure-rest-api-specs.

amarzavery avatar amarzavery commented on May 23, 2024

@naveedaz - It has been open for more than 6 months now. Any ETA for this fix?

from azure-rest-api-specs.

naveedaz avatar naveedaz commented on May 23, 2024

We are working on a fix targeted for next release ETA end of month. The fix will be api-version specific to prevent breaking existing clients.

from azure-rest-api-specs.

jhendrixMSFT avatar jhendrixMSFT commented on May 23, 2024

Thanks for the update, will that fix include the issue mentioned in #137?

from azure-rest-api-specs.

naveedaz avatar naveedaz commented on May 23, 2024

Yes. It will address that issue as well.

from azure-rest-api-specs.

jhendrixMSFT avatar jhendrixMSFT commented on May 23, 2024

@naveedaz Is this still on track to be fixed by the end of this month?

from azure-rest-api-specs.

naveedaz avatar naveedaz commented on May 23, 2024

FYI the fix is deployed. Users will have to use api-version >= 2016-08-01. The latest composite swagger files have the updated api versions. https://github.com/Azure/azure-rest-api-specs/blob/master/arm-web/compositeWebAppClient.json.

"hostNameSslStates": [
      {
        "name": "naveedalb.trafficmanager.net",
        "sslState": "Disabled",
        "ipBasedSslResult": null,
        "virtualIP": null,
        "thumbprint": null,
        "toUpdate": null,
        "toUpdateIpBasedSsl": null,
        "ipBasedSslState": "NotConfigured",
        "hostType": "Standard"
      },
      {
        "name": "naveedasrc.azurewebsites.net",
        "sslState": "Disabled",
        "ipBasedSslResult": null,
        "virtualIP": null,
        "thumbprint": null,
        "toUpdate": null,
        "toUpdateIpBasedSsl": null,
        "ipBasedSslState": "NotConfigured",
        "hostType": "Standard"
      },
      {
        "name": "naveedasrc.scm.azurewebsites.net",
        "sslState": "Disabled",
        "ipBasedSslResult": null,
        "virtualIP": null,
        "thumbprint": null,
        "toUpdate": null,
        "toUpdateIpBasedSsl": null,
        "ipBasedSslState": "NotConfigured",
        "hostType": "Repository"
      }
    ]

from azure-rest-api-specs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.