Skip to content

swagger API #4

Closed
Closed

Description

@pi0

expose swagger compatible API from dev server based on handler defenitions.

Activity

  1. added
    enhancement
    on Apr 6, 2022
  2. pi0 commented on Apr 6, 2022

    @pi0
    MemberAuthor
  3. reopened this on May 2, 2022
  4. BracketJohn commented on Jun 1, 2022

    @BracketJohn

    Quoting from https://github.com/nuxt/framework/discussions/4582:

    [..] swagger UI is a great feature for newcomers, product managers and smoke-testing (:

    So would really love to see this - with the correct pointers I'd even try myself on it, but am unsure if this is a good first issue.

  5. septatrix commented on Oct 25, 2022

    @septatrix
    Contributor

    Is the whole /server/api of Nuxt 3 mostly handled by nuxt or nitro? ...if nitro only has access to the routes and url arguments but not the return type or similar it would make little sense to implement it inside nitro.

    Or generally: Is there any access to the route definitions and types during runtime in either nitro or nuxt? I would think so as nuxt generates .d.ts file on the fly based on my understanding so far but I might be wrong. If that is the case than that could be used to generate them and potentially expose them on a special endpoint, kinda like FastAPI does.

  6. ghost assigned on Apr 17, 2023
  7. sannajammeh commented on Nov 2, 2023

    @sannajammeh

    Is there any more work being done on this? Could it be possible to export a json schema or zod type to reflect what the endpoint is returning in the OpenAPI spec?

  8. pi0 commented on Nov 2, 2023

    @pi0
    MemberAuthor

    Currently it is exposed via experimental flag as /_nitro/openapi.json. So you can use it already.

    It is in our roadmap after introducing route meta support to improve this feature and iterate.

  9. mrloldev commented on Jan 6, 2024

    @mrloldev

    how can you modify the tags?

  10. chenyuncai commented on Mar 8, 2024

    @chenyuncai

    is there any way to support nested route. Api need to be grouped in most case.

  11. pi0 commented on Mar 8, 2024

    @pi0
    MemberAuthor

    @chenyuncai feel free to open new individual issue for it 👍🏼 (or any other idea related to openapi)

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

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions