fuma-nama / fumadocs

The beautiful docs framework for Next.js. Alternative to Nextra
https://fumadocs.vercel.app
MIT License
1.53k stars 93 forks source link

Per tag generation doesn't generate correctly when using .json #478

Closed perkinsjr closed 4 months ago

perkinsjr commented 4 months ago

To Reproduce

  1. Using a OpenAPI file that is in JSON format. (https://api.unkey.dev/openapi.json)
  2. Use default generation which is per tag
  3. A single file will be generated versus file for each tag.

Current vs. Expected behavior

Expected to see a file per tag when generating but saw one large file instead.

Provide environment information

Node.js v22.1.0

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.0.0: Thu May 30 21:33:22 PDT 2024; root:xnu-11215.0.31.511.2~1/RELEASE_ARM64_T8122
  Available memory (MB): 16384
  Available CPU cores: 8
Binaries:
  Node: 22.1.0
  npm: 10.7.0
  Yarn: N/A
  pnpm: 9.0.6
Relevant Packages:
  next: 14.2.4 // Latest available version is detected (14.2.4).
  eslint-config-next: N/A
  react: 18.3.1
  react-dom: 18.3.1
  typescript: N/A
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Integrations (e.g Contentlayer, OpenAPI, Typescript DocsGen)

Additional context

No response

fuma-nama commented 4 months ago

Oops it is a docs mistake, it should be file by default. You can pass “tag” directly

fuma-nama commented 4 months ago

Updated the docs: https://fumadocs.vercel.app/docs/ui/openapi Closing this as fixed on 12.1.1