Giter VIP home page Giter VIP logo

Comments (4)

razvanphp avatar razvanphp commented on August 17, 2024

It can be seen here and here:

       "transitType": {
          "enum": [
            "TRANSIT_TYPE_UNSPECIFIED",
            "BUS",
            "bus",
            "RAIL",
            "rail",
            "TRAM",
            "tram",
            "FERRY",
            "ferry",
            "OTHER",
            "other"
          ],
          "description": "Required. The type of transit this class represents, such as \"bus\".",
          "enumDeprecated": [
            false,
            false,
            true,
            false,
            true,
            false,
            true,
            false,
            true,
            false,
            true
          ],
          "type": "string",
          "enumDescriptions": [
            "",
            "",
            "Legacy alias for `BUS`. Deprecated.",
            "",
            "Legacy alias for `RAIL`. Deprecated.",
            "",
            "Legacy alias for `TRAM`. Deprecated.",
            "",
            "Legacy alias for `FERRY`. Deprecated.",
            "",
            "Legacy alias for `OTHER`. Deprecated."
          ]
        },

... but none of the enums get generated.

We should also add the text descriptions as DocBlocks, would be immensely helpful for anybody using this SDK.

from google-api-php-client-services.

bshaffer avatar bshaffer commented on August 17, 2024

Hello @razvanphp

You're correct in identifying that this library does not generate enums.

This was a feature request in #563, but since this library is essentially in maintenance mode, we made the decision to not merge it.

from google-api-php-client-services.

razvanphp avatar razvanphp commented on August 17, 2024

hey @bshaffer

While I understand this lib is pretty much outdated, the wallterobjects objects were added rather recently, but we cannot add those constants only for this because of the generators.

Isn't there a better way to do this without creating so many files, maybe using phpdoc types at least, so IDEs can alert? This can be done in the same files probably, but I'm not familiar with how the generator works to do it myself.

The use-case is obvious, makes no sense to define those in my lib, while depending on those classes anyway, everybody should use types in 2024, even in PHP ๐Ÿ™‚

from google-api-php-client-services.

bshaffer avatar bshaffer commented on August 17, 2024

Hi @razvanphp , these are just strings, so extra classes or typing is not necessary. I do think adding these values to phpdoc is something we should look into.

Edit: it seems like there are a lot of options for this, and we should implement one of them.

from google-api-php-client-services.

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.