Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange JSON in the "Request body" of API endpoints in LLMs.txt files #5690

Open
hkosova opened this issue Jan 21, 2025 · 1 comment
Open
Labels
bug Issues reporting bugs. product/docs Fern Docs which builds and hosts a developer documentation site

Comments

@hkosova
Copy link

hkosova commented Jan 21, 2025

CLI Version (from fern.config.json)

0.50.13, also 0.46.22

Minimal API Specification

openapi: 3.1.0
info:
  title: LLMs.txt issues
  version: 1.0.0
servers:
  - url: https://example.com/v1

paths:
  /something:
    post:
      summary: Create something
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Foo'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Foo'

components:
  schemas:
    Foo:
      type: object
      properties:
        id:
          type: integer
        bar:
          type: string

Actual UI Behavior

/llms-full.txt and the .mdx file for that sample endpoint contain the following text. Note that the "Request Body" JSON is very strange - it's neither the schema definition not a valid request body example.

# Create something

`` `http
POST https://example.com/v1/something
Content-Type: application/json
`` `



## Request Body

`` `json
{"type":"alias","value":{"type":"id","id":"type_:Foo"}}
`` `

## Response Body

- 200: OK

## Examples

`` `shell
curl -X POST https://example.com/v1/something \
     -H "Content-Type: application/json" \
     -d '{}'
`` `

Expected UI Behavior

"Request Body" section in .mdx and /llms-full.txt contains either the body JSON Schema or a valid sample request body.

Steps to Reproduce

  1. Create a docs project with the OpenAPI spec provided above.
  2. Publish the docs.
  3. Open the page for the POST /something endpoint and append .mdx to the page address.
  4. Check the JSON in the "Request Body" section.

Environment Details

Node.js 22

@hkosova hkosova added bug Issues reporting bugs. product/docs Fern Docs which builds and hosts a developer documentation site labels Jan 21, 2025
@dsinghvi
Copy link
Member

@hkosova this should be fixed now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues reporting bugs. product/docs Fern Docs which builds and hosts a developer documentation site
Development

No branches or pull requests

2 participants