Skip to content

openapi/open-api.json: servers field points to localhost (127.0.0.1:9000) instead of the production API URL #234

@saiprasadnayak6858

Description

@saiprasadnayak6858

Bug: servers field in open-api.json points to localhost

File: static/pendle-v2/openapi/open-api.json

Problem

The servers field in the OpenAPI specification is currently set to a localhost address:

"servers": [
  {
    "url": "http://127.0.0.1:9000"
  }
]

This appears to have been captured when the JSON spec was generated from a local development server rather than from the production endpoint.

Expected Value

Based on the production API base URL used consistently throughout the rest of the documentation, the servers field should point to the production API, e.g.:

"servers": [
  {
    "url": "https://api-v2.pendle.finance/core"
  }
]

Impact

  • Any API client or tool (e.g. Swagger UI, Postman, code generators) that reads the servers field from this OpenAPI spec will attempt to make requests to http://127.0.0.1:9000, which will fail for all external users.
  • This can cause confusion for developers integrating with the Pendle V2 API.

How to Fix

Per the instructions in docs/Developers/updating-ai-assets.md, the spec should be regenerated from the production endpoint:

curl -s https://api-v2.pendle.finance/core/docs-json \
  | python3 -c "import json,sys; print(json.dumps(json.load(sys.stdin), indent=2))" \
  > static/pendle-v2/openapi/open-api.json

This will ensure the servers field reflects the correct production URL.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions