Code Monkey home page Code Monkey logo

Comments (7)

mrlubos avatar mrlubos commented on June 18, 2024 1

@andreujuanc the pull request also changes the replacement pattern so I'd expect a different result for their use case, but will need them to try it since I can't see their OpenAPI spec

from openapi-typescript-codegen.

andreujuanc avatar andreujuanc commented on June 18, 2024

I think it's because both are under the same Tag? I'm currently looking for a way to set an operationId on my spec to set the method name to something better.

EDIT: See #314

from openapi-typescript-codegen.

mrlubos avatar mrlubos commented on June 18, 2024

@donkey-donkey @andreujuanc can you try our fork if that works as you'd expect?

from openapi-typescript-codegen.

andreujuanc avatar andreujuanc commented on June 18, 2024

Can't at the moment. But just for the record, the current lib will use the operationId for naming, so that should be good enough if you have control over the spec.

EDIT: Gave it a star. Will check as soon as I can.

from openapi-typescript-codegen.

askvortcov avatar askvortcov commented on June 18, 2024

As @mrlubos pointed out, this might be resolved by #2043.

from openapi-typescript-codegen.

mrlubos avatar mrlubos commented on June 18, 2024

You'll want to set the new --useOperationId flag to false to try the alternative method name generator. It's available in the latest release, please let us know whether it worked if you try it

from openapi-typescript-codegen.

andreujuanc avatar andreujuanc commented on June 18, 2024

I think OP was asking "why the number suffix", and the answer is because I believe there is no operationId on their spec, and the paths are both on the same Tags. Ignoring the operationId would yield no change to the generated methods.

from openapi-typescript-codegen.

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.