Git Product home page Git Product logo

Comments (8)

HugoMario avatar HugoMario commented on June 15, 2024

It totally makes sense to me.

from swagger-codegen-generators.

webron avatar webron commented on June 15, 2024

@reta Hi! Yup, that makes perfect sense. Of course it would mean using all 2.x annotations and not just @Schema but the idea itself is right.

from swagger-codegen-generators.

reta avatar reta commented on June 15, 2024

Thank you guys, on it.

from swagger-codegen-generators.

reta avatar reta commented on June 15, 2024

@webron @HugoMario I started the work on this issue, the scope is larger then I initially expected, I opened #101 (work-in-progress) so you guys could see the progress and guide me through.

As I have got to know the code a bit more, my understanding is that Swagger Codegen Generators module deals with OAS 3.0.x specification only (not the old 2.x one), so I made the changes non-conditional and always use OAS 3.0.x annotations for code generation. Please correct me if I am wrong here.

from swagger-codegen-generators.

HugoMario avatar HugoMario commented on June 15, 2024

Hello @reta , sorry for delay answer, i wasn't around these last days.

I think your approach is correct and PR LGTM, but i think we need to add an option that let users keep on using the previous annotation. I can help with that.

So the idea is having by default the OAS 3 annotation but leaving an option to anybody that want to keep using the previous one. Let me know if you are done with changes here and i'll file a new ticket for that.

Thanks!

from swagger-codegen-generators.

reta avatar reta commented on June 15, 2024

Hey @HugoMario,

Thanks for looking! Yeah, it would be a bit of work / conditionals, but makes sense overall, will be working on updating the PR to have both specs supported.

Thanks!

from swagger-codegen-generators.

HugoMario avatar HugoMario commented on June 15, 2024

Hey @reta
It sounds great, also if you check this guide https://github.com/swagger-api/swagger-codegen/wiki/How-to-add-an-option-to-a-specific-language-or-framework it would give you an idea. I think it can help us with this feature.

from swagger-codegen-generators.

HugoMario avatar HugoMario commented on June 15, 2024

this has been implemented, so let's close it

from swagger-codegen-generators.

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.