Skip to content

[Bug?]: Allow generation of OpenAPI #1972

@Vexcited

Description

@Vexcited

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 😯

Nitro allows for automatic generation of OpenAPI, see https://nitro.build/config#openapi, sadly when enabling the feature through app.config.ts, routes are not accessible.

Expected behavior 🤔

I should be able to navigate to Nitro generated endpoints, thus allowing me to retrieve the generated OpenAPI.

Steps to reproduce 🕹

Since Vinxi is based on Nitro and SolidStart is based on Nitro, it is possible to enable the feature using the following.

// /app.config.ts
import { defineConfig } from "@solidjs/start/config";

export default defineConfig({
  server: {
    experimental: {
      openAPI: true
    },
    // Configure your OpenAPI as per the documentation.
    openAPI: {
      meta: {
        title: "My API",
      }
    }
  }
});

Sadly, when navigating to /_scalar, /_swagger or /_openapi.json endpoints, a 404 is given by rendering the actual routes from the app.

Context 🔦

I only work on the API of my service and my coworker on the frontend and he only knows how to read Swagger or OpenAPI and does not want to bother looking at the code of these API routes.

We're using SolidStart as an SPA, the only reason we're using SS is for the builtin file routing and API routes.

Your environment 🌎

OS: macOS 26.0
CPU: arm64
Bun: 1.2.21
Node: 24.7.0
pnpm: 10.15.0
@solidjs/start: 1.2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions