Contributions
How to avoid Access-Control-Allow-Headers error
I am getting "Failed to load http://xxxx-api/health: Request header field chain-id is not allowed by Access-Control-Allow-Headers in preflight response." when I hit the "Try it out!" button on my API page. In searching for answers I came across a suggestion (4 years old) (https://stackoverflow.com/questions/19240720/swagger-empty-listing-with-no-api) which suggests creating anApiOriginFilter,ApiListingResource, andApiListingResourceJSON. That page talks about incorporating the mention of these into web.xml - but the other part of the story is that we do not have a web.xml, so I've tried using@bean to define theApiOriginFilter andFilterRegistrationBean in our config file. The first problem I'm running into as I'm trying to build is, the examples importcom.wordnik.swagger.jaxrs.listing.ApiListing andcom.wordnik.swagger.jaxrs.listing.JavaApiListing. I can't figure out how to include these in my build - no matter what I add to my gradle build, thepackage comes up as not found, and when I search I can find nothing recent or relevant. There has GOT to be a better way to do this! Can anyone suggest a way of avoiding thatAccess-Control-Allow-Headers error?1.1KViews0likes0CommentsSwagger Inspector - Create API Definition
I am using Swagger inspector - I have my call working, seeing the response I expect. Now I want to use CREATE API DEFINITION, but when I hit that button all I can get is a popup window entitled "Something Went Wrong" - no suggestions for what I might need to change, no details about the error. Can anyone tell me what's going on? Should this thing be working? Thanks for any help you can provide!1KViews0likes0Comments