Code Monkey home page Code Monkey logo

Comments (13)

LukasForst avatar LukasForst commented on June 11, 2024 5

Hey, I forked this repo and wired stuff together to work with Ktor 2.0.0 the fork is here - https://github.com/LukasForst/ktor-openapi-generator - it's also deployed on maven central, so feel free to use that build.

It's not very nice, Ktor removed some stuff this lib relied on (content type handling for example see this ugly hack ) but I monkey patched most of the stuff and now I'm successfully using that in two of my projects in production with Ktor 2.0.0 - so I guess the subset of stuff I use works.

There're are definitelly better ways how to fix all that stuff to make it compatible with Ktor 2.0.0, I choose the way of minimal effort and that's why I didn't make PR to this repository. I'm not sure if we can upstream this to master here as during the process I also migrated to gradle kotlin DSL and I'm not sure what plans does @Wicpar have with this project.

from ktor-openapi-generator.

Wicpar avatar Wicpar commented on June 11, 2024 4

@LukasForst if you are willing to maintain the project i can add you as a collaborator, and it would be a good idea to update to the newer version, even if it's a bit hacky

from ktor-openapi-generator.

LukasForst avatar LukasForst commented on June 11, 2024 1

hey @sigmanil can you try to update to latest Ktor 2.0.1? See https://youtrack.jetbrains.com/issue/KTOR-4187 because that was for example problem in my apps

actually, I'm surprised base ktor status pages work for you in 2.0.0 because according to that Ktor bug, it was broken (and it was broken in my services as well)

anyway, I'm going to release version with Ktor 2.0.1, let us know if that fixes the behavior of status pages in this library or not LukasForst#2

from ktor-openapi-generator.

LukasForst avatar LukasForst commented on June 11, 2024 1

I agree, their solution is far from optimal. I guess we offload serving the UI to their implementation, but honestly even that one is worse, because it fetches js from remote source during runtime...

Anyway, there are now more alternatives in the wild such as https://github.com/bkbnio/kompendium and https://github.com/SMILEY4/ktor-swagger-ui

My fork of this repo is not exactly maintained, but I keep releasing dependency updates to maven central.

from ktor-openapi-generator.

vladtrc avatar vladtrc commented on June 11, 2024

In my opinion such functionality should already be built in...

from ktor-openapi-generator.

Wicpar avatar Wicpar commented on June 11, 2024

i don't work with Ktor anymore, i can't spare the time for such a rework, however i will accept pull requests...

from ktor-openapi-generator.

Marek00Malik avatar Marek00Malik commented on June 11, 2024

Hey @LukasForst I'm trying out your fork actually now. The sad part is that there is no support for Location API which looks like the way Ktor is heading (I saw an issue even raised, but it got closed... #70). Are you @LukasForst planning to play with it? I know there is a repo called kompendium that is supporting it, but they are not on Ktor 2.0.0 yet.

from ktor-openapi-generator.

sigmanil avatar sigmanil commented on June 11, 2024

@LukasForst Are you using StatusPages in your applications with your fork? I'm trying out your fork and I seem to have some trouble with statuspages (exception handling) in tests. It's a bit weird, the tests have gone unstable, the status pages set up using the OpenApiGen withApi syntax seem to trigger only sometimes.

Edit: There's definately something strange happening with the StatusPages in the LukasForst fork, I removed the OpenApiGen status pages and relied only on base Ktor StatusPages for 2.0.0, and now it works.

from ktor-openapi-generator.

LukasForst avatar LukasForst commented on June 11, 2024

@Wicpar I'd like to, but definitely not now (busy on other projects, maybe during summer? I'll let you know). However, there're some rumours that JetBrains will work on Ktor Swagger as well (the issue has moved to "in progress" and see blog ) so maybe we will get native support. That would definitely be nice.

from ktor-openapi-generator.

LukasForst avatar LukasForst commented on June 11, 2024

@Marek00Malik sorry, but right now, I don't have enough time to work on this, I just ported the basic stuff to keep my own service up and running and it is ugly hack anyway. Maybe I will get some time during summer, but unfortunately I can not guarantee anything.

from ktor-openapi-generator.

LukasForst avatar LukasForst commented on June 11, 2024

looks like we're going to get official support after all - https://youtrack.jetbrains.com/issue/KTOR-774 - issue just changed from Open to In Progress

from ktor-openapi-generator.

darkxanter avatar darkxanter commented on June 11, 2024

It looks like this library is still relevant as JetBrains makes OpenAPI spec generation a paid feature of IDEA Ultimate.

from ktor-openapi-generator.

Wicpar avatar Wicpar commented on June 11, 2024

My fork of this repo is not exactly maintained, but I keep releasing dependency updates to maven central.

well this library isn't either, so if you want i can link to your repo in the readme for 2.0 compat.

from ktor-openapi-generator.

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.