pgonis has asked for the wisdom of the Perl Monks concerning the following question:

Is there any way to auto generate the swagger json file while running a mojo app?

Replies are listed 'Best First'.
Re: Mojolicious generate a swagger file
by Fletch (Bishop) on Jan 06, 2021 at 13:52 UTC

    Haven't used it myself but a quick search finds Mojolicious::Plugin::OpenAPI. I'm actually curious myself if anyone's got more experience with that module.

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.

        This example just tells you how to work with OpenAPI and Mojolicious. What i am trying to find out is a way the swagger file json or yaml to auto generated while running the mojo application. Other wise advice if you know any other way using a perl framework to work with OpenAPI and auto generate a swagger file
Re: Mojolicious generate a swagger file
by jszinger (Scribe) on Jan 06, 2021 at 18:09 UTC

    I’m not aware of any. Mojolicious::Plugin::OpenAPI consumes the swagger file and uses it to configure routes and I/O validation. I think this is the reverse of what you want.

      Correct, like other programming frameworks can do.