question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Features headers to remove not working

See original GitHub issue

Using the new 1.4.0 version and the previous one 1.3.0, headers to remove function isn’t working.

This is the output of my successful generateSwagger task:

> Task :app:generateSwagger
Successfully read version from Swagger Spec file: 1.1.0
####################
Yelp Swagger Codegen
####################
Platform 	 kotlin-coroutines
Package 	 com.my.super.project
specName 	 [ DEFAULT ] defaultname
specVers 	 1.1.0
input 		 /home/projects/app/swagger.json
output 		 /home/projects/app/src/main/java
groupId 	 com.my.super.project
artifactId 	 com.my.super.project
features 	 X-HTTP-Method-Override, X-Operation-ID, Content-Type

BUILD SUCCESSFUL in 1s
1 actionable task: 1 executed
10:09:41 PM: Task execution finished 'generateSwagger'.

And this is my gradle configuration:

generateSwagger {
    platform = "kotlin-coroutines"
    packageName = "com.my.super.project"
    outputDir = file("./src/main/java/")
    features {
        headersToRemove = ["X-HTTP-Method-Override", "X-Operation-ID", "Content-Type"]
    }
    inputFile = file("../swagger/destination/PointsOfInterest_v1_Swagger_specification.json")
}

And this is the output of my Api:

@Headers(
        "X-Operation-ID: getPointOfInterest",
      "Content-Type: application/json"
    )
    @GET("api/{poisId}")
    suspend fun getPointOfInterest(
        @retrofit2.http.Path("poisId") poisId: String
    ): Map<String, Any?>

By the awesome project and thx for the help !

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
cortinicocommented, Feb 21, 2020

So @pietrini version 1.4.1 is out with this fix.

1reaction
martinbonnincommented, Feb 20, 2020

I’d go for a 1.4.1 release since 2.x will require more effort to integrate. But I’m not the one doing the releases so that’s the easy choice 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Headers.delete() - Web APIs - MDN Web Docs
The delete() method of the Headers interface deletes a header from the current Headers object.
Read more >
Remove all headers and footers - Microsoft Support
How to remove headers and/or footers from a Word document. ... Go to Insert > Header or Footer, and then select Remove Header...
Read more >
Can't remove headers after they are sent - Stack Overflow
If it is undefined , I would guess req.body is not being populated correctly OR it is an asynchronous node problem.
Read more >
Remove HTTP headers | Drupal.org
Also removes <meta name="Generator" content="Drupal 8 (https://www.drupal.org)"> from the <head> tag if the X-Generator HTTP header is ...
Read more >
Remove Specified HTTP Response Headers in PCF does not ...
The feature, 'Operator can specify headers to be stripped from the response by the router' does not work in the Ops Manager tile....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found