danielgtaylor / danielgtaylor/apisprout

/__reload route does not use custom headers

Open
#60 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
719
Forks
70
PR merge metrics
No merged PRs in 30d

Description

When starting `apisprout --header "CustomerHeader: value" uri`, apisprout will as expected load the swagger definition at uri provided using the custom header provided. We use it to provide a security access token to access the protected uri resource.

When asking apisprout to reload the definition via a /__reload call:
* custom header won't be used
* download will fail (our server reports a 404 if our security heaser isn't sent)
* apisprout will display 'Reloaded from uri" message and no error is reported
* apisprout won't fail and will keep on working assuming an empty definition has been provided (all calls to apisprout will result in 404)

Will try to provide a fix via a PR.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the /__reload route and compare it with the initial apisprout --header definition-loading path. Verify that configured custom headers are sent during reload and that download failures are reported instead of producing an empty definition; done means protected definitions reload successfully and errors are visible.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, openapi
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.