OpenAPI not adding backslash to URLs
See original GitHub issueUsing the default host.json configuration below. Functions all work great through postman, but when trying to execute through OpenAPI site, it is not adding a backslash to the URL after the domain/port:
Request URL http://localhost:7071api/v1/todo?status=active
TypeError: Failed to execute ‘fetch’ on ‘Window’: Failed to parse URL from http://localhost:7071api/v1/todo?status=active
host.json:
{ "version": "2.0", "extensions": { "http": { "routePrefix": "" } } }
Function:
.Functions(functions => functions .HttpRoute("/api/v1/HelloWorld", route => route .HttpFunction<HelloWorldCommand>() ) .HttpRoute("/api/v1/todo", route => route .HttpFunction<GetTodoQuery>(HttpMethod.Get) .HttpFunction<GetTodoByIdQuery>("/{id}", HttpMethod.Get) .HttpFunction<CreateTodoCommand>(HttpMethod.Post) .HttpFunction<MarkTodoAsCompleteCommand>("/complete", HttpMethod.Put) .OpenApiDescription("this is a test") ) );
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:6 (5 by maintainers)
This should all be resolved in v2.1.1 that is indexing in NuGet now.
Thanks for raising.
yes @JamesRandall, it is fixed now. many thanks!