Issue 1075: Configure request headers#1
Draft
jessicasomaiya wants to merge 2 commits intoresolutionlife:mainfrom
Draft
Issue 1075: Configure request headers#1jessicasomaiya wants to merge 2 commits intoresolutionlife:mainfrom
jessicasomaiya wants to merge 2 commits intoresolutionlife:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR
This is a PR to address this comment looker-open-source#1075 (comment). This implementation doesn't actually fully implement the proposed solution because it's buggy and definitely not optimal. This PR is here just to share my attempt!
Description
The aim is to change the looker SDK generator for go to support an optional header arg
headerOptionsfor Looker endpoints that support multipleAcceptheaders. The idea was to inspect the swagger file and add the arg conditionally.I'm using the field
returnType.mediaType, but if more than one media type/mime type is supported by looker this field returns empty. This isn't the only case where this field returns empty so there's either a bug in how the swagger mapping is done or there are some cases not covered in the swagger file. Due to this, theheaderOptionsarg is in places it shouldn't be such asActivateAppUser.Lastly, there are some linting changes in the PR but all the good stuff is in go.gen.ts.