Skip to content

OpenAPI: handle "servers" #74

@alukach

Description

@alukach

If an upstream API is using root_path on FastAPI1 (e.g. if serving behind an API Gateway which requires a stage in the path), then the OpenAPI spec likely includes a servers declaration2. That declaration should be removed when augmenting the OpenAPI spec.

Additionally, if the proxy API is using a root_path, then we should ensure that the serves declaration appropriately demonstrates that.

Footnotes

  1. https://fastapi.tiangolo.com/advanced/behind-a-proxy/

  2. https://swagger.io/docs/specification/v3_0/api-host-and-base-path/

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions