• Empleos
  • Sobre nosotros
  • profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
  • empresas
    • Inicio
    • Publicar vacante
    • Nuestro proceso
    • Precios
    • Pruebas Online
    • Nómina
    • Blog
    • Comercial
    • Calculadora de salario

0

426
Vistas
Why is HttpRepl unable to find an OpenAPI description? The command "ls" does not show available endpoints

I am working through the Microsoft Learn tutorials to "Create a web API with ASP.Net Core".

Under the heading, "Build and test the web API", at instruction (5) I am getting a response, "Unable to find an OpenAPI description".

For step (6) when executing the "ls" command I get the response, "No directory structure has been set, so there is nothing to list. Use the 'connect' command to set a directory structure based on an OpenAPI description". I have tried the "connect" command suggested here and have tried "dir" as an alternative to "ls".

I can successfully change directories in step (7) and execute the GET request for step (8) and receive the expected reply. However, it really bothers me the "ls" command is not working here and seems like an important function of the httprepl tool.

How can I get the "ls" command to work here or tell me why does it not work?

C:\Users\xxxx\source\repos\Learn\ContosoPizza>httprepl http://localhost:5000
(Disconnected)> connect http://localhost:5000
Using a base address of http://localhost:5000/
Unable to find an OpenAPI description
For detailed tool info, see https://aka.ms/http-repl-doc

http://localhost:5000/> ls
No directory structure has been set, so there is nothing to list. Use the "connect" command to set a directory structure based on an OpenAPI description.       

http://localhost:5000/>

ADDED RESULTS OF SUGGESTIONS--

C:\Users\xxxx\source\repos\Learn\ContosoPizza>dotnet --version
3.1.412

C:\Users\xxxx\source\repos\Learn\ContosoPizza>dotnet add WebAPI.csproj package Swashbuckle.AspNetCore -v 5.6.3
Could not find project or directory `WebAPI.csproj`.

httprepl GitHub repo and MS Docs page

about 3 years ago · Santiago Trujillo
3 Respuestas
Responde la pregunta

0

I had faced same issue. I have solved it by following:

  1. In Developer PowerShell(VS 2022), Run 'dotnet run' command.

enter image description here

  1. Keep this powershell as it is.
  2. Now open new PowerShell and run "httprepl https://localhost:{PORT}"

You should be able to run api now.

enter image description here

about 3 years ago · Santiago Trujillo Denunciar

0

The solution for me was to simply trust localhost's SSL certification, which you can do with this command:

dotnet dev-certs https --trust

While doing the same Tutorial, a friend of mine noticed, that trusting the dev certificate, was already covered by the Tutorial, which I had overlooked doing the Tutorial myself. This is the official help site: Trust the ASP.NET Core HTTPS development certificate on Windows and macOS. Maybe this will still help someone with the same problem.

about 3 years ago · Santiago Trujillo Denunciar

0

You must be connected to the web server through dotnet run.

about 3 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recomiéndame algunas ofertas
Necesito ayuda