Skip to content

Word breaking fails for kind APIService #605

@cben

Description

@cben

It gets method names like get_apiservice, get_apiservices.

  • The updated algorithm on master branch correctly splits underscore_entity("APIService") -> "api_service".
  • However, parse_definition computes prefix it can match against the given lowercase plural, up to the last capital letter.
    • Normally you get e.g. "NetworkP" + "olicy"/"olicies" -> "network_p" + "olicy"/"olicies".
    • But when prefix is all uppercase e.g. "APIS", we compute underscore_entity("APIS") -> "apis", to which we append "ervice"/"ervices" to construct "apiservice", "apiservices" ☹️

We have all the information here that "Service" is a separate word, but we're not passing it into underscore_entity. 🤔

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions