Open API Documentation
Generate an Open API documentation for your Nuxt project with Scalar.
This is currently experimental and subject to change in the future.
Getting Started
NuxtHub uses Nitro's OpenAPI generation to access your Nuxt project's API.
To enable the API, you need to add enable Nitro's experimental openAPI
feature. You can do this by adding the nitro.experimental.openAPI
property to your nuxt.config.ts
file.
nuxt.config.ts
export default defineNuxtConfig({
nitro: {
experimental: {
openAPI: true
}
}
})
After you deploy your project, NuxtHub Admin will showcase your API documentation using Scalar.
Nuxt DevTools
In development, you can use Nuxt DevTools to access your API routes. using the Server Routes
tab.
It list all the API routes in your project as well as providing a playground to send and test your endpoints.
Check out the Nuxt DevTools documentation for more information.