Comments (13)
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.
@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.
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.
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.
In my opinion such functionality should already be built in...
from ktor-openapi-generator.
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.
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.
@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.
@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.
@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.
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.
It looks like this library is still relevant as JetBrains makes OpenAPI spec generation a paid feature of IDEA Ultimate.
from ktor-openapi-generator.
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)
- Problem with authentication HOT 11
- Reusable enums
- Enum parser is okay with wrong values HOT 3
- Deserialisation of List<UUID> in body fails during runtime HOT 1
- Can't set name of token parameter or cookie name in SecurityScheme
- Add response header to a route
- Default values on @QueryParam HOT 4
- Overriding a primitive converter (UUID) HOT 5
- Serializing collections of different element types is not yet supported HOT 4
- API route with Any must be a data class. HOT 4
- File upload HOT 10
- @Description annotation doesn't work HOT 3
- Is there a simple way to split the endpoints of an application in two different openapi-files? HOT 1
- @HeaderParam is adding header to request body instead of request header
- Enum classes are generated for each usage instead of a schema that can be reused
- How to properly indicate a application/x-www-form-urlencoded response HOT 1
- @Hidden annotation for fields in request / response body HOT 2
- Suggestion for conditional validation HOT 1
- Description for response HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ktor-openapi-generator.