#How to add description to OpenAPI [Experimental]

4 messages · Page 1 of 1 (latest)

reef widget
#

Hi, according to the documentation, you can enable OpenAPi with:

export default defineNuxtConfig({
  nitro: {
    experimental: {
      openAPI: true,
    },
  },
});

But, it doesn't show parameters or what data is returned, documentation doesn't explain how to configure swagger.

Is possible configure the info that swagger shows?
Something like:

/**
 *  @swagger
 *  /api/auth/login:
 *      post:
 *          summary: hello
 *          description: world
 *      responses:
 *          200:
 *              description: token
*/
export default defineEventHandler(async (event) => {})

How can I achieve that?

storm bolt
woven pewter