Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

596
Views
FastAPI: no se puede renderizar Swagger en producción

Este es mi archivo main.py de main.py .

 from fastapi import FastAPI from project.config.settings import base as settings app = FastAPI(docs_url=f"{settings.URL_ROOT}/{settings.DOCS_URL}", redoc_url=None) app.openapi_version = "3.0.0" # some functions here

E implementé este proyecto en un servidor. Pero cuando voy a la dirección de documentos en mi servidor, 1.2.3.4/url_root/docs_url , me muestra el siguiente mensaje:

 Unable to render this definition The provided definition does not specify a valid version field. Please indicate a valid Swagger or OpenAPI version field. Supported version fields are swagger: "2.0" and those that match openapi: 3.0.n (for example, openapi: 3.0.0).

¿Cuál es el problema y cómo puedo solucionarlo?

ACTUALIZAR:
FastAPI está detrás de Nginx. Todos mis terminales funcionan correctamente, pero no puedo ver los documentos.

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!