Skip to content

OpenAPI? #447

Open
Open

Description

@luposlip

Library Version(s)

[metosin/compojure-api "2.0.0-alpha31"]
[metosin/spec-tools "0.10.4"]

Problem

I can't seem to find a standard way to generate OpenAPI specification from my api. I have the swagger spec and swagger UI working just fine (and it rocks!). But a team I'm working with needs OpenAPI specs (and possibly also UI).

It'd be cool if the :swagger etc. could be replaced by :openapi in this snippet of a snippet:

(api
   {:swagger
    {:ui "/"
     :spec "/swagger.json"
     :data {...

Do you have an example project where you've implemented this, or can you give me some hints on how - if possible - to achieve this?

Thanks.

Activity

  1. luposlip commented on Dec 13, 2020

    @luposlip
    Author

    Anyone? 😉

  2. aphsa commented on Dec 28, 2020

    @aphsa

    How to upvote this request? +1:

  3. rrudakov commented on Feb 25, 2021

    @rrudakov

    Hello, if it's still relevant I've created an example project with generation OpenAPI3 documentation with compojure-api here. It was very quick and needs some cleanup, file uploads don't work so far (I'm going to fix it).

    I'd like to open PR to this repo to add OpenAPI3 docs generation out of the box, but I need to figure out how to do it better way. Probably support of swagger2 generation should be dropped in this case.

  4. luposlip commented on Feb 25, 2021

    @luposlip
    Author

    Really cool, thanks so far @rrudakov !

  5. rrudakov commented on Feb 25, 2021

    @rrudakov

    @luposlip I've fixed file uploads in my example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions