❔ how to use swagger in console application?
I created simple console application and wrote this:
and all I see in console:
actually I don't understand how to see swagger ui
14 Replies
Uhm.. Swagger is for HTTP endpoints.
I just want to create open api documentation for my objects
your program needs to have an API to document
it doesn't work in a vacuum, it generates it dynamically based on your endpoints
hm, I have this one but it looks like custom api
let me show..
I have this class with custom attributes:
so this class tell us that we have commands, we can see their arguments and return values
and all I want is generate openapi documentation for another people
documentation of this class
do you have an actual ASP.NET Core web api?
because that's what the swagger integration works with
I don't have it right now, but I can easily create. Can swagger create documentation by this class for me?
I don't think that swagger can work with custom attributes
it can't
that's why you need an actual ASP.NET Core web api
that's what it generates documentation from
https://editor.swagger.io/ but left side looks like a simple yaml idk
yes, you can write it by hand if you want. it's just a spec
but if you want to use the ASP.NET Core integration to do it automatically, you have to use ASP.NET Core
ah okay
can you recommend some libraries for that? I don't want to create it by my own
i don't know of any
if you have all custom code there probably isn't an option
oh no
anyway thanks for helping
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.