Git Product home page Git Product logo

Comments (6)

brizzbuzz avatar brizzbuzz commented on August 25, 2024

Oh wow this must be new, I see it's marked as experimental. Quite honestly, this breaks some of the stuff I had planned for kompendium v2, but I absolutely want to support this!

I'm in the process of trying to leverage KSP to generate type safe accessors for not just path params like they do here, but for all params, request body and response type.

Will need to think about how locations could fit into that model.

Thanks for the heads up!

from kompendium.

brizzbuzz avatar brizzbuzz commented on August 25, 2024

hmm doesn't look new at all actually... surprised I've never heard of this plugin.

I'm wondering if this should be considered the default way to define parameters for Kompendium 🤔 Basically, this exactly emulates what I am trying to achieve in regards to parameters, but with a native API. And at least some level of type safety, though I do wish it was extended to request bodies and response types as well.

from kompendium.

mkotsbak avatar mkotsbak commented on August 25, 2024

Well, it is still experimental, so users should not at all be required to use it. It's probably so different API that extra methods for this needs to be added.

from kompendium.

brizzbuzz avatar brizzbuzz commented on August 25, 2024

Yea ur definitely right. I need to dig into how exactly these locations work, hopefully it can just be as simple as adding a new case to the kompendium path calculator. Hypothetically, then users could use the location api in conjunction with the kompendium path annotations and life should be good.

But I'm not super hopeful that it will be that simple. Particularly because of that snazzy "nested location" thing they support.

from kompendium.

brizzbuzz avatar brizzbuzz commented on August 25, 2024

I think we are going to be able to do this is a non-breaking way :)

I have a draft PR out that I have only tested anecdotally, but the initial pass looks decent. There are definitely some concessions that need to be made.

I am going to need to require that users add the KompendiumParam annotation to their parameters in the data class as they do for kompendium core, as that is fundamental to the way that metadata processing currently operates. Perhaps in V2 we will need to modularize that to make support for the native apis more seamless.

Also, this PR does not currently handle nested locations, gonna chew on that later.

Check it out and lemme know what you think!

from kompendium.

brizzbuzz avatar brizzbuzz commented on August 25, 2024

I also need to think through a way to pass through the type safe object, at the moment this implementation does not do that

Never mind this was super easy :)

from kompendium.

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.