dave
02/08/2021, 4:54 PMtkint
02/08/2021, 5:32 PM<http://amazonaws.com|amazonaws.com>
domain hardcoded. When I change the domain with ClientFilters.SetHostFrom
, the signature process seems to fail: I get an AccessDenied response, even if the request is correct.
By trying the same request with Postman and its included AWS Signature feature, I got a different SignedHeaders
:
• Postman: SignedHeaders=host;x-amz-content-sha256;x-amz-date,
• Http4k-connect: SignedHeaders=host;x-amz-date,
So I think there are those two possibilities, either the signature is wrong due to a late host change, or the signature needs to sign x-amz-content-sha256
too.
Either way, it would be nice to be able to set the base domain.Ben Brodie
02/10/2021, 6:09 AMCatchAll
filter, but I it looks like that logs the stacktrace to the response, which is not what I would expect or want. I want a 500 status returned on uncaught exception, but I also want a log with the stacktrace. Sure, I can implement this myself with a filter, but I just feel like I’m missing some important piece of the puzzle. Please advise on how to approach exceptions (there will always be exceptions we don’t anticipate, and I want to make sure that these get logged so that in a production system, I can see the stacktrace).James Richardson
02/10/2021, 7:54 AMdave
02/10/2021, 8:02 AMDaniel Skogquist Åborg
02/12/2021, 6:11 AMVojtěch Knyttl
02/16/2021, 2:24 PM<http://Query.int|Query.int>().required("minValue", "Required minimal value")
This will nicely generate OpenApi description with integer
definition. This seems to be the result of IntegerParam
in mapWithNewMeta(StringBiDiMappings.long(), IntegerParam)
.
However, when using .multi
, this doesn't change, the OpenApi definition stays at integer
. I can se ParamMeta contains also ArrayParam
, so I guess this should ideally result in somehting like integer array
?
If I understand correctly, the ArrayParam
is not used for .multi
and I am not sure how this should be done properly?Norman
02/16/2021, 7:48 PMandyg
02/17/2021, 3:09 AMConfiguration(Configuration.getVersion())
instead of a specific version: Configuration(Configuration.VERSION_2_3_30)
)... but I am striking out when trying to provide a custom Configuration. Also useful for providing custom string formats, equality checks, etc.Elizabeth Thomas
02/18/2021, 4:57 AMOpenApiExtension
for the paths
in OpenApi spec through http4k-contract? My scenario is that I want to be able to add a custom attribute with a value to every path in my OpenApi Spec. I was able to add a custom attribute block using OpenApiExtension to the extensions
field in OpenApi3
. But I am not sure how to do it for each of my path object
apiBaseUrl bind contract {
renderer = OpenApi3(
ApiInfo(apiName, apiVersion, apiName),
WdsHttpJackson,
listOf(XApiDefinitionExtension),
OpenApi3ApiRenderer(WdsHttpJackson)
)
descriptionPath = swaggerJsonPath
routes += contractRoutes
}
James Richardson
02/19/2021, 7:35 AMShingi Chanakira
02/19/2021, 3:46 PMRazvan
02/20/2021, 6:36 PMssr86
02/21/2021, 12:20 AMdave
02/21/2021, 2:01 PMdave
02/22/2021, 4:50 PMRazvan
02/26/2021, 6:58 PMresult4k
if I got a lens declared as:
Body.auto<T>().toLens().asResult()
I can only use extract
lens function I can’t use inject
to it, so. what’s best practice ?
val requestLens = Body.auto<T>().toLens()
val responseLens = responseLens.asResult()
dave
02/27/2021, 7:06 PMdave
03/08/2021, 3:48 PMandyg
03/13/2021, 9:33 PMShingi Chanakira
03/18/2021, 1:05 PMElizabeth Thomas
03/20/2021, 4:40 AMservers
object section to openapi specs using the http4k contracts?Philipp Mayer
03/21/2021, 10:27 AMs4nchez
03/22/2021, 1:53 PMMrNiamh
03/23/2021, 9:48 AMs4nchez
03/23/2021, 11:08 AMVojtěch Knyttl
03/24/2021, 2:50 PMhttps://user-images.githubusercontent.com/401107/112330347-3e2deb80-8cb8-11eb-85e0-d9ed8922165b.png▾
https://user-images.githubusercontent.com/401107/112330408-4ede6180-8cb8-11eb-8f33-5726b30090f0.png▾
Philipp Mayer
03/24/2021, 9:41 PMval socketLens = Body.auto<Set<Socket>>().toLens()
just throws
No JsonAdapter for class java.util.LinkedHashSet, you should probably use Set instead of LinkedHashSet (Moshi only supports the collection interfaces by default) or else register a custom JsonAdapter.
and I'm not sure if I really want to add all of that: https://pulseadvancedmedia.co.uk/java/moshi-adapters-for-platform-types-like-arraylist-and-linkedlist/
Any tips what I'm missing? What are you guys using? I'm just used to Jackson, but it makes use of reflection, so I rather not use it for GraalVM I guess.
Thanks in advance!Vojtěch Knyttl
03/29/2021, 8:54 PMroutes(
"/docs/swagger-ui/swagger-ui.css" bind static(Classpath("/swagger-ui/swagger-ui.css")), // read from src/main/resources
"/docs" bind static(Classpath("META-INF/resources/webjars/swagger-ui/3.25.2"))
basically I want to override the single swagger-ui.css
file and leave the rest of swagger tools as default.
with the example above, the file is ignored and only content from the swagger-ui webjars is served.dave
03/31/2021, 1:24 PM