unjs / nitro

Next Generation Server Toolkit. Create web servers with everything you need and deploy them wherever you prefer.
https://nitro.unjs.io
MIT License
5.98k stars 496 forks source link

openapi in nitro only work in local development do not work when deploy with cloudflare pages #2418

Closed hoanglinh9955 closed 1 month ago

hoanglinh9955 commented 5 months ago

Environment

Reproduction

Describe the bug

Context

I can access on local mode image

Nuxt config file


export default defineNuxtConfig({
  devtools: { enabled: true },

  nitro: {
    preset: "cloudflare-pages",
    experimental: {
      openAPI: true,
    },
  },

  modules: ["nitro-cloudflare-dev", "@nuxt/ui"]
})

Additional context

No response

Logs

No response

pi0 commented 5 months ago

Hi, dear @hoanglinh9955. It is a known limitation as current open API support in nitro is for development only.

Stay tuned, in the future it will be possible to opt-in (and possibly password protection)

bacongobbler commented 3 months ago

Hey @pi0, is there a ticket tracking that feature? I'd also like to enable openapi support in production mode.